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