diff --git a/TrainingModpackOverlay/include/taunt_toggles.hpp b/TrainingModpackOverlay/include/taunt_toggles.hpp index dd45350..a673f60 100644 --- a/TrainingModpackOverlay/include/taunt_toggles.hpp +++ b/TrainingModpackOverlay/include/taunt_toggles.hpp @@ -199,7 +199,7 @@ and specials when hitbox visualization is active.)""""; // Save states -const std::vector save_state_items{""}; +const std::vector empty_items{""}; const std::string save_states_help = R""""( Press Grab + Down Taunt at any time to save the state of the @@ -216,6 +216,13 @@ are saved: - Position - Facing direction)""""; +const std::string reset_menu_help = R""""( +Reset menu to default +configuration. Please also +use on the first boot after +upgrading Training Modpack +versions.)""""; + // OOS const std::string oos_help = R""""( Option to delay oos options diff --git a/TrainingModpackOverlay/source/gui_main.cpp b/TrainingModpackOverlay/source/gui_main.cpp index 960dd04..c343d9a 100644 --- a/TrainingModpackOverlay/source/gui_main.cpp +++ b/TrainingModpackOverlay/source/gui_main.cpp @@ -26,6 +26,8 @@ static struct TrainingModpackMenu BoolFlags FULL_HOP = BoolFlags::None; } menu; +static struct TrainingModpackMenu defaultMenu = menu; + static int FRAME_ADVANTAGE = 0; u64 pidSmash = 0; @@ -430,7 +432,7 @@ tsl::elm::Element* GuiMain::createUI() valueListItems.push_back(hitboxItem); ClickableListItem* saveStateItem = new ClickableListItem( - "Save States", save_state_items, nullptr, "saveStates", 0, "Save States", save_states_help); + "Save States", empty_items, nullptr, "saveStates", 0, "Save States", save_states_help); saveStateItem->setClickListener([](std::vector values, int* curValue, std::string extdata, @@ -440,6 +442,23 @@ tsl::elm::Element* GuiMain::createUI() saveStateItem->setHelpListener([](std::string title, std::string help) { tsl::changeTo(title, help); }); list->addItem(saveStateItem); + ClickableListItem* resetMenuItem = new ClickableListItem("Reset Menu", + empty_items, + nullptr, + "resetMenu", + 0, + "Reset Menu", + reset_menu_help); + resetMenuItem->setClickListener([](std::vector values, + int* curValue, + std::string extdata, + int index, + std::string title, + std::string help) { menu = defaultMenu; }); + resetMenuItem->setHelpListener( + [](std::string title, std::string help) { tsl::changeTo(title, help); }); + list->addItem(resetMenuItem); + rootFrame->setContent(list); } else