Add button glyphs support to selection hint on language screen

The language screen has a "Press Space, Z, or V to select" hint, which
I forgot to update for supporting button glyphs in #943, so this commit
does.

    <action_hint>Press Space, Z, or V to select</action_hint>
    <gamepad_hint>Press {button} to select</gamepad_hint>
This commit is contained in:
Dav999-v
2023-03-26 20:15:45 +02:00
committed by Misa Elizabeth Kai
parent 0984e06546
commit a2c3f47748
16 changed files with 57 additions and 1 deletions

View File

@@ -646,7 +646,22 @@ static void menurender(void)
else if ((unsigned)game.currentmenuoption < loc::languagelist.size())
{
font::print_wrap(PR_CEN, -1, 8, loc::languagelist[game.currentmenuoption].credit.c_str(), tr/2, tg/2, tb/2);
font::print(PR_CEN, -1, 230, loc::languagelist[game.currentmenuoption].action_hint, tr/2, tg/2, tb/2);
const char* select_hint;
char buffer[SCREEN_WIDTH_CHARS + 1];
if (BUTTONGLYPHS_keyboard_is_active())
{
select_hint = loc::languagelist[game.currentmenuoption].action_hint.c_str();
}
else
{
vformat_buf(buffer, sizeof(buffer),
loc::languagelist[game.currentmenuoption].gamepad_hint.c_str(),
"button:but",
vformat_button(ActionSet_Menu, Action_Menu_Accept)
);
select_hint = buffer;
}
font::print(PR_CEN, -1, 230, select_hint, tr/2, tg/2, tb/2);
}
break;
case Menu::translator_main: