mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Add being able to press Esc to return to previous menu
This is a small quality-of-life thing that makes it so you don't have to move your menu selection all the way over to the "return" button in order to return to the previous menu. You can just press Escape instead to return to the previous menu. The previous behavior of pressing Escape was to bring up the 'confirm quit' menu, or if you were in an options menu in-game, return to the pause menu. If you're on the main menu (and thus don't have any previous menu) and press Escape, the game will instead bring up the 'confirm quit' menu. For consistency, the "quit game" option on the main menu will also bring up the 'confirm quit' menu as well, instead of immediately closing the game. Pressing the controller button mapped to Escape will also work as well. The only menus that don't have return buttons are the 'countdown' menus - so the game will not let you press Escape if there's a menu countdown happening. Now that pressing Escape in the 'continue' menu will just bring you back to the 'play' menu, there's no need to specifically put map.nexttowercolour() first when canceling the 'confirm quit' menu.
This commit is contained in:
@@ -3928,7 +3928,30 @@ void editorinput(void)
|
||||
else
|
||||
{
|
||||
|
||||
ed.settingsmod=!ed.settingsmod;
|
||||
music.playef(11);
|
||||
if (ed.settingsmod)
|
||||
{
|
||||
if (ed.scripteditmod)
|
||||
{
|
||||
ed.scripteditmod = false;
|
||||
}
|
||||
else if (ed.settingsmod)
|
||||
{
|
||||
if (game.currentmenuname == Menu::ed_settings)
|
||||
{
|
||||
ed.settingsmod = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
game.returnmenu();
|
||||
map.nexttowercolour();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ed.settingsmod = true;
|
||||
}
|
||||
graphics.backgrounddrawn=false;
|
||||
|
||||
if (ed.settingsmod)
|
||||
@@ -4037,12 +4060,6 @@ void editorinput(void)
|
||||
key.keybuffer=ed.sb[ed.pagey+ed.sby];
|
||||
ed.sbx = utf8::unchecked::distance(ed.sb[ed.pagey+ed.sby].begin(), ed.sb[ed.pagey+ed.sby].end());
|
||||
}
|
||||
|
||||
if (key.isDown(27))
|
||||
{
|
||||
ed.scripteditmod=false;
|
||||
ed.settingsmod=false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(ed.scripthelppage==1)
|
||||
|
||||
Reference in New Issue
Block a user