mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Add PR_RTL_XFLIP to some important places
Okay, the "Font:" thing needed some local code after all, because both the interface font as well as the level font are used there. But it's good enough - all the other places can just use the flag. Notably, I also used this for the menus, since the existing ones are kinda LTR-oriented, and it's something that we don't *really* have to do, but I think it shows we care!
This commit is contained in:
committed by
Misa Elizabeth Kai
parent
eac612c309
commit
2b22f7cda2
@@ -573,8 +573,16 @@ static void editormenurender(int tr, int tg, int tb)
|
||||
int len_label = font::len(0, label);
|
||||
const char* name = font::get_level_font_display_name();
|
||||
|
||||
font::print(0, 2, 230, label, tr / 2, tg / 2, tb / 2);
|
||||
font::print(PR_FONT_LEVEL, 2 + len_label, 230, name, tr / 2, tg / 2, tb / 2);
|
||||
int font_x = 2 + len_label;
|
||||
uint32_t font_flags = PR_FONT_LEVEL;
|
||||
if (font::is_rtl(PR_FONT_INTERFACE))
|
||||
{
|
||||
font_x = SCREEN_WIDTH_PIXELS - font_x;
|
||||
font_flags |= PR_RIGHT;
|
||||
}
|
||||
|
||||
font::print(PR_RTL_XFLIP, 2, 230, label, tr / 2, tg / 2, tb / 2);
|
||||
font::print(font_flags, font_x, 230, name, tr / 2, tg / 2, tb / 2);
|
||||
break;
|
||||
}
|
||||
case Menu::ed_music:
|
||||
@@ -652,8 +660,16 @@ static void editormenurender(int tr, int tg, int tb)
|
||||
int len_label = font::len(0, label);
|
||||
const char* name = font::get_level_font_display_name();
|
||||
|
||||
font::print(0, 2, 230, label, tr/2, tg/2, tb/2);
|
||||
font::print(PR_FONT_LEVEL, 2+len_label, 230, name, tr/2, tg/2, tb/2);
|
||||
int font_x = 2 + len_label;
|
||||
uint32_t font_flags = PR_FONT_LEVEL;
|
||||
if (font::is_rtl(PR_FONT_INTERFACE))
|
||||
{
|
||||
font_x = SCREEN_WIDTH_PIXELS - font_x;
|
||||
font_flags |= PR_RIGHT;
|
||||
}
|
||||
|
||||
font::print(PR_RTL_XFLIP, 2, 230, label, tr/2, tg/2, tb/2);
|
||||
font::print(font_flags, font_x, 230, name, tr/2, tg/2, tb/2);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user