From b62cf339cba130dc3ccf3d22e377220e3ed7e298 Mon Sep 17 00:00:00 2001 From: auria Date: Sat, 5 Feb 2011 20:47:09 +0000 Subject: [PATCH] Use irrlicht's 1.8 RTL support if 1.8 is the verison being used git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7630 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/guiengine/widgets/bubble_widget.cpp | 6 +++++- src/guiengine/widgets/label_widget.cpp | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/guiengine/widgets/bubble_widget.cpp b/src/guiengine/widgets/bubble_widget.cpp index 14289227e..dc8e09ec4 100644 --- a/src/guiengine/widgets/bubble_widget.cpp +++ b/src/guiengine/widgets/bubble_widget.cpp @@ -50,7 +50,11 @@ void BubbleWidget::add() IGUIStaticText* irrwidget; irrwidget = GUIEngine::getGUIEnv()->addStaticText(message.c_str(), m_shrinked_size, false, true /* word wrap */, m_parent, (m_focusable ? getNewID() : getNewNoFocusID())); - + +#if IRRLICHT_VERSION_MAJOR > 1 || (IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR >= 8) + irrwidget->setRightToLeft( translations->isRTLLanguage() ); +#endif + // find expanded bubble size int text_height = irrwidget->getTextHeight(); diff --git a/src/guiengine/widgets/label_widget.cpp b/src/guiengine/widgets/label_widget.cpp index c519e1128..03ca68fc4 100644 --- a/src/guiengine/widgets/label_widget.cpp +++ b/src/guiengine/widgets/label_widget.cpp @@ -20,6 +20,7 @@ #include "guiengine/engine.hpp" #include "guiengine/scalable_font.hpp" #include "guiengine/skin.hpp" +#include "utils/translation.hpp" #include @@ -62,6 +63,10 @@ void LabelWidget::add() irrwidget = GUIEngine::getGUIEnv()->addStaticText(message.c_str(), widget_size, false, word_wrap, m_parent, -1); +#if IRRLICHT_VERSION_MAJOR > 1 || (IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR >= 8) + irrwidget->setRightToLeft( translations->isRTLLanguage() ); +#endif + m_element = irrwidget; irrwidget->setTextAlignment( align, valign );