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
@ -71,6 +71,11 @@ ScalableFont::~ScalableFont()
|
||||
if (SpriteBank) SpriteBank->drop();
|
||||
}
|
||||
}
|
||||
|
||||
void ScalableFont::updateRTL()
|
||||
{
|
||||
m_rtl = translations->isRTLLanguage();
|
||||
}
|
||||
|
||||
void ScalableFont::setShadow(irr::video::SColor col)
|
||||
{
|
||||
|
@ -134,6 +134,8 @@ public:
|
||||
void setScale(const float scale);
|
||||
float getScale() const { return m_scale; }
|
||||
|
||||
void updateRTL();
|
||||
|
||||
private:
|
||||
|
||||
struct SFontArea
|
||||
|
@ -237,6 +237,10 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name, cons
|
||||
translations = new Translations();
|
||||
GUIEngine::getStateManager()->hardResetAndGoToScreen<MainMenuScreen>();
|
||||
|
||||
GUIEngine::getFont()->updateRTL();
|
||||
GUIEngine::getTitleFont()->updateRTL();
|
||||
GUIEngine::getSmallFont()->updateRTL();
|
||||
|
||||
UserConfigParams::m_language = selection.c_str();
|
||||
user_config->saveConfig();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user