Make left/right key input correct for RTL menus

Instead of just up/down, you can also control menus with left/right.
Which is illogical in Arabic... No big deal, I imagined this code
to become much worse than it did. (And action sets is probably gonna
refactor the whole thing anyway)
This commit is contained in:
Dav999
2024-01-03 23:13:51 +01:00
committed by Misa Elizabeth Kai
parent 2b22f7cda2
commit 25bdf0866a
2 changed files with 50 additions and 6 deletions

View File

@@ -249,11 +249,11 @@ void Graphics::map_tab(int opt, const char* text, bool selected /*= false*/)
{
char buffer[SCREEN_WIDTH_CHARS + 1];
vformat_buf(buffer, sizeof(buffer), loc::get_langmeta()->menu_select_tight.c_str(), "label:str", text);
font::print(PR_CEN | PR_CJK_LOW, x, 220, buffer, 196, 196, 255 - help.glow);
font::print(PR_CEN | PR_CJK_LOW | PR_RTL_XFLIP, x, 220, buffer, 196, 196, 255 - help.glow);
}
else
{
font::print(PR_CEN | PR_CJK_LOW, x, 220, text, 64, 64, 64);
font::print(PR_CEN | PR_CJK_LOW | PR_RTL_XFLIP, x, 220, text, 64, 64, 64);
}
}