From 09222684d4a9b43c1f89e1ab79579a38379a502d Mon Sep 17 00:00:00 2001 From: Semphriss <66701383+Semphriss@users.noreply.github.com> Date: Sun, 25 Oct 2020 23:48:42 +0000 Subject: [PATCH] Reset all profiles (#1565) Co-authored-by: Semphris --- src/supertux/menu/profile_menu.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/supertux/menu/profile_menu.cpp b/src/supertux/menu/profile_menu.cpp index 6107959e8b2..f1f26cb9d5b 100644 --- a/src/supertux/menu/profile_menu.cpp +++ b/src/supertux/menu/profile_menu.cpp @@ -48,6 +48,7 @@ ProfileMenu::ProfileMenu() } add_hl(); add_entry(6, _("Reset profile")); + add_entry(7, _("Reset all profiles")); add_hl(); add_back(_("Back")); @@ -67,6 +68,14 @@ ProfileMenu::menu_action(MenuItem& item) delete_savegames(g_config->profile); }); } + else if(id == 7) + { + Dialog::show_confirmation(_("This will reset your game progress on all profiles. Are you sure?"), [this]() { + for (int i = 1; i <= 5; i++) { + delete_savegames(i); + } + }); + } MenuManager::instance().clear_menu_stack(); }