1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00

WIP: continue layout for right2left reading (hebrew)

This commit is contained in:
Mathieu Schroeter 2019-02-05 22:16:36 +01:00
parent ffcbd74f58
commit c825fe5e5d
3 changed files with 13 additions and 3 deletions

View File

@ -55,7 +55,8 @@ CButton::~CButton () {}
bool
CButton::Create (
CPixmap * pPixmap, CSound * pSound, Point pos, Sint32 type, Sint32 * pMenu,
Sint32 nbMenu, const char ** pToolTips, Sint32 region, Uint32 message)
Sint32 nbMenu, const char ** pToolTips, Sint32 region, Uint32 message,
bool isRightReading)
{
Point iconDim;
Sint32 i, icon;
@ -92,6 +93,14 @@ CButton::Create (
{
icon = pMenu[i];
if (isRightReading)
{
if (icon == 51) // right arrow
icon = 50;
else if (icon == 50) // left arrow
icon = 51;
}
if (region == 1) // palmiers ?
{
if (icon == 0)

View File

@ -36,7 +36,8 @@ public:
bool Create (
CPixmap * pPixmap, CSound * pSound, Point pos, Sint32 type, Sint32 * pMenu,
Sint32 nbMenu, const char ** pToolTips, Sint32 region, Uint32 message);
Sint32 nbMenu, const char ** pToolTips, Sint32 region, Uint32 message,
bool isRightReading);
void Draw ();
Sint32 GetState ();

View File

@ -2065,7 +2065,7 @@ CEvent::CreateButtons (Sint32 phase)
m_pPixmap, m_pSound, pos, table[m_index].buttons[i].type,
table[m_index].buttons[i].iconMenu + 1,
table[m_index].buttons[i].iconMenu[0], table[m_index].buttons[i].toolTips,
m_pDecor->GetRegion (), message);
m_pDecor->GetRegion (), message, isRightReading);
i++;
}