mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01:00
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:
parent
0984e06546
commit
a2c3f47748
16 changed files with 57 additions and 1 deletions
|
@ -11,6 +11,9 @@
|
||||||
<!-- On the language screen, hard limit 40 8x8 characters. Space/Z/V sets this as the language -->
|
<!-- On the language screen, hard limit 40 8x8 characters. Space/Z/V sets this as the language -->
|
||||||
<action_hint>Prem Espai, Z o V per a seleccionar</action_hint>
|
<action_hint>Prem Espai, Z o V per a seleccionar</action_hint>
|
||||||
|
|
||||||
|
<!-- Same as above, but for a gamepad button (hard limit 40 8x8 characters) -->
|
||||||
|
<gamepad_hint>Press {button} to select</gamepad_hint>
|
||||||
|
|
||||||
<!-- Enable automatic word wrapping instead of having to manually insert newlines -->
|
<!-- Enable automatic word wrapping instead of having to manually insert newlines -->
|
||||||
<autowordwrap>1</autowordwrap>
|
<autowordwrap>1</autowordwrap>
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
<!-- On the language screen, hard limit 40 8x8 characters. Space/Z/V sets this as the language -->
|
<!-- On the language screen, hard limit 40 8x8 characters. Space/Z/V sets this as the language -->
|
||||||
<action_hint>Drücke die Leertaste, Z oder V zur Auswahl</action_hint>
|
<action_hint>Drücke die Leertaste, Z oder V zur Auswahl</action_hint>
|
||||||
|
|
||||||
|
<!-- Same as above, but for a gamepad button (hard limit 40 8x8 characters) -->
|
||||||
|
<gamepad_hint>Press {button} to select</gamepad_hint>
|
||||||
|
|
||||||
<!-- Enable automatic word wrapping instead of having to manually insert newlines -->
|
<!-- Enable automatic word wrapping instead of having to manually insert newlines -->
|
||||||
<autowordwrap>1</autowordwrap>
|
<autowordwrap>1</autowordwrap>
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
<!-- On the language screen, hard limit 40 8x8 characters. Space/Z/V sets this as the language -->
|
<!-- On the language screen, hard limit 40 8x8 characters. Space/Z/V sets this as the language -->
|
||||||
<action_hint>Press Space, Z, or V to select</action_hint>
|
<action_hint>Press Space, Z, or V to select</action_hint>
|
||||||
|
|
||||||
|
<!-- Same as above, but for a gamepad button (hard limit 40 8x8 characters) -->
|
||||||
|
<gamepad_hint>Press {button} to select</gamepad_hint>
|
||||||
|
|
||||||
<!-- Enable automatic word wrapping instead of having to manually insert newlines -->
|
<!-- Enable automatic word wrapping instead of having to manually insert newlines -->
|
||||||
<autowordwrap>1</autowordwrap>
|
<autowordwrap>1</autowordwrap>
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
<!-- On the language screen, hard limit 40 8x8 characters. Space/Z/V sets this as the language -->
|
<!-- On the language screen, hard limit 40 8x8 characters. Space/Z/V sets this as the language -->
|
||||||
<action_hint>Premu spaceton, Z aŭ V por elekti</action_hint>
|
<action_hint>Premu spaceton, Z aŭ V por elekti</action_hint>
|
||||||
|
|
||||||
|
<!-- Same as above, but for a gamepad button (hard limit 40 8x8 characters) -->
|
||||||
|
<gamepad_hint>Press {button} to select</gamepad_hint>
|
||||||
|
|
||||||
<!-- Enable automatic word wrapping instead of having to manually insert newlines -->
|
<!-- Enable automatic word wrapping instead of having to manually insert newlines -->
|
||||||
<autowordwrap>1</autowordwrap>
|
<autowordwrap>1</autowordwrap>
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
<!-- On the language screen, hard limit 40 8x8 characters. Space/Z/V sets this as the language -->
|
<!-- On the language screen, hard limit 40 8x8 characters. Space/Z/V sets this as the language -->
|
||||||
<action_hint>Pulsa Espacio, Z, o V para seleccionar</action_hint>
|
<action_hint>Pulsa Espacio, Z, o V para seleccionar</action_hint>
|
||||||
|
|
||||||
|
<!-- Same as above, but for a gamepad button (hard limit 40 8x8 characters) -->
|
||||||
|
<gamepad_hint>Press {button} to select</gamepad_hint>
|
||||||
|
|
||||||
<!-- Enable automatic word wrapping instead of having to manually insert newlines -->
|
<!-- Enable automatic word wrapping instead of having to manually insert newlines -->
|
||||||
<autowordwrap>1</autowordwrap>
|
<autowordwrap>1</autowordwrap>
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
<!-- On the language screen, hard limit 40 8x8 characters. Space/Z/V sets this as the language -->
|
<!-- On the language screen, hard limit 40 8x8 characters. Space/Z/V sets this as the language -->
|
||||||
<action_hint>Espace, Z ou V pour sélectionner</action_hint>
|
<action_hint>Espace, Z ou V pour sélectionner</action_hint>
|
||||||
|
|
||||||
|
<!-- Same as above, but for a gamepad button (hard limit 40 8x8 characters) -->
|
||||||
|
<gamepad_hint>Press {button} to select</gamepad_hint>
|
||||||
|
|
||||||
<!-- Enable automatic word wrapping instead of having to manually insert newlines -->
|
<!-- Enable automatic word wrapping instead of having to manually insert newlines -->
|
||||||
<autowordwrap>1</autowordwrap>
|
<autowordwrap>1</autowordwrap>
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
<!-- On the language screen, hard limit 40 8x8 characters. Space/Z/V sets this as the language -->
|
<!-- On the language screen, hard limit 40 8x8 characters. Space/Z/V sets this as the language -->
|
||||||
<action_hint>Premi spazio, Z, or V per selezionare</action_hint>
|
<action_hint>Premi spazio, Z, or V per selezionare</action_hint>
|
||||||
|
|
||||||
|
<!-- Same as above, but for a gamepad button (hard limit 40 8x8 characters) -->
|
||||||
|
<gamepad_hint>Press {button} to select</gamepad_hint>
|
||||||
|
|
||||||
<!-- Enable automatic word wrapping instead of having to manually insert newlines -->
|
<!-- Enable automatic word wrapping instead of having to manually insert newlines -->
|
||||||
<autowordwrap>1</autowordwrap>
|
<autowordwrap>1</autowordwrap>
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
<!-- On the language screen, hard limit 40 8x8 characters. Space/Z/V sets this as the language -->
|
<!-- On the language screen, hard limit 40 8x8 characters. Space/Z/V sets this as the language -->
|
||||||
<action_hint>Druk op spatie, Z, of V om te kiezen</action_hint>
|
<action_hint>Druk op spatie, Z, of V om te kiezen</action_hint>
|
||||||
|
|
||||||
|
<!-- Same as above, but for a gamepad button (hard limit 40 8x8 characters) -->
|
||||||
|
<gamepad_hint>Druk op {button} om te kiezen</gamepad_hint>
|
||||||
|
|
||||||
<!-- Enable automatic word wrapping instead of having to manually insert newlines -->
|
<!-- Enable automatic word wrapping instead of having to manually insert newlines -->
|
||||||
<autowordwrap>1</autowordwrap>
|
<autowordwrap>1</autowordwrap>
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
<!-- On the language screen, hard limit 40 8x8 characters. Space/Z/V sets this as the language -->
|
<!-- On the language screen, hard limit 40 8x8 characters. Space/Z/V sets this as the language -->
|
||||||
<action_hint></action_hint>
|
<action_hint></action_hint>
|
||||||
|
|
||||||
|
<!-- Same as above, but for a gamepad button (hard limit 40 8x8 characters) -->
|
||||||
|
<gamepad_hint>Press {button} to select</gamepad_hint>
|
||||||
|
|
||||||
<!-- Enable automatic word wrapping instead of having to manually insert newlines -->
|
<!-- Enable automatic word wrapping instead of having to manually insert newlines -->
|
||||||
<autowordwrap>1</autowordwrap>
|
<autowordwrap>1</autowordwrap>
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
<!-- On the language screen, hard limit 40 8x8 characters. Space/Z/V sets this as the language -->
|
<!-- On the language screen, hard limit 40 8x8 characters. Space/Z/V sets this as the language -->
|
||||||
<action_hint>Seleciona com Barra de Espaços, Z ou V</action_hint>
|
<action_hint>Seleciona com Barra de Espaços, Z ou V</action_hint>
|
||||||
|
|
||||||
|
<!-- Same as above, but for a gamepad button (hard limit 40 8x8 characters) -->
|
||||||
|
<gamepad_hint>Press {button} to select</gamepad_hint>
|
||||||
|
|
||||||
<!-- Enable automatic word wrapping instead of having to manually insert newlines -->
|
<!-- Enable automatic word wrapping instead of having to manually insert newlines -->
|
||||||
<autowordwrap>1</autowordwrap>
|
<autowordwrap>1</autowordwrap>
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
<!-- On the language screen, hard limit 40 8x8 characters. Space/Z/V sets this as the language -->
|
<!-- On the language screen, hard limit 40 8x8 characters. Space/Z/V sets this as the language -->
|
||||||
<action_hint>Нажмите Пробел, Z или V, чтобы выбрать</action_hint>
|
<action_hint>Нажмите Пробел, Z или V, чтобы выбрать</action_hint>
|
||||||
|
|
||||||
|
<!-- Same as above, but for a gamepad button (hard limit 40 8x8 characters) -->
|
||||||
|
<gamepad_hint>Press {button} to select</gamepad_hint>
|
||||||
|
|
||||||
<!-- Enable automatic word wrapping instead of having to manually insert newlines -->
|
<!-- Enable automatic word wrapping instead of having to manually insert newlines -->
|
||||||
<autowordwrap>1</autowordwrap>
|
<autowordwrap>1</autowordwrap>
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
<!-- On the language screen, hard limit 40 8x8 characters. Space/Z/V sets this as the language -->
|
<!-- On the language screen, hard limit 40 8x8 characters. Space/Z/V sets this as the language -->
|
||||||
<action_hint>Boşluk, Z veya V tuşu ile seç</action_hint>
|
<action_hint>Boşluk, Z veya V tuşu ile seç</action_hint>
|
||||||
|
|
||||||
|
<!-- Same as above, but for a gamepad button (hard limit 40 8x8 characters) -->
|
||||||
|
<gamepad_hint>Press {button} to select</gamepad_hint>
|
||||||
|
|
||||||
<!-- Enable automatic word wrapping instead of having to manually insert newlines -->
|
<!-- Enable automatic word wrapping instead of having to manually insert newlines -->
|
||||||
<autowordwrap>1</autowordwrap>
|
<autowordwrap>1</autowordwrap>
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@ struct LangMeta
|
||||||
std::string nativename;
|
std::string nativename;
|
||||||
std::string credit;
|
std::string credit;
|
||||||
std::string action_hint;
|
std::string action_hint;
|
||||||
|
std::string gamepad_hint;
|
||||||
bool autowordwrap; // = true; enable automatic wordwrapping
|
bool autowordwrap; // = true; enable automatic wordwrapping
|
||||||
bool toupper; // = true; enable automatic full-caps for menu options
|
bool toupper; // = true; enable automatic full-caps for menu options
|
||||||
bool toupper_i_dot; // = false; enable Turkish i mapping when uppercasing
|
bool toupper_i_dot; // = false; enable Turkish i mapping when uppercasing
|
||||||
|
|
|
@ -86,6 +86,8 @@ static void sync_lang_file(const std::string& langcode)
|
||||||
pElem->SetText(langmeta.credit.c_str());
|
pElem->SetText(langmeta.credit.c_str());
|
||||||
else if (SDL_strcmp(pKey, "action_hint") == 0)
|
else if (SDL_strcmp(pKey, "action_hint") == 0)
|
||||||
pElem->SetText(langmeta.action_hint.c_str());
|
pElem->SetText(langmeta.action_hint.c_str());
|
||||||
|
else if (SDL_strcmp(pKey, "gamepad_hint") == 0)
|
||||||
|
pElem->SetText(langmeta.gamepad_hint.c_str());
|
||||||
else if (SDL_strcmp(pKey, "autowordwrap") == 0)
|
else if (SDL_strcmp(pKey, "autowordwrap") == 0)
|
||||||
pElem->SetText((int) langmeta.autowordwrap);
|
pElem->SetText((int) langmeta.autowordwrap);
|
||||||
else if (SDL_strcmp(pKey, "toupper") == 0)
|
else if (SDL_strcmp(pKey, "toupper") == 0)
|
||||||
|
|
|
@ -93,6 +93,8 @@ static void loadmeta(LangMeta& meta, const std::string& langcode = lang)
|
||||||
meta.credit = std::string(pText);
|
meta.credit = std::string(pText);
|
||||||
else if (SDL_strcmp(pKey, "action_hint") == 0)
|
else if (SDL_strcmp(pKey, "action_hint") == 0)
|
||||||
meta.action_hint = std::string(pText);
|
meta.action_hint = std::string(pText);
|
||||||
|
else if (SDL_strcmp(pKey, "gamepad_hint") == 0)
|
||||||
|
meta.gamepad_hint = std::string(pText);
|
||||||
else if (SDL_strcmp(pKey, "autowordwrap") == 0)
|
else if (SDL_strcmp(pKey, "autowordwrap") == 0)
|
||||||
meta.autowordwrap = help.Int(pText);
|
meta.autowordwrap = help.Int(pText);
|
||||||
else if (SDL_strcmp(pKey, "toupper") == 0)
|
else if (SDL_strcmp(pKey, "toupper") == 0)
|
||||||
|
|
|
@ -646,7 +646,22 @@ static void menurender(void)
|
||||||
else if ((unsigned)game.currentmenuoption < loc::languagelist.size())
|
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_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;
|
break;
|
||||||
case Menu::translator_main:
|
case Menu::translator_main:
|
||||||
|
|
Loading…
Reference in a new issue