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
|
||||
|
||||
namespace SohGui {
|
||||
|
||||
static std::unordered_map<int32_t, const char*> languages = {
|
||||
{ LANGUAGE_ENG, "English" },
|
||||
{ LANGUAGE_GER, "German" },
|
||||
|
@ -35,164 +34,6 @@ static std::unordered_map<int32_t, const char*> languages = {
|
|||
{ 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 {
|
||||
public:
|
||||
SohMenu(const std::string& consoleVariable, const std::string& name);
|
||||
|
|
|
@ -5,6 +5,18 @@ namespace SohGui {
|
|||
extern std::shared_ptr<SohMenu> mSohMenu;
|
||||
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() {
|
||||
// Add Dev Tools Menu
|
||||
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/game-interactor/GameInteractor.h>
|
||||
#include <soh/OTRGlobals.h>
|
||||
|
@ -12,11 +12,6 @@
|
|||
|
||||
static std::string comboboxTooltip = "";
|
||||
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" {
|
||||
void enableBetaQuest() {
|
||||
|
@ -32,6 +27,119 @@ namespace SohGui {
|
|||
extern std::shared_ptr<SohMenu> mSohMenu;
|
||||
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() {
|
||||
// Add Enhancements Menu
|
||||
AddMenuEntry("Enhancements", CVAR_SETTING("Menu.EnhancementsSidebarSection"));
|
||||
|
|
|
@ -6,6 +6,12 @@ namespace SohGui {
|
|||
extern std::shared_ptr<SohMenu> mSohMenu;
|
||||
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() {
|
||||
// Add Randomizer Menu
|
||||
AddMenuEntry("Randomizer", CVAR_SETTING("Menu.RandomizerSidebarSection"));
|
||||
|
|
|
@ -23,6 +23,39 @@ static std::unordered_map<int32_t, const char*> imguiScaleOptions = {
|
|||
{ 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) {
|
||||
uint32_t gameVersion = ResourceMgr_GetGameVersion(index);
|
||||
switch (gameVersion) {
|
||||
|
|
|
@ -115,10 +115,12 @@ struct WidgetOptions {
|
|||
tooltip = tooltip_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
WidgetOptions& Disabled(bool disabled_) {
|
||||
disabled = disabled_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
WidgetOptions& DisabledTooltip(const char* disabledTooltip_) {
|
||||
disabledTooltip = disabledTooltip_;
|
||||
return *this;
|
||||
|
@ -143,14 +145,17 @@ struct ButtonOptions : WidgetOptions {
|
|||
size = size_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
ButtonOptions& Padding(ImVec2 padding_) {
|
||||
padding = padding_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
ButtonOptions& Tooltip(const char* tooltip_) {
|
||||
WidgetOptions::tooltip = tooltip_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
ButtonOptions& Color(Colors color_) {
|
||||
color = color_;
|
||||
return *this;
|
||||
|
@ -168,22 +173,27 @@ struct WindowButtonOptions : WidgetOptions {
|
|||
size = size_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
WindowButtonOptions& Padding(ImVec2 padding_) {
|
||||
padding = padding_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
WindowButtonOptions& Tooltip(const char* tooltip_) {
|
||||
WidgetOptions::tooltip = tooltip_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
WindowButtonOptions& Color(Colors color_) {
|
||||
color = color_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
WindowButtonOptions& ShowButton(bool showButton_) {
|
||||
showButton = showButton_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
WindowButtonOptions& EmbedWindow(bool embedWindow_) {
|
||||
embedWindow = embedWindow_;
|
||||
return *this;
|
||||
|
@ -201,26 +211,32 @@ struct CheckboxOptions : WidgetOptions {
|
|||
defaultValue = defaultValue_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
CheckboxOptions& ComponentAlignment(ComponentAlignments alignment_) {
|
||||
alignment = alignment_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
CheckboxOptions& LabelPosition(LabelPositions labelPosition_) {
|
||||
labelPosition = labelPosition_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
CheckboxOptions& Tooltip(const char* tooltip_) {
|
||||
WidgetOptions::tooltip = tooltip_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
CheckboxOptions& Color(Colors color_) {
|
||||
color = color_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
CheckboxOptions& DisabledTooltip(const char* disabledTooltip_) {
|
||||
WidgetOptions::disabledTooltip = disabledTooltip_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
CheckboxOptions& Padding(ImVec2 padding_) {
|
||||
padding = padding_;
|
||||
return *this;
|
||||
|
@ -239,22 +255,27 @@ struct ComboboxOptions : WidgetOptions {
|
|||
comboMap = comboMap_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
ComboboxOptions& DefaultIndex(uint32_t defaultIndex_) {
|
||||
defaultIndex = defaultIndex_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
ComboboxOptions& ComponentAlignment(ComponentAlignments alignment_) {
|
||||
alignment = alignment_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
ComboboxOptions& LabelPosition(LabelPositions labelPosition_) {
|
||||
labelPosition = labelPosition_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
ComboboxOptions& Tooltip(const char* tooltip_) {
|
||||
WidgetOptions::tooltip = tooltip_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
ComboboxOptions& Color(Colors color_) {
|
||||
color = color_;
|
||||
return *this;
|
||||
|
@ -279,46 +300,57 @@ struct IntSliderOptions : WidgetOptions {
|
|||
showButtons = showButtons_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
IntSliderOptions& Format(const char* format_) {
|
||||
format = format_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
IntSliderOptions& Step(int32_t step_) {
|
||||
step = step_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
IntSliderOptions& Min(int32_t min_) {
|
||||
min = min_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
IntSliderOptions& Max(int32_t max_) {
|
||||
max = max_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
IntSliderOptions& DefaultValue(int32_t defaultValue_) {
|
||||
defaultValue = defaultValue_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
IntSliderOptions& ComponentAlignment(ComponentAlignments alignment_) {
|
||||
alignment = alignment_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
IntSliderOptions& LabelPosition(LabelPositions labelPosition_) {
|
||||
labelPosition = labelPosition_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
IntSliderOptions& Tooltip(const char* tooltip_) {
|
||||
WidgetOptions::tooltip = tooltip_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
IntSliderOptions& Color(Colors color_) {
|
||||
color = color_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
IntSliderOptions& Size(ImVec2 size_) {
|
||||
size = size_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
IntSliderOptions& Clamp(bool clamp_) {
|
||||
clamp = clamp_;
|
||||
return *this;
|
||||
|
@ -344,34 +376,42 @@ struct FloatSliderOptions : WidgetOptions {
|
|||
showButtons = showButtons_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
FloatSliderOptions& Format(const char* format_) {
|
||||
format = format_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
FloatSliderOptions& Step(float step_) {
|
||||
step = step_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
FloatSliderOptions& Min(float min_) {
|
||||
min = min_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
FloatSliderOptions& Max(float max_) {
|
||||
max = max_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
FloatSliderOptions& DefaultValue(float defaultValue_) {
|
||||
defaultValue = defaultValue_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
FloatSliderOptions& ComponentAlignment(ComponentAlignments alignment_) {
|
||||
alignment = alignment_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
FloatSliderOptions& LabelPosition(LabelPositions labelPosition_) {
|
||||
labelPosition = labelPosition_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
FloatSliderOptions& IsPercentage(bool isPercentage_ = true) {
|
||||
isPercentage = isPercentage_;
|
||||
format = "%.0f%%";
|
||||
|
@ -379,18 +419,22 @@ struct FloatSliderOptions : WidgetOptions {
|
|||
max = 1.0f;
|
||||
return *this;
|
||||
}
|
||||
|
||||
FloatSliderOptions& Tooltip(const char* tooltip_) {
|
||||
WidgetOptions::tooltip = tooltip_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
FloatSliderOptions& Color(Colors color_) {
|
||||
color = color_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
FloatSliderOptions& Size(ImVec2 size_) {
|
||||
size = size_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
FloatSliderOptions& Clamp(bool clamp_) {
|
||||
clamp = clamp_;
|
||||
return *this;
|
||||
|
@ -406,14 +450,17 @@ struct RadioButtonsOptions : WidgetOptions {
|
|||
buttonMap = buttonMap_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
RadioButtonsOptions& Tooltip(const char* tooltip_) {
|
||||
WidgetOptions::tooltip = tooltip_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
RadioButtonsOptions& Color(Colors color_) {
|
||||
color = color_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
RadioButtonsOptions& DefaultIndex(int32_t defaultIndex_) {
|
||||
defaultIndex = defaultIndex_;
|
||||
return *this;
|
||||
|
@ -437,10 +484,12 @@ struct InputOptions : WidgetOptions {
|
|||
WidgetOptions::tooltip = tooltip_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
InputOptions& Color(Colors color_) {
|
||||
color = color_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
InputOptions& Size(ImVec2 size_) {
|
||||
size = size_;
|
||||
return *this;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue