Tweak RTL : should only happen when a stirng is actually translated, if no translation is provided and the string stays in English keep it LTR
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8232 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
d02d02966c
commit
0c30bfbf53
@ -217,6 +217,7 @@ if(prop_name != NULL) widget.m_properties[prop_flag] = core::stringc(prop_name).
|
||||
if (text != NULL)
|
||||
{
|
||||
widget.m_text = _(text);
|
||||
widget.m_is_text_rtl = (translations->isRTLLanguage() && widget.m_text != text);
|
||||
}
|
||||
|
||||
if (parent != NULL)
|
||||
|
@ -80,6 +80,7 @@ Widget::Widget(WidgetType type, bool reserve_id)
|
||||
m_supports_multiplayer = false;
|
||||
m_is_bounding_box_round = false;
|
||||
m_has_tooltip = false;
|
||||
m_is_text_rtl = false;
|
||||
|
||||
m_tab_down_root = -1;
|
||||
m_tab_up_root = -1;
|
||||
|
@ -116,12 +116,7 @@ namespace GUIEngine
|
||||
* \ingroup guiengine
|
||||
*/
|
||||
class Widget : public SkinWidgetContainer
|
||||
{
|
||||
private:
|
||||
/** PROP_TEXT is a special case : since it can be translated it can't
|
||||
* go in the map above, which uses narrow strings */
|
||||
irr::core::stringw m_text;
|
||||
|
||||
{
|
||||
protected:
|
||||
unsigned int m_magic_number;
|
||||
|
||||
@ -137,6 +132,13 @@ namespace GUIEngine
|
||||
friend class ModalDialog;
|
||||
friend class AbstractTopLevelContainer;
|
||||
|
||||
/** PROP_TEXT is a special case : since it can be translated it can't
|
||||
* go in the map above, which uses narrow strings */
|
||||
irr::core::stringw m_text;
|
||||
|
||||
/** Whether the text in m_text is right-to-left */
|
||||
bool m_is_text_rtl;
|
||||
|
||||
/** When true, this widget shall use a bigger and more colourful font */
|
||||
bool m_title_font;
|
||||
|
||||
|
@ -77,7 +77,7 @@ void LabelWidget::add()
|
||||
#endif
|
||||
}
|
||||
#if IRRLICHT_VERSION_MAJOR > 1 || (IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR >= 8)
|
||||
irrwidget->setRightToLeft( translations->isRTLLanguage() );
|
||||
irrwidget->setRightToLeft( m_is_text_rtl );
|
||||
#endif
|
||||
|
||||
m_element = irrwidget;
|
||||
|
@ -917,7 +917,7 @@ int main(int argc, char *argv[] )
|
||||
if(!UserConfigParams::m_no_start_screen)
|
||||
{
|
||||
StateManager::get()->pushScreen(MainMenuScreen::getInstance());
|
||||
if(UserConfigParams::m_internet_status==NetworkHttp::IPERM_NOT_ASKED)
|
||||
//if(UserConfigParams::m_internet_status==NetworkHttp::IPERM_NOT_ASKED)
|
||||
{
|
||||
class ConfirmServer : public MessageDialog::IConfirmDialogListener
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user