Skip to content

Commit

Permalink
Reset all profiles (#1565)
Browse files Browse the repository at this point in the history
Co-authored-by: Semphris <semphris@protonmail.com>
  • Loading branch information
Semphriss and Semphris committed Oct 25, 2020
1 parent 1833f93 commit 0922268
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/supertux/menu/profile_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ ProfileMenu::ProfileMenu()
}
add_hl();
add_entry(6, _("Reset profile"));
add_entry(7, _("Reset all profiles"));

add_hl();
add_back(_("Back"));
Expand All @@ -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();
}

Expand Down

0 comments on commit 0922268

Please sign in to comment.