Fixed some font centering issues during live switch between RTL and LTR languages
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7631 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
b62cf339cb
commit
8b9a9677fe
@ -72,6 +72,11 @@ ScalableFont::~ScalableFont()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ScalableFont::updateRTL()
|
||||||
|
{
|
||||||
|
m_rtl = translations->isRTLLanguage();
|
||||||
|
}
|
||||||
|
|
||||||
void ScalableFont::setShadow(irr::video::SColor col)
|
void ScalableFont::setShadow(irr::video::SColor col)
|
||||||
{
|
{
|
||||||
m_shadow = true;
|
m_shadow = true;
|
||||||
|
@ -134,6 +134,8 @@ public:
|
|||||||
void setScale(const float scale);
|
void setScale(const float scale);
|
||||||
float getScale() const { return m_scale; }
|
float getScale() const { return m_scale; }
|
||||||
|
|
||||||
|
void updateRTL();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
struct SFontArea
|
struct SFontArea
|
||||||
|
@ -237,6 +237,10 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name, cons
|
|||||||
translations = new Translations();
|
translations = new Translations();
|
||||||
GUIEngine::getStateManager()->hardResetAndGoToScreen<MainMenuScreen>();
|
GUIEngine::getStateManager()->hardResetAndGoToScreen<MainMenuScreen>();
|
||||||
|
|
||||||
|
GUIEngine::getFont()->updateRTL();
|
||||||
|
GUIEngine::getTitleFont()->updateRTL();
|
||||||
|
GUIEngine::getSmallFont()->updateRTL();
|
||||||
|
|
||||||
UserConfigParams::m_language = selection.c_str();
|
UserConfigParams::m_language = selection.c_str();
|
||||||
user_config->saveConfig();
|
user_config->saveConfig();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user