1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-07 05:13:38 +02:00

Allow pressing Esc to close Esc menu

Another thing that's annoyed me a lot is being unable to simply press
Esc to close the pause menu. You'd have to hover over the "return to
game" or "keep playing" option. This would be even more annoying with
more options on the menu, so allowing to press Esc is a nice
quality-of-life thing.
This commit is contained in:
Misa 2020-06-22 21:36:50 -07:00 committed by Ethan Lee
parent f6d73c62ec
commit c5a5589ce5
2 changed files with 8 additions and 3 deletions

View File

@ -7763,4 +7763,5 @@ void Game::returntopausemenu()
gamestate = MAPMODE;
map.kludge_to_bg();
map.tdrawback = true;
game.mapheld = true;
}

View File

@ -1958,20 +1958,24 @@ void mapinput()
{
game.press_action = true;
}
if (game.menupage < 12)
if (game.menupage < 12 || (game.menupage >= 30 && game.menupage <= 33))
{
if (key.isDown(KEYBOARD_ENTER) || key.isDown(game.controllerButton_map) ) game.press_map = true;
if (key.isDown(27))
if (key.isDown(27) && !game.mapheld)
{
game.mapheld = true;
if (game.menupage < 9)
{
game.menupage = 30;
}
else
else if (game.menupage < 12)
{
game.menupage = 31;
}
else
{
graphics.resumegamemode = true;
}
}
}
else