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:
auria 2011-02-06 02:11:57 +00:00
parent b62cf339cb
commit 8b9a9677fe
3 changed files with 11 additions and 0 deletions

View File

@ -71,6 +71,11 @@ ScalableFont::~ScalableFont()
if (SpriteBank) SpriteBank->drop();
}
}
void ScalableFont::updateRTL()
{
m_rtl = translations->isRTLLanguage();
}
void ScalableFont::setShadow(irr::video::SColor col)
{

View File

@ -134,6 +134,8 @@ public:
void setScale(const float scale);
float getScale() const { return m_scale; }
void updateRTL();
private:
struct SFontArea

View File

@ -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();
}