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

Fix arabic and hebrew y offset

This commit is contained in:
Mathieu Schroeter 2022-10-22 18:45:40 +02:00
parent 2be0ed6be4
commit 745f3c3cd0
No known key found for this signature in database
GPG Key ID: 8B9145A5FA9DA8A8
2 changed files with 7 additions and 2 deletions

View File

@ -3137,8 +3137,8 @@ CEvent::EventButtons (const SDL_Event & event, Point pos)
if (pos.x < 0)
pos.x = 0;
const auto offset = g_settingsOverload & SETTING_LEGACY ? 14 : 16;
if (pos.y > LYIMAGE () - (GetLocale () == "ar" ? 22 : offset))
pos.y = LYIMAGE () - (GetLocale () == "ar" ? 22 : offset);
if (pos.y > LYIMAGE () - (GetLocale () == "ar" ? 20 : offset))
pos.y = LYIMAGE () - (GetLocale () == "ar" ? 20 : offset);
m_posToolTips = pos;
break;
}

View File

@ -174,6 +174,11 @@ public:
int baseW = texText ? texText->baseW : 0;
int baseH = texText ? texText->baseH : 0;
if (GetLocale () == "ar")
pos.y -= 2;
else if (GetLocale () == "he")
pos.y -= 1;
if (this->outline)
{
TTF_SetFontOutline (this->font, 1);