From 30abc8a64b4517d2551d6a0f50608e076aa6d67e Mon Sep 17 00:00:00 2001 From: NyakoFox Date: Sun, 29 Sep 2024 17:20:43 -0300 Subject: [PATCH] Add checkpoint saving option to touch controls --- desktop_version/src/Game.cpp | 1 + desktop_version/src/Input.cpp | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp index c2749c2f..52eebc0e 100644 --- a/desktop_version/src/Game.cpp +++ b/desktop_version/src/Game.cpp @@ -6833,6 +6833,7 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ ) touch::create_toggle_button((320 - 160) / 2, 120 - 32, 160, 12, loc::gettext("limit to 30 fps"), offset, !over30mode); touch::create_toggle_button((320 - 160) / 2, 120 - 32 + 16, 160, 12, loc::gettext("translucent room name bg"), -3, graphics.translucentroomname); + touch::create_toggle_button((320 - 160) / 2, 120 - 32 + 32, 160, 12, loc::gettext("checkpoint saving"), -4, checkpoint_saving); touch::create_menu_button(46 - 16, 200, 76, 26, loc::gettext("previous"), -2); touch::create_menu_button(122, 200, 76, 26, loc::gettext("return"), offset + 5); diff --git a/desktop_version/src/Input.cpp b/desktop_version/src/Input.cpp index f4adf85f..0d06d37c 100644 --- a/desktop_version/src/Input.cpp +++ b/desktop_version/src/Input.cpp @@ -1107,6 +1107,13 @@ void menuactionpress(void) graphics.translucentroomname = !graphics.translucentroomname; game.savestatsandsettings_menu(); } + if (game.currentmenuoption == -4) + { + // For touch: toggle checkpoint saving + music.playef(Sound_VIRIDIAN); + game.checkpoint_saving = !game.checkpoint_saving; + game.savestatsandsettings_menu(); + } break; }