1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 18:19:43 +01:00

Don't close ingame menu when pressing confirm btn

For some reason, the code that handled button presses for the ingame
menu checked the confirm button in the wrong places.
This commit is contained in:
NyakoFox 2024-04-02 18:52:46 -03:00
parent 9c83a4bfed
commit 1412c90a92

View file

@ -3169,7 +3169,7 @@ void mapinput(void)
|| (game.menupage >= 20 && game.menupage <= 21) || (game.menupage >= 20 && game.menupage <= 21)
|| (game.menupage >= 30 && game.menupage <= 32)) || (game.menupage >= 30 && game.menupage <= 32))
{ {
if (key.isDown(KEYBOARD_ENTER) || key.isDown(game.controllerButton_map) || touch::button_tapped(TOUCH_BUTTON_CONFIRM)) game.press_map = true; if (key.isDown(KEYBOARD_ENTER) || key.isDown(game.controllerButton_map)) game.press_map = true;
if ((key.isDown(27) || touch::button_tapped(TOUCH_BUTTON_CANCEL)) && !game.mapheld) if ((key.isDown(27) || touch::button_tapped(TOUCH_BUTTON_CANCEL)) && !game.mapheld)
{ {
game.mapheld = true; game.mapheld = true;
@ -3192,7 +3192,7 @@ void mapinput(void)
else else
{ {
if (key.isDown(KEYBOARD_ENTER) || key.isDown(27) || key.isDown(game.controllerButton_map) if (key.isDown(KEYBOARD_ENTER) || key.isDown(27) || key.isDown(game.controllerButton_map)
|| touch::button_tapped(TOUCH_BUTTON_CANCEL) || touch::button_tapped(TOUCH_BUTTON_CONFIRM)) || touch::button_tapped(TOUCH_BUTTON_CANCEL))
{ {
game.press_map = true; game.press_map = true;
} }