mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-06 04:51:30 -07:00
Move all maps from Menu.h to the source files that use them. (#5644)
This commit is contained in:
parent
ec54d02c0c
commit
237dcfec74
6 changed files with 214 additions and 165 deletions
|
@ -27,7 +27,6 @@ void disableBetaQuest();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace SohGui {
|
namespace SohGui {
|
||||||
|
|
||||||
static std::unordered_map<int32_t, const char*> languages = {
|
static std::unordered_map<int32_t, const char*> languages = {
|
||||||
{ LANGUAGE_ENG, "English" },
|
{ LANGUAGE_ENG, "English" },
|
||||||
{ LANGUAGE_GER, "German" },
|
{ LANGUAGE_GER, "German" },
|
||||||
|
@ -35,164 +34,6 @@ static std::unordered_map<int32_t, const char*> languages = {
|
||||||
{ LANGUAGE_JPN, "Japanese" },
|
{ LANGUAGE_JPN, "Japanese" },
|
||||||
};
|
};
|
||||||
|
|
||||||
static const std::unordered_map<int32_t, const char*> menuThemeOptions = {
|
|
||||||
{ UIWidgets::Colors::Red, "Red" },
|
|
||||||
{ UIWidgets::Colors::DarkRed, "Dark Red" },
|
|
||||||
{ UIWidgets::Colors::Orange, "Orange" },
|
|
||||||
{ UIWidgets::Colors::Green, "Green" },
|
|
||||||
{ UIWidgets::Colors::DarkGreen, "Dark Green" },
|
|
||||||
{ UIWidgets::Colors::LightBlue, "Light Blue" },
|
|
||||||
{ UIWidgets::Colors::Blue, "Blue" },
|
|
||||||
{ UIWidgets::Colors::DarkBlue, "Dark Blue" },
|
|
||||||
{ UIWidgets::Colors::Indigo, "Indigo" },
|
|
||||||
{ UIWidgets::Colors::Violet, "Violet" },
|
|
||||||
{ UIWidgets::Colors::Purple, "Purple" },
|
|
||||||
{ UIWidgets::Colors::Brown, "Brown" },
|
|
||||||
{ UIWidgets::Colors::Gray, "Gray" },
|
|
||||||
{ UIWidgets::Colors::DarkGray, "Dark Gray" },
|
|
||||||
};
|
|
||||||
|
|
||||||
static const std::unordered_map<int32_t, const char*> textureFilteringMap = {
|
|
||||||
{ Fast::FILTER_THREE_POINT, "Three-Point" },
|
|
||||||
{ Fast::FILTER_LINEAR, "Linear" },
|
|
||||||
{ Fast::FILTER_NONE, "None" },
|
|
||||||
};
|
|
||||||
|
|
||||||
static const std::unordered_map<int32_t, const char*> logLevels = {
|
|
||||||
{ DEBUG_LOG_TRACE, "Trace" }, { DEBUG_LOG_DEBUG, "Debug" }, { DEBUG_LOG_INFO, "Info" },
|
|
||||||
{ DEBUG_LOG_WARN, "Warn" }, { DEBUG_LOG_ERROR, "Error" }, { DEBUG_LOG_CRITICAL, "Critical" },
|
|
||||||
{ DEBUG_LOG_OFF, "Off" },
|
|
||||||
};
|
|
||||||
|
|
||||||
static const std::unordered_map<int32_t, const char*> notificationPosition = {
|
|
||||||
{ 0, "Top Left" }, { 1, "Top Right" }, { 2, "Bottom Left" }, { 3, "Bottom Right" }, { 4, "Hidden" },
|
|
||||||
};
|
|
||||||
|
|
||||||
static const std::unordered_map<int32_t, const char*> dekuStickCheat = {
|
|
||||||
{ DEKU_STICK_NORMAL, "Normal" },
|
|
||||||
{ DEKU_STICK_UNBREAKABLE, "Unbreakable" },
|
|
||||||
{ DEKU_STICK_UNBREAKABLE_AND_ALWAYS_ON_FIRE, "Unbreakable + Always on Fire" },
|
|
||||||
};
|
|
||||||
|
|
||||||
static const std::unordered_map<int32_t, const char*> skipForcedDialogOptions = {
|
|
||||||
{ FORCED_DIALOG_SKIP_NONE, "None" },
|
|
||||||
{ FORCED_DIALOG_SKIP_NAVI, "Navi" },
|
|
||||||
{ FORCED_DIALOG_SKIP_NPC, "NPCs" },
|
|
||||||
{ FORCED_DIALOG_SKIP_ALL, "All" },
|
|
||||||
};
|
|
||||||
|
|
||||||
static const std::unordered_map<int32_t, const char*> skipGetItemAnimationOptions = {
|
|
||||||
{ SGIA_DISABLED, "Disabled" },
|
|
||||||
{ SGIA_JUNK, "Junk Items" },
|
|
||||||
{ SGIA_ALL, "All Items" },
|
|
||||||
};
|
|
||||||
|
|
||||||
static const std::unordered_map<int32_t, const char*> chestStyleMatchesContentsOptions = {
|
|
||||||
{ CSMC_DISABLED, "Disabled" },
|
|
||||||
{ CSMC_BOTH, "Both" },
|
|
||||||
{ CSMC_TEXTURE, "Texture Only" },
|
|
||||||
{ CSMC_SIZE, "Size Only" },
|
|
||||||
};
|
|
||||||
|
|
||||||
static const std::unordered_map<int32_t, const char*> timeTravelOptions = {
|
|
||||||
{ TIME_TRAVEL_DISABLED, "Disabled" },
|
|
||||||
{ TIME_TRAVEL_OOT, "Ocarina of Time" },
|
|
||||||
{ TIME_TRAVEL_ANY, "Any Ocarina" },
|
|
||||||
};
|
|
||||||
|
|
||||||
static const std::unordered_map<int32_t, const char*> sleepingWaterfallOptions = {
|
|
||||||
{ WATERFALL_ALWAYS, "Always" },
|
|
||||||
{ WATERFALL_ONCE, "Once" },
|
|
||||||
{ WATERFALL_NEVER, "Never" },
|
|
||||||
};
|
|
||||||
|
|
||||||
static const std::unordered_map<int32_t, const char*> allPowers = {
|
|
||||||
{ DAMAGE_VANILLA, "Vanilla (1x)" }, { DAMAGE_DOUBLE, "Double (2x)" },
|
|
||||||
{ DAMAGE_QUADRUPLE, "Quadruple (4x)" }, { DAMAGE_OCTUPLE, "Octuple (8x)" },
|
|
||||||
{ DAMAGE_FOOLISH, "Foolish (16x)" }, { DAMAGE_RIDICULOUS, "Ridiculous (32x)" },
|
|
||||||
{ DAMAGE_MERCILESS, "Merciless (64x)" }, { DAMAGE_TORTURE, "Pure Torture (128x)" },
|
|
||||||
{ DAMAGE_OHKO, "OHKO (256x)" },
|
|
||||||
};
|
|
||||||
|
|
||||||
static const std::unordered_map<int32_t, const char*> subPowers = {
|
|
||||||
{ DAMAGE_VANILLA, "Vanilla (1x)" }, { DAMAGE_DOUBLE, "Double (2x)" },
|
|
||||||
{ DAMAGE_QUADRUPLE, "Quadruple (4x)" }, { DAMAGE_OCTUPLE, "Octuple (8x)" },
|
|
||||||
{ DAMAGE_FOOLISH, "Foolish (16x)" }, { DAMAGE_RIDICULOUS, "Ridiculous (32x)" },
|
|
||||||
{ DAMAGE_MERCILESS, "Merciless (64x)" }, { DAMAGE_TORTURE, "Pure Torture (128x)" },
|
|
||||||
};
|
|
||||||
|
|
||||||
static const std::unordered_map<int32_t, const char*> subSubPowers = {
|
|
||||||
{ DAMAGE_VANILLA, "Vanilla (1x)" }, { DAMAGE_DOUBLE, "Double (2x)" },
|
|
||||||
{ DAMAGE_QUADRUPLE, "Quadruple (4x)" }, { DAMAGE_OCTUPLE, "Octuple (8x)" },
|
|
||||||
{ DAMAGE_FOOLISH, "Foolish (16x)" }, { DAMAGE_RIDICULOUS, "Ridiculous (32x)" },
|
|
||||||
{ DAMAGE_MERCILESS, "Merciless (64x)" },
|
|
||||||
};
|
|
||||||
|
|
||||||
static const std::unordered_map<int32_t, const char*> bonkDamageValues = {
|
|
||||||
{ BONK_DAMAGE_NONE, "No Damage" }, { BONK_DAMAGE_QUARTER_HEART, "0.25 Hearts" },
|
|
||||||
{ BONK_DAMAGE_HALF_HEART, "0.5 Hearts" }, { BONK_DAMAGE_1_HEART, "1 Heart" },
|
|
||||||
{ BONK_DAMAGE_2_HEARTS, "2 Hearts" }, { BONK_DAMAGE_4_HEARTS, "4 Hearts" },
|
|
||||||
{ BONK_DAMAGE_8_HEARTS, "8 Hearts" }, { BONK_DAMAGE_OHKO, "OHKO" },
|
|
||||||
};
|
|
||||||
|
|
||||||
static const std::unordered_map<int32_t, const char*> dampeDropRates = {
|
|
||||||
{ DAMPE_NONE, "None" },
|
|
||||||
{ DAMPE_NORMAL, "Vanilla" },
|
|
||||||
{ DAMPE_JALAPENO, "Jalapeño" },
|
|
||||||
{ DAMPE_CHIPOTLE, "Serrano" },
|
|
||||||
{ DAMPE_SCOTCH_BONNET, "Habanero" },
|
|
||||||
{ DAMPE_GHOST_PEPPER, "Ghost Pepper" },
|
|
||||||
{ DAMPE_INFERNO, "Dampe's Inferno" },
|
|
||||||
};
|
|
||||||
|
|
||||||
static const std::unordered_map<int32_t, const char*> cursorAnywhereValues = {
|
|
||||||
{ PAUSE_ANY_CURSOR_RANDO_ONLY, "Only in Rando" },
|
|
||||||
{ PAUSE_ANY_CURSOR_ALWAYS_ON, "Always" },
|
|
||||||
{ PAUSE_ANY_CURSOR_ALWAYS_OFF, "Never" },
|
|
||||||
};
|
|
||||||
|
|
||||||
static const std::unordered_map<int32_t, const char*> swordToggleModes = {
|
|
||||||
{ SWORD_TOGGLE_NONE, "None" },
|
|
||||||
{ SWORD_TOGGLE_CHILD, "Child Toggle" },
|
|
||||||
{ SWORD_TOGGLE_BOTH_AGES, "Both Ages" },
|
|
||||||
};
|
|
||||||
|
|
||||||
static const std::unordered_map<int32_t, const char*> zFightingOptions = {
|
|
||||||
{ ZFIGHT_FIX_DISABLED, "Disabled" },
|
|
||||||
{ ZFIGHT_FIX_CONSISTENT_VANISH, "Consistent Vanish" },
|
|
||||||
{ ZFIGHT_FIX_NO_VANISH, "No Vanish" },
|
|
||||||
};
|
|
||||||
|
|
||||||
static const std::unordered_map<int32_t, const char*> mirroredWorldModes = {
|
|
||||||
{ MIRRORED_WORLD_OFF, "Disabled" },
|
|
||||||
{ MIRRORED_WORLD_ALWAYS, "Always" },
|
|
||||||
{ MIRRORED_WORLD_RANDOM, "Random" },
|
|
||||||
{ MIRRORED_WORLD_RANDOM_SEEDED, "Random (Seeded)" },
|
|
||||||
{ MIRRORED_WORLD_DUNGEONS_ALL, "Dungeons" },
|
|
||||||
{ MIRRORED_WORLD_DUNGEONS_VANILLA, "Dungeons (Vanilla)" },
|
|
||||||
{ MIRRORED_WORLD_DUNGEONS_MQ, "Dungeons (MQ)" },
|
|
||||||
{ MIRRORED_WORLD_DUNGEONS_RANDOM, "Dungeons Random" },
|
|
||||||
{ MIRRORED_WORLD_DUNGEONS_RANDOM_SEEDED, "Dungeons Random (Seeded)" },
|
|
||||||
};
|
|
||||||
|
|
||||||
static const std::unordered_map<int32_t, const char*> enemyRandomizerModes = {
|
|
||||||
{ ENEMY_RANDOMIZER_OFF, "Disabled" },
|
|
||||||
{ ENEMY_RANDOMIZER_RANDOM, "Random" },
|
|
||||||
{ ENEMY_RANDOMIZER_RANDOM_SEEDED, "Random (Seeded)" },
|
|
||||||
};
|
|
||||||
|
|
||||||
static const std::unordered_map<int32_t, const char*> debugSaveFileModes = {
|
|
||||||
{ 0, "Off" },
|
|
||||||
{ 1, "Vanilla" },
|
|
||||||
{ 2, "Maxed" },
|
|
||||||
};
|
|
||||||
|
|
||||||
static const std::unordered_map<int32_t, const char*> bootSequenceLabels = {
|
|
||||||
{ BOOTSEQUENCE_DEFAULT, "Default" },
|
|
||||||
{ BOOTSEQUENCE_AUTHENTIC, "Authentic" },
|
|
||||||
{ BOOTSEQUENCE_FILESELECT, "File Select" },
|
|
||||||
};
|
|
||||||
|
|
||||||
class SohMenu : public Ship::Menu {
|
class SohMenu : public Ship::Menu {
|
||||||
public:
|
public:
|
||||||
SohMenu(const std::string& consoleVariable, const std::string& name);
|
SohMenu(const std::string& consoleVariable, const std::string& name);
|
||||||
|
|
|
@ -5,6 +5,18 @@ namespace SohGui {
|
||||||
extern std::shared_ptr<SohMenu> mSohMenu;
|
extern std::shared_ptr<SohMenu> mSohMenu;
|
||||||
using namespace UIWidgets;
|
using namespace UIWidgets;
|
||||||
|
|
||||||
|
static const std::unordered_map<int32_t, const char*> logLevels = {
|
||||||
|
{ DEBUG_LOG_TRACE, "Trace" }, { DEBUG_LOG_DEBUG, "Debug" }, { DEBUG_LOG_INFO, "Info" },
|
||||||
|
{ DEBUG_LOG_WARN, "Warn" }, { DEBUG_LOG_ERROR, "Error" }, { DEBUG_LOG_CRITICAL, "Critical" },
|
||||||
|
{ DEBUG_LOG_OFF, "Off" },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const std::unordered_map<int32_t, const char*> debugSaveFileModes = {
|
||||||
|
{ 0, "Off" },
|
||||||
|
{ 1, "Vanilla" },
|
||||||
|
{ 2, "Maxed" },
|
||||||
|
};
|
||||||
|
|
||||||
void SohMenu::AddMenuDevTools() {
|
void SohMenu::AddMenuDevTools() {
|
||||||
// Add Dev Tools Menu
|
// Add Dev Tools Menu
|
||||||
AddMenuEntry("Dev Tools", CVAR_SETTING("Menu.DevToolsSidebarSection"));
|
AddMenuEntry("Dev Tools", CVAR_SETTING("Menu.DevToolsSidebarSection"));
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "SohMenu.h"
|
#include "SohMenu.h"
|
||||||
#include <soh/Enhancements/mods.h>
|
#include <soh/Enhancements/mods.h>
|
||||||
#include <soh/Enhancements/game-interactor/GameInteractor.h>
|
#include <soh/Enhancements/game-interactor/GameInteractor.h>
|
||||||
#include <soh/OTRGlobals.h>
|
#include <soh/OTRGlobals.h>
|
||||||
|
@ -12,11 +12,6 @@
|
||||||
|
|
||||||
static std::string comboboxTooltip = "";
|
static std::string comboboxTooltip = "";
|
||||||
bool isBetaQuestEnabled = false;
|
bool isBetaQuestEnabled = false;
|
||||||
static std::unordered_map<int32_t, const char*> bunnyHoodEffectMap = {
|
|
||||||
{ BUNNY_HOOD_VANILLA, "Vanilla" },
|
|
||||||
{ BUNNY_HOOD_FAST, "Faster Run" },
|
|
||||||
{ BUNNY_HOOD_FAST_AND_JUMP, "Faster + Longer Jump" },
|
|
||||||
};
|
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
void enableBetaQuest() {
|
void enableBetaQuest() {
|
||||||
|
@ -32,6 +27,119 @@ namespace SohGui {
|
||||||
extern std::shared_ptr<SohMenu> mSohMenu;
|
extern std::shared_ptr<SohMenu> mSohMenu;
|
||||||
using namespace UIWidgets;
|
using namespace UIWidgets;
|
||||||
|
|
||||||
|
static std::unordered_map<int32_t, const char*> bunnyHoodEffectMap = {
|
||||||
|
{ BUNNY_HOOD_VANILLA, "Vanilla" },
|
||||||
|
{ BUNNY_HOOD_FAST, "Faster Run" },
|
||||||
|
{ BUNNY_HOOD_FAST_AND_JUMP, "Faster + Longer Jump" },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const std::unordered_map<int32_t, const char*> dekuStickCheat = {
|
||||||
|
{ DEKU_STICK_NORMAL, "Normal" },
|
||||||
|
{ DEKU_STICK_UNBREAKABLE, "Unbreakable" },
|
||||||
|
{ DEKU_STICK_UNBREAKABLE_AND_ALWAYS_ON_FIRE, "Unbreakable + Always on Fire" },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const std::unordered_map<int32_t, const char*> skipForcedDialogOptions = {
|
||||||
|
{ FORCED_DIALOG_SKIP_NONE, "None" },
|
||||||
|
{ FORCED_DIALOG_SKIP_NAVI, "Navi" },
|
||||||
|
{ FORCED_DIALOG_SKIP_NPC, "NPCs" },
|
||||||
|
{ FORCED_DIALOG_SKIP_ALL, "All" },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const std::unordered_map<int32_t, const char*> chestStyleMatchesContentsOptions = {
|
||||||
|
{ CSMC_DISABLED, "Disabled" },
|
||||||
|
{ CSMC_BOTH, "Both" },
|
||||||
|
{ CSMC_TEXTURE, "Texture Only" },
|
||||||
|
{ CSMC_SIZE, "Size Only" },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const std::unordered_map<int32_t, const char*> timeTravelOptions = {
|
||||||
|
{ TIME_TRAVEL_DISABLED, "Disabled" },
|
||||||
|
{ TIME_TRAVEL_OOT, "Ocarina of Time" },
|
||||||
|
{ TIME_TRAVEL_ANY, "Any Ocarina" },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const std::unordered_map<int32_t, const char*> sleepingWaterfallOptions = {
|
||||||
|
{ WATERFALL_ALWAYS, "Always" },
|
||||||
|
{ WATERFALL_ONCE, "Once" },
|
||||||
|
{ WATERFALL_NEVER, "Never" },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const std::unordered_map<int32_t, const char*> allPowers = {
|
||||||
|
{ DAMAGE_VANILLA, "Vanilla (1x)" }, { DAMAGE_DOUBLE, "Double (2x)" },
|
||||||
|
{ DAMAGE_QUADRUPLE, "Quadruple (4x)" }, { DAMAGE_OCTUPLE, "Octuple (8x)" },
|
||||||
|
{ DAMAGE_FOOLISH, "Foolish (16x)" }, { DAMAGE_RIDICULOUS, "Ridiculous (32x)" },
|
||||||
|
{ DAMAGE_MERCILESS, "Merciless (64x)" }, { DAMAGE_TORTURE, "Pure Torture (128x)" },
|
||||||
|
{ DAMAGE_OHKO, "OHKO (256x)" },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const std::unordered_map<int32_t, const char*> subPowers = {
|
||||||
|
{ DAMAGE_VANILLA, "Vanilla (1x)" }, { DAMAGE_DOUBLE, "Double (2x)" },
|
||||||
|
{ DAMAGE_QUADRUPLE, "Quadruple (4x)" }, { DAMAGE_OCTUPLE, "Octuple (8x)" },
|
||||||
|
{ DAMAGE_FOOLISH, "Foolish (16x)" }, { DAMAGE_RIDICULOUS, "Ridiculous (32x)" },
|
||||||
|
{ DAMAGE_MERCILESS, "Merciless (64x)" }, { DAMAGE_TORTURE, "Pure Torture (128x)" },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const std::unordered_map<int32_t, const char*> subSubPowers = {
|
||||||
|
{ DAMAGE_VANILLA, "Vanilla (1x)" }, { DAMAGE_DOUBLE, "Double (2x)" },
|
||||||
|
{ DAMAGE_QUADRUPLE, "Quadruple (4x)" }, { DAMAGE_OCTUPLE, "Octuple (8x)" },
|
||||||
|
{ DAMAGE_FOOLISH, "Foolish (16x)" }, { DAMAGE_RIDICULOUS, "Ridiculous (32x)" },
|
||||||
|
{ DAMAGE_MERCILESS, "Merciless (64x)" },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const std::unordered_map<int32_t, const char*> bonkDamageValues = {
|
||||||
|
{ BONK_DAMAGE_NONE, "No Damage" }, { BONK_DAMAGE_QUARTER_HEART, "0.25 Hearts" },
|
||||||
|
{ BONK_DAMAGE_HALF_HEART, "0.5 Hearts" }, { BONK_DAMAGE_1_HEART, "1 Heart" },
|
||||||
|
{ BONK_DAMAGE_2_HEARTS, "2 Hearts" }, { BONK_DAMAGE_4_HEARTS, "4 Hearts" },
|
||||||
|
{ BONK_DAMAGE_8_HEARTS, "8 Hearts" }, { BONK_DAMAGE_OHKO, "OHKO" },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const std::unordered_map<int32_t, const char*> dampeDropRates = {
|
||||||
|
{ DAMPE_NONE, "None" },
|
||||||
|
{ DAMPE_NORMAL, "Vanilla" },
|
||||||
|
{ DAMPE_JALAPENO, "Jalapeño" },
|
||||||
|
{ DAMPE_CHIPOTLE, "Serrano" },
|
||||||
|
{ DAMPE_SCOTCH_BONNET, "Habanero" },
|
||||||
|
{ DAMPE_GHOST_PEPPER, "Ghost Pepper" },
|
||||||
|
{ DAMPE_INFERNO, "Dampe's Inferno" },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const std::unordered_map<int32_t, const char*> cursorAnywhereValues = {
|
||||||
|
{ PAUSE_ANY_CURSOR_RANDO_ONLY, "Only in Rando" },
|
||||||
|
{ PAUSE_ANY_CURSOR_ALWAYS_ON, "Always" },
|
||||||
|
{ PAUSE_ANY_CURSOR_ALWAYS_OFF, "Never" },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const std::unordered_map<int32_t, const char*> zFightingOptions = {
|
||||||
|
{ ZFIGHT_FIX_DISABLED, "Disabled" },
|
||||||
|
{ ZFIGHT_FIX_CONSISTENT_VANISH, "Consistent Vanish" },
|
||||||
|
{ ZFIGHT_FIX_NO_VANISH, "No Vanish" },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const std::unordered_map<int32_t, const char*> swordToggleModes = {
|
||||||
|
{ SWORD_TOGGLE_NONE, "None" },
|
||||||
|
{ SWORD_TOGGLE_CHILD, "Child Toggle" },
|
||||||
|
{ SWORD_TOGGLE_BOTH_AGES, "Both Ages" },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const std::unordered_map<int32_t, const char*> mirroredWorldModes = {
|
||||||
|
{ MIRRORED_WORLD_OFF, "Disabled" },
|
||||||
|
{ MIRRORED_WORLD_ALWAYS, "Always" },
|
||||||
|
{ MIRRORED_WORLD_RANDOM, "Random" },
|
||||||
|
{ MIRRORED_WORLD_RANDOM_SEEDED, "Random (Seeded)" },
|
||||||
|
{ MIRRORED_WORLD_DUNGEONS_ALL, "Dungeons" },
|
||||||
|
{ MIRRORED_WORLD_DUNGEONS_VANILLA, "Dungeons (Vanilla)" },
|
||||||
|
{ MIRRORED_WORLD_DUNGEONS_MQ, "Dungeons (MQ)" },
|
||||||
|
{ MIRRORED_WORLD_DUNGEONS_RANDOM, "Dungeons Random" },
|
||||||
|
{ MIRRORED_WORLD_DUNGEONS_RANDOM_SEEDED, "Dungeons Random (Seeded)" },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const std::unordered_map<int32_t, const char*> enemyRandomizerModes = {
|
||||||
|
{ ENEMY_RANDOMIZER_OFF, "Disabled" },
|
||||||
|
{ ENEMY_RANDOMIZER_RANDOM, "Random" },
|
||||||
|
{ ENEMY_RANDOMIZER_RANDOM_SEEDED, "Random (Seeded)" },
|
||||||
|
};
|
||||||
|
|
||||||
void SohMenu::AddMenuEnhancements() {
|
void SohMenu::AddMenuEnhancements() {
|
||||||
// Add Enhancements Menu
|
// Add Enhancements Menu
|
||||||
AddMenuEntry("Enhancements", CVAR_SETTING("Menu.EnhancementsSidebarSection"));
|
AddMenuEntry("Enhancements", CVAR_SETTING("Menu.EnhancementsSidebarSection"));
|
||||||
|
|
|
@ -6,6 +6,12 @@ namespace SohGui {
|
||||||
extern std::shared_ptr<SohMenu> mSohMenu;
|
extern std::shared_ptr<SohMenu> mSohMenu;
|
||||||
using namespace UIWidgets;
|
using namespace UIWidgets;
|
||||||
|
|
||||||
|
static const std::unordered_map<int32_t, const char*> skipGetItemAnimationOptions = {
|
||||||
|
{ SGIA_DISABLED, "Disabled" },
|
||||||
|
{ SGIA_JUNK, "Junk Items" },
|
||||||
|
{ SGIA_ALL, "All Items" },
|
||||||
|
};
|
||||||
|
|
||||||
void SohMenu::AddMenuRandomizer() {
|
void SohMenu::AddMenuRandomizer() {
|
||||||
// Add Randomizer Menu
|
// Add Randomizer Menu
|
||||||
AddMenuEntry("Randomizer", CVAR_SETTING("Menu.RandomizerSidebarSection"));
|
AddMenuEntry("Randomizer", CVAR_SETTING("Menu.RandomizerSidebarSection"));
|
||||||
|
|
|
@ -23,6 +23,39 @@ static std::unordered_map<int32_t, const char*> imguiScaleOptions = {
|
||||||
{ 3, "X-Large" },
|
{ 3, "X-Large" },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const std::unordered_map<int32_t, const char*> menuThemeOptions = {
|
||||||
|
{ UIWidgets::Colors::Red, "Red" },
|
||||||
|
{ UIWidgets::Colors::DarkRed, "Dark Red" },
|
||||||
|
{ UIWidgets::Colors::Orange, "Orange" },
|
||||||
|
{ UIWidgets::Colors::Green, "Green" },
|
||||||
|
{ UIWidgets::Colors::DarkGreen, "Dark Green" },
|
||||||
|
{ UIWidgets::Colors::LightBlue, "Light Blue" },
|
||||||
|
{ UIWidgets::Colors::Blue, "Blue" },
|
||||||
|
{ UIWidgets::Colors::DarkBlue, "Dark Blue" },
|
||||||
|
{ UIWidgets::Colors::Indigo, "Indigo" },
|
||||||
|
{ UIWidgets::Colors::Violet, "Violet" },
|
||||||
|
{ UIWidgets::Colors::Purple, "Purple" },
|
||||||
|
{ UIWidgets::Colors::Brown, "Brown" },
|
||||||
|
{ UIWidgets::Colors::Gray, "Gray" },
|
||||||
|
{ UIWidgets::Colors::DarkGray, "Dark Gray" },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const std::unordered_map<int32_t, const char*> textureFilteringMap = {
|
||||||
|
{ Fast::FILTER_THREE_POINT, "Three-Point" },
|
||||||
|
{ Fast::FILTER_LINEAR, "Linear" },
|
||||||
|
{ Fast::FILTER_NONE, "None" },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const std::unordered_map<int32_t, const char*> notificationPosition = {
|
||||||
|
{ 0, "Top Left" }, { 1, "Top Right" }, { 2, "Bottom Left" }, { 3, "Bottom Right" }, { 4, "Hidden" },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const std::unordered_map<int32_t, const char*> bootSequenceLabels = {
|
||||||
|
{ BOOTSEQUENCE_DEFAULT, "Default" },
|
||||||
|
{ BOOTSEQUENCE_AUTHENTIC, "Authentic" },
|
||||||
|
{ BOOTSEQUENCE_FILESELECT, "File Select" },
|
||||||
|
};
|
||||||
|
|
||||||
const char* GetGameVersionString(uint32_t index) {
|
const char* GetGameVersionString(uint32_t index) {
|
||||||
uint32_t gameVersion = ResourceMgr_GetGameVersion(index);
|
uint32_t gameVersion = ResourceMgr_GetGameVersion(index);
|
||||||
switch (gameVersion) {
|
switch (gameVersion) {
|
||||||
|
|
|
@ -115,10 +115,12 @@ struct WidgetOptions {
|
||||||
tooltip = tooltip_;
|
tooltip = tooltip_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
WidgetOptions& Disabled(bool disabled_) {
|
WidgetOptions& Disabled(bool disabled_) {
|
||||||
disabled = disabled_;
|
disabled = disabled_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
WidgetOptions& DisabledTooltip(const char* disabledTooltip_) {
|
WidgetOptions& DisabledTooltip(const char* disabledTooltip_) {
|
||||||
disabledTooltip = disabledTooltip_;
|
disabledTooltip = disabledTooltip_;
|
||||||
return *this;
|
return *this;
|
||||||
|
@ -143,14 +145,17 @@ struct ButtonOptions : WidgetOptions {
|
||||||
size = size_;
|
size = size_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
ButtonOptions& Padding(ImVec2 padding_) {
|
ButtonOptions& Padding(ImVec2 padding_) {
|
||||||
padding = padding_;
|
padding = padding_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
ButtonOptions& Tooltip(const char* tooltip_) {
|
ButtonOptions& Tooltip(const char* tooltip_) {
|
||||||
WidgetOptions::tooltip = tooltip_;
|
WidgetOptions::tooltip = tooltip_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
ButtonOptions& Color(Colors color_) {
|
ButtonOptions& Color(Colors color_) {
|
||||||
color = color_;
|
color = color_;
|
||||||
return *this;
|
return *this;
|
||||||
|
@ -168,22 +173,27 @@ struct WindowButtonOptions : WidgetOptions {
|
||||||
size = size_;
|
size = size_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
WindowButtonOptions& Padding(ImVec2 padding_) {
|
WindowButtonOptions& Padding(ImVec2 padding_) {
|
||||||
padding = padding_;
|
padding = padding_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
WindowButtonOptions& Tooltip(const char* tooltip_) {
|
WindowButtonOptions& Tooltip(const char* tooltip_) {
|
||||||
WidgetOptions::tooltip = tooltip_;
|
WidgetOptions::tooltip = tooltip_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
WindowButtonOptions& Color(Colors color_) {
|
WindowButtonOptions& Color(Colors color_) {
|
||||||
color = color_;
|
color = color_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
WindowButtonOptions& ShowButton(bool showButton_) {
|
WindowButtonOptions& ShowButton(bool showButton_) {
|
||||||
showButton = showButton_;
|
showButton = showButton_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
WindowButtonOptions& EmbedWindow(bool embedWindow_) {
|
WindowButtonOptions& EmbedWindow(bool embedWindow_) {
|
||||||
embedWindow = embedWindow_;
|
embedWindow = embedWindow_;
|
||||||
return *this;
|
return *this;
|
||||||
|
@ -201,26 +211,32 @@ struct CheckboxOptions : WidgetOptions {
|
||||||
defaultValue = defaultValue_;
|
defaultValue = defaultValue_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckboxOptions& ComponentAlignment(ComponentAlignments alignment_) {
|
CheckboxOptions& ComponentAlignment(ComponentAlignments alignment_) {
|
||||||
alignment = alignment_;
|
alignment = alignment_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckboxOptions& LabelPosition(LabelPositions labelPosition_) {
|
CheckboxOptions& LabelPosition(LabelPositions labelPosition_) {
|
||||||
labelPosition = labelPosition_;
|
labelPosition = labelPosition_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckboxOptions& Tooltip(const char* tooltip_) {
|
CheckboxOptions& Tooltip(const char* tooltip_) {
|
||||||
WidgetOptions::tooltip = tooltip_;
|
WidgetOptions::tooltip = tooltip_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckboxOptions& Color(Colors color_) {
|
CheckboxOptions& Color(Colors color_) {
|
||||||
color = color_;
|
color = color_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckboxOptions& DisabledTooltip(const char* disabledTooltip_) {
|
CheckboxOptions& DisabledTooltip(const char* disabledTooltip_) {
|
||||||
WidgetOptions::disabledTooltip = disabledTooltip_;
|
WidgetOptions::disabledTooltip = disabledTooltip_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckboxOptions& Padding(ImVec2 padding_) {
|
CheckboxOptions& Padding(ImVec2 padding_) {
|
||||||
padding = padding_;
|
padding = padding_;
|
||||||
return *this;
|
return *this;
|
||||||
|
@ -239,22 +255,27 @@ struct ComboboxOptions : WidgetOptions {
|
||||||
comboMap = comboMap_;
|
comboMap = comboMap_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
ComboboxOptions& DefaultIndex(uint32_t defaultIndex_) {
|
ComboboxOptions& DefaultIndex(uint32_t defaultIndex_) {
|
||||||
defaultIndex = defaultIndex_;
|
defaultIndex = defaultIndex_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
ComboboxOptions& ComponentAlignment(ComponentAlignments alignment_) {
|
ComboboxOptions& ComponentAlignment(ComponentAlignments alignment_) {
|
||||||
alignment = alignment_;
|
alignment = alignment_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
ComboboxOptions& LabelPosition(LabelPositions labelPosition_) {
|
ComboboxOptions& LabelPosition(LabelPositions labelPosition_) {
|
||||||
labelPosition = labelPosition_;
|
labelPosition = labelPosition_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
ComboboxOptions& Tooltip(const char* tooltip_) {
|
ComboboxOptions& Tooltip(const char* tooltip_) {
|
||||||
WidgetOptions::tooltip = tooltip_;
|
WidgetOptions::tooltip = tooltip_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
ComboboxOptions& Color(Colors color_) {
|
ComboboxOptions& Color(Colors color_) {
|
||||||
color = color_;
|
color = color_;
|
||||||
return *this;
|
return *this;
|
||||||
|
@ -279,46 +300,57 @@ struct IntSliderOptions : WidgetOptions {
|
||||||
showButtons = showButtons_;
|
showButtons = showButtons_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
IntSliderOptions& Format(const char* format_) {
|
IntSliderOptions& Format(const char* format_) {
|
||||||
format = format_;
|
format = format_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
IntSliderOptions& Step(int32_t step_) {
|
IntSliderOptions& Step(int32_t step_) {
|
||||||
step = step_;
|
step = step_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
IntSliderOptions& Min(int32_t min_) {
|
IntSliderOptions& Min(int32_t min_) {
|
||||||
min = min_;
|
min = min_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
IntSliderOptions& Max(int32_t max_) {
|
IntSliderOptions& Max(int32_t max_) {
|
||||||
max = max_;
|
max = max_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
IntSliderOptions& DefaultValue(int32_t defaultValue_) {
|
IntSliderOptions& DefaultValue(int32_t defaultValue_) {
|
||||||
defaultValue = defaultValue_;
|
defaultValue = defaultValue_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
IntSliderOptions& ComponentAlignment(ComponentAlignments alignment_) {
|
IntSliderOptions& ComponentAlignment(ComponentAlignments alignment_) {
|
||||||
alignment = alignment_;
|
alignment = alignment_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
IntSliderOptions& LabelPosition(LabelPositions labelPosition_) {
|
IntSliderOptions& LabelPosition(LabelPositions labelPosition_) {
|
||||||
labelPosition = labelPosition_;
|
labelPosition = labelPosition_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
IntSliderOptions& Tooltip(const char* tooltip_) {
|
IntSliderOptions& Tooltip(const char* tooltip_) {
|
||||||
WidgetOptions::tooltip = tooltip_;
|
WidgetOptions::tooltip = tooltip_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
IntSliderOptions& Color(Colors color_) {
|
IntSliderOptions& Color(Colors color_) {
|
||||||
color = color_;
|
color = color_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
IntSliderOptions& Size(ImVec2 size_) {
|
IntSliderOptions& Size(ImVec2 size_) {
|
||||||
size = size_;
|
size = size_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
IntSliderOptions& Clamp(bool clamp_) {
|
IntSliderOptions& Clamp(bool clamp_) {
|
||||||
clamp = clamp_;
|
clamp = clamp_;
|
||||||
return *this;
|
return *this;
|
||||||
|
@ -344,34 +376,42 @@ struct FloatSliderOptions : WidgetOptions {
|
||||||
showButtons = showButtons_;
|
showButtons = showButtons_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
FloatSliderOptions& Format(const char* format_) {
|
FloatSliderOptions& Format(const char* format_) {
|
||||||
format = format_;
|
format = format_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
FloatSliderOptions& Step(float step_) {
|
FloatSliderOptions& Step(float step_) {
|
||||||
step = step_;
|
step = step_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
FloatSliderOptions& Min(float min_) {
|
FloatSliderOptions& Min(float min_) {
|
||||||
min = min_;
|
min = min_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
FloatSliderOptions& Max(float max_) {
|
FloatSliderOptions& Max(float max_) {
|
||||||
max = max_;
|
max = max_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
FloatSliderOptions& DefaultValue(float defaultValue_) {
|
FloatSliderOptions& DefaultValue(float defaultValue_) {
|
||||||
defaultValue = defaultValue_;
|
defaultValue = defaultValue_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
FloatSliderOptions& ComponentAlignment(ComponentAlignments alignment_) {
|
FloatSliderOptions& ComponentAlignment(ComponentAlignments alignment_) {
|
||||||
alignment = alignment_;
|
alignment = alignment_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
FloatSliderOptions& LabelPosition(LabelPositions labelPosition_) {
|
FloatSliderOptions& LabelPosition(LabelPositions labelPosition_) {
|
||||||
labelPosition = labelPosition_;
|
labelPosition = labelPosition_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
FloatSliderOptions& IsPercentage(bool isPercentage_ = true) {
|
FloatSliderOptions& IsPercentage(bool isPercentage_ = true) {
|
||||||
isPercentage = isPercentage_;
|
isPercentage = isPercentage_;
|
||||||
format = "%.0f%%";
|
format = "%.0f%%";
|
||||||
|
@ -379,18 +419,22 @@ struct FloatSliderOptions : WidgetOptions {
|
||||||
max = 1.0f;
|
max = 1.0f;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
FloatSliderOptions& Tooltip(const char* tooltip_) {
|
FloatSliderOptions& Tooltip(const char* tooltip_) {
|
||||||
WidgetOptions::tooltip = tooltip_;
|
WidgetOptions::tooltip = tooltip_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
FloatSliderOptions& Color(Colors color_) {
|
FloatSliderOptions& Color(Colors color_) {
|
||||||
color = color_;
|
color = color_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
FloatSliderOptions& Size(ImVec2 size_) {
|
FloatSliderOptions& Size(ImVec2 size_) {
|
||||||
size = size_;
|
size = size_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
FloatSliderOptions& Clamp(bool clamp_) {
|
FloatSliderOptions& Clamp(bool clamp_) {
|
||||||
clamp = clamp_;
|
clamp = clamp_;
|
||||||
return *this;
|
return *this;
|
||||||
|
@ -406,14 +450,17 @@ struct RadioButtonsOptions : WidgetOptions {
|
||||||
buttonMap = buttonMap_;
|
buttonMap = buttonMap_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
RadioButtonsOptions& Tooltip(const char* tooltip_) {
|
RadioButtonsOptions& Tooltip(const char* tooltip_) {
|
||||||
WidgetOptions::tooltip = tooltip_;
|
WidgetOptions::tooltip = tooltip_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
RadioButtonsOptions& Color(Colors color_) {
|
RadioButtonsOptions& Color(Colors color_) {
|
||||||
color = color_;
|
color = color_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
RadioButtonsOptions& DefaultIndex(int32_t defaultIndex_) {
|
RadioButtonsOptions& DefaultIndex(int32_t defaultIndex_) {
|
||||||
defaultIndex = defaultIndex_;
|
defaultIndex = defaultIndex_;
|
||||||
return *this;
|
return *this;
|
||||||
|
@ -437,10 +484,12 @@ struct InputOptions : WidgetOptions {
|
||||||
WidgetOptions::tooltip = tooltip_;
|
WidgetOptions::tooltip = tooltip_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
InputOptions& Color(Colors color_) {
|
InputOptions& Color(Colors color_) {
|
||||||
color = color_;
|
color = color_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
InputOptions& Size(ImVec2 size_) {
|
InputOptions& Size(ImVec2 size_) {
|
||||||
size = size_;
|
size = size_;
|
||||||
return *this;
|
return *this;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue