diff --git a/src/event.cxx b/src/event.cxx index 6cd60d6..25e217f 100644 --- a/src/event.cxx +++ b/src/event.cxx @@ -2595,6 +2595,8 @@ CEvent::DrawButtons () else pente = 19; pos.x += LXOFFSET (); + if (IsRightReading ()) + pos.x = LXIMAGE () - pos.x; DrawTextRect (m_pPixmap, pos, m_libelle, pente, FONTSLIM); } @@ -3034,9 +3036,9 @@ CEvent::EventButtons (const SDL_Event & event, Point pos) { snprintf (m_textToolTips, sizeof (m_textToolTips), "%s", text); lg = GetTextWidth (m_textToolTips); - pos.x += IsRightReading () ? -lg : 10; + pos.x += IsRightReading () ? -10 : 10; pos.y += 20; - if (pos.x > LXIMAGE () - lg) + if (pos.x > LXIMAGE () + (IsRightReading () ? 0 : - lg)) pos.x = LXIMAGE () - lg; if (pos.x < 0) pos.x = 0; diff --git a/src/text.cxx b/src/text.cxx index 08ba99d..ac953de 100644 --- a/src/text.cxx +++ b/src/text.cxx @@ -195,11 +195,20 @@ DrawText (CPixmap * pPixmap, Point pos, const char * pText, Sint32 font) else pPixmap->DrawIcon (-1, CHLITTLE, rank, pos); - pos.x += GetCharWidth (pText, font); - - if (inc) + if (IsRightReading ()) + { + if (inc) + pText++; pText++; - pText++; + pos.x += -GetCharWidth (pText, font); + } + else + { + pos.x += GetCharWidth (pText, font); + if (inc) + pText++; + pText++; + } } } @@ -211,9 +220,6 @@ DrawTextPente ( { Sint32 rank, lg, rel, start; - if (IsRightReading ()) - pos.x = LXIMAGE () - pos.x; - start = pos.y; rel = 0; while (*pText != 0)