mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-11-13 22:49:42 +01:00
Fix first-time lang screen
This commit is contained in:
parent
1007c7f85f
commit
d6d29a8898
1 changed files with 24 additions and 14 deletions
|
@ -1230,16 +1230,28 @@ void menuactionpress(void)
|
|||
if (game.currentmenuoption == -3)
|
||||
{
|
||||
// return
|
||||
|
||||
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();
|
||||
map.nexttowercolour();
|
||||
game.currentmenuoption = loc::languagelist_curlang;
|
||||
}
|
||||
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();
|
||||
|
@ -1249,7 +1261,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();
|
||||
|
@ -1266,15 +1277,6 @@ void menuactionpress(void)
|
|||
graphics.grphx.init_translations();
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
if (prev_lang != loc::lang)
|
||||
{
|
||||
recomputetextboxes();
|
||||
|
@ -1282,6 +1284,15 @@ void menuactionpress(void)
|
|||
|
||||
if (!key.using_touch)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
game.returnmenu();
|
||||
map.nexttowercolour();
|
||||
}
|
||||
|
@ -1289,7 +1300,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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue