From 28c8afbb8b576c73f1cd72b4a3e6329785048e56 Mon Sep 17 00:00:00 2001 From: Tacoman369 <90735287+Tacoman369@users.noreply.github.com> Date: Tue, 18 Aug 2026 21:32:24 -0500 Subject: [PATCH] Excluded Location Menus - Separates the Excluded Locations Menu into separate menus based on group for easier use. --- source/include/item_location.hpp | 2 +- source/include/menu.hpp | 1 + source/include/settings.hpp | 21 ++++++- source/menu.cpp | 45 ++++++++------- source/playthrough.cpp | 2 +- source/preset.cpp | 4 +- source/settings.cpp | 95 ++++++++++++++++++++++++++++---- source/spoiler_log.cpp | 18 +++--- 8 files changed, 143 insertions(+), 45 deletions(-) diff --git a/source/include/item_location.hpp b/source/include/item_location.hpp index de33fbd..e28a8f8 100644 --- a/source/include/item_location.hpp +++ b/source/include/item_location.hpp @@ -357,7 +357,7 @@ class ItemLocation { excludedOption = Option::Bool(settingText, { "Include", "Exclude" }, { desc }); } - Settings::excludeLocationsOptions.push_back(&excludedOption); + Settings::excludeLocationsOptionsVector[collectionCheckGroup].push_back(&excludedOption); } static auto Base(u8 scene, u8 flag, bool repeatable, std::string&& name, const HintKey hintKey, const ItemKey vanillaItem, std::vector&& categories, SpoilerCollectionCheck collectionCheck = SpoilerCollectionCheck(), SpoilerCollectionCheckGroup collectionCheckGroup = SpoilerCollectionCheckGroup::GROUP_NO_GROUP) { diff --git a/source/include/menu.hpp b/source/include/menu.hpp index 67066ca..7b5945e 100644 --- a/source/include/menu.hpp +++ b/source/include/menu.hpp @@ -13,6 +13,7 @@ #define POST_GENERATE 7 #define RESET_TO_DEFAULTS 8 #define MAX_MAINMENU_SETTINGS_ON_SCREEN 20 +#define MAX_SUBMENUS_ON_SCREEN 27 #define MAX_SUBMENU_SETTINGS_ON_SCREEN 13 #define TOP_WIDTH 50 #define BOTTOM_WIDTH 40 diff --git a/source/include/settings.hpp b/source/include/settings.hpp index c6fc5a9..169e09c 100644 --- a/source/include/settings.hpp +++ b/source/include/settings.hpp @@ -241,12 +241,27 @@ class Menu { Menu(std::string name_, MenuType type_, u8 mode_) : name(std::move(name_)), type(type_), mode(mode_) {} + void ResetMenuIndex() { + if (mode == OPTION_SUB_MENU) { + for (size_t i = 0; i < settingsList->size(); i++) { + if (!settingsList->at(i)->IsLocked() && !settingsList->at(i)->IsHidden()) { + menuIdx = i; + settingBound = i; + return; + } + } + } + menuIdx = 0; + settingBound = 0; + } + std::string name; MenuType type; std::vector