1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2025-01-09 18:39:45 +01:00

Fix first-time lang screen

This commit is contained in:
NyakoFox 2024-04-11 12:37:54 -03:00
parent a32bf13691
commit d54af27e9a

View file

@ -1236,16 +1236,28 @@ void menuactionpress(void)
if (game.currentmenuoption == -3)
{
// return
game.returnmenu();
if (loc::pre_title_lang_menu)
{
/* Make the title screen appear, we haven't seen it yet.
* game.returnmenu() works because Menu::mainmenu
* is created before the language menu. */
game.menustart = false;
loc::pre_title_lang_menu = false;
}
else
{
map.nexttowercolour();
game.currentmenuoption = loc::languagelist_curlang;
}
game.returnmenu();
}
else if (game.currentmenuoption == -2)
{
// go left a page (or wrap to end)
game.languagepage = POS_MOD(game.languagepage - 1, (int) SDL_ceilf(loc::languagelist.size() / 16.0));
loc::loadlanguagelist();
loc::pre_title_lang_menu = false;
game.createmenu(Menu::language, true);
game.currentmenuoption = loc::languagelist_curlang;
map.nexttowercolour();
@ -1255,7 +1267,6 @@ void menuactionpress(void)
// go right a page (or wrap to start)
game.languagepage = POS_MOD(game.languagepage + 1, (int) SDL_ceilf(loc::languagelist.size() / 16.0));
loc::loadlanguagelist();
loc::pre_title_lang_menu = false;
game.createmenu(Menu::language, true);
game.currentmenuoption = loc::languagelist_curlang;
map.nexttowercolour();
@ -1272,6 +1283,13 @@ void menuactionpress(void)
graphics.grphx.init_translations();
}
if (prev_lang != loc::lang)
{
recomputetextboxes();
}
if (!key.using_touch)
{
if (loc::pre_title_lang_menu)
{
/* Make the title screen appear, we haven't seen it yet.
@ -1281,13 +1299,6 @@ void menuactionpress(void)
loc::pre_title_lang_menu = false;
}
if (prev_lang != loc::lang)
{
recomputetextboxes();
}
if (!key.using_touch)
{
game.returnmenu();
map.nexttowercolour();
}
@ -1295,7 +1306,6 @@ void menuactionpress(void)
{
// We need to respawn the buttons
loc::loadlanguagelist();
loc::pre_title_lang_menu = false;
game.createmenu(Menu::language, true);
game.currentmenuoption = loc::languagelist_curlang;
}