Skip to content

Commit

Permalink
Add checkpoint saving option to touch controls
Browse files Browse the repository at this point in the history
  • Loading branch information
NyakoFox committed Sep 29, 2024
1 parent 9f9c813 commit 30abc8a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions desktop_version/src/Game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
7 changes: 7 additions & 0 deletions desktop_version/src/Input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 30abc8a

Please sign in to comment.