mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Prevent changing language if a textbox is displayed
I really thought I was going to need to block changing the language in-game altogether, but activity zone prompts are now fixed and the only obvious problem I can think of right now is having a dialogue open, so I just disable the language option if a textbox is displayed. (like how the map menu only has the save option if a script is running)
This commit is contained in:
committed by
Misa Elizabeth Kai
parent
700aa4aaa0
commit
4ae6c77110
@@ -6503,7 +6503,7 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
|
||||
option(loc::gettext("audio"));
|
||||
option(loc::gettext("game pad"));
|
||||
option(loc::gettext("accessibility"));
|
||||
option(loc::gettext("language"));
|
||||
option(loc::gettext("language"), graphics.textboxes.empty());
|
||||
option(loc::gettext("return"));
|
||||
menuyoff = 0;
|
||||
maxspacing = 15;
|
||||
|
||||
@@ -1033,11 +1033,18 @@ static void menuactionpress(void)
|
||||
break;
|
||||
case 5:
|
||||
//language options
|
||||
music.playef(Sound_VIRIDIAN);
|
||||
loc::loadlanguagelist();
|
||||
game.createmenu(Menu::language);
|
||||
game.currentmenuoption = loc::languagelist_curlang;
|
||||
map.nexttowercolour();
|
||||
if (graphics.textboxes.empty())
|
||||
{
|
||||
music.playef(Sound_VIRIDIAN);
|
||||
loc::loadlanguagelist();
|
||||
game.createmenu(Menu::language);
|
||||
game.currentmenuoption = loc::languagelist_curlang;
|
||||
map.nexttowercolour();
|
||||
}
|
||||
else
|
||||
{
|
||||
music.playef(Sound_CRY);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
/* Return */
|
||||
|
||||
@@ -381,8 +381,15 @@ static void menurender(void)
|
||||
font::print_wrap(PR_CEN, -1, 65, loc::gettext("Disable screen effects, enable slowdown modes or invincibility."), tr, tg, tb);
|
||||
break;
|
||||
case 5:
|
||||
{
|
||||
font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Language"), tr, tg, tb);
|
||||
font::print_wrap(PR_CEN, -1, 65, loc::gettext("Change the language."), tr, tg, tb);
|
||||
int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Change the language."), tr, tg, tb);
|
||||
|
||||
if (!graphics.textboxes.empty())
|
||||
{
|
||||
font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Can not change the language while a textbox is displayed in-game."), tr, tg, tb);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case Menu::graphicoptions:
|
||||
|
||||
Reference in New Issue
Block a user