mirror of
https://github.com/blupi-games/planetblupi
synced 2024-12-30 10:15:36 +01:00
Continue fixing positions for right2left layout (hebrew)
This commit is contained in:
parent
c82e04d558
commit
a7abeb60a1
18
src/menu.cxx
18
src/menu.cxx
@ -305,13 +305,16 @@ CMenu::Draw ()
|
|||||||
snprintf (text, sizeof (text), "%s", tr);
|
snprintf (text, sizeof (text), "%s", tr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_nbCel.x > 1 && i < m_nbCel.y)
|
if (
|
||||||
|
(m_nbCel.x > 1 && i < m_nbCel.y) || (IsRightReading () && m_nbCel.x == 1))
|
||||||
{
|
{
|
||||||
pos.x = m_pos.x - 4 - GetTextWidth (text); // texte à gauche
|
pos.x = m_pos.x - 4 -
|
||||||
|
(IsRightReading () ? 0 : GetTextWidth (text)); // texte à gauche
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pos.x = m_pos.x + m_dim.x + 4;
|
pos.x =
|
||||||
|
m_pos.x + m_dim.x + 4 + (IsRightReading () ? GetTextWidth (text) : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawText (m_pPixmap, pos, text, FONTWHITE);
|
DrawText (m_pPixmap, pos, text, FONTWHITE);
|
||||||
@ -331,13 +334,16 @@ CMenu::Draw ()
|
|||||||
snprintf (text, sizeof (text), "%s", tr);
|
snprintf (text, sizeof (text), "%s", tr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_nbCel.x > 1 && i < m_nbCel.y)
|
if (
|
||||||
|
(m_nbCel.x > 1 && i < m_nbCel.y) ||
|
||||||
|
(IsRightReading () && m_nbCel.x == 1))
|
||||||
{
|
{
|
||||||
pos.x = m_pos.x - 4 - GetTextWidth (text);
|
pos.x = m_pos.x - 4 - (IsRightReading () ? 0 : GetTextWidth (text));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pos.x = m_pos.x + m_dim.x + 4;
|
pos.x =
|
||||||
|
m_pos.x + m_dim.x + 4 + (IsRightReading () ? GetTextWidth (text) : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
pos.y += DIMTEXTY;
|
pos.y += DIMTEXTY;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user