This commit is contained in:
Malkierian 2025-08-19 02:25:20 +08:00 committed by GitHub
commit 820d79b4f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 411 additions and 143 deletions

View file

@ -437,7 +437,9 @@ void PresetsCustomWidget(WidgetInfo& info) {
void RegisterPresetsWidgets() { void RegisterPresetsWidgets() {
SohGui::mSohMenu->AddSidebarEntry("Settings", "Presets", 1); SohGui::mSohMenu->AddSidebarEntry("Settings", "Presets", 1);
WidgetPath path = { "Settings", "Presets", SECTION_COLUMN_1 }; WidgetPath path = { "Settings", "Presets", SECTION_COLUMN_1 };
SohGui::mSohMenu->AddWidget(path, "PresetsWidget", WIDGET_CUSTOM).CustomFunction(PresetsCustomWidget); SohGui::mSohMenu->AddWidget(path, "PresetsWidget", WIDGET_CUSTOM)
.CustomFunction(PresetsCustomWidget)
.HideInSearch(true);
presetFolder = Ship::Context::GetInstance()->GetPathRelativeToAppDirectory("presets"); presetFolder = Ship::Context::GetInstance()->GetPathRelativeToAppDirectory("presets");
std::fill_n(saveSection, PRESET_SECTION_MAX, true); std::fill_n(saveSection, PRESET_SECTION_MAX, true);
LoadPresets(); LoadPresets();

View file

@ -11,7 +11,7 @@
#include "soh/OTRGlobals.h" #include "soh/OTRGlobals.h"
#include "soh/cvar_prefixes.h" #include "soh/cvar_prefixes.h"
#include <utils/StringHelper.h> #include <utils/StringHelper.h>
#include "soh/SohGui/UIWidgets.hpp" #include "soh/SohGui/SohMenu.h"
#include "soh/SohGui/SohGui.hpp" #include "soh/SohGui/SohGui.hpp"
#include "AudioCollection.h" #include "AudioCollection.h"
#include "soh/Enhancements/game-interactor/GameInteractor.h" #include "soh/Enhancements/game-interactor/GameInteractor.h"
@ -25,6 +25,22 @@ Vec3f pos = { 0.0f, 0.0f, 0.0f };
f32 freqScale = 1.0f; f32 freqScale = 1.0f;
s8 reverbAdd = 0; s8 reverbAdd = 0;
using namespace UIWidgets;
static WidgetInfo lowHpAlarm;
static WidgetInfo naviCall;
static WidgetInfo enemyProx;
static WidgetInfo leadingMusic;
static WidgetInfo displaySeqName;
static WidgetInfo ovlDuration;
static WidgetInfo voicePitch;
static WidgetInfo randoMusicOnSceneChange;
static WidgetInfo lowerOctaves;
namespace SohGui {
extern std::shared_ptr<SohMenu> mSohMenu;
}
// Authentic sequence counts // Authentic sequence counts
// used to ensure we have enough to shuffle // used to ensure we have enough to shuffle
#define SEQ_COUNT_BGM_WORLD 30 #define SEQ_COUNT_BGM_WORLD 30
@ -518,69 +534,21 @@ void AudioEditor::DrawElement() {
ImGui::TableNextRow(); ImGui::TableNextRow();
ImGui::TableNextColumn(); ImGui::TableNextColumn();
if (ImGui::BeginChild("SfxOptions", ImVec2(0, -8))) { if (ImGui::BeginChild("SfxOptions", ImVec2(0, -8))) {
UIWidgets::CVarCheckbox( SohGui::mSohMenu->MenuDrawItem(lowHpAlarm, ImGui::GetContentRegionAvail().x, THEME_COLOR);
"Mute Low HP Alarm", CVAR_AUDIO("LowHpAlarm"), SohGui::mSohMenu->MenuDrawItem(naviCall, ImGui::GetContentRegionAvail().x, THEME_COLOR);
UIWidgets::CheckboxOptions().Color(THEME_COLOR).Tooltip("Disable the low HP beeping sound.")); SohGui::mSohMenu->MenuDrawItem(enemyProx, ImGui::GetContentRegionAvail().x, THEME_COLOR);
UIWidgets::CVarCheckbox("Disable Navi Call Audio", CVAR_AUDIO("DisableNaviCallAudio"), SohGui::mSohMenu->MenuDrawItem(leadingMusic, ImGui::GetContentRegionAvail().x, THEME_COLOR);
UIWidgets::CheckboxOptions() SohGui::mSohMenu->MenuDrawItem(displaySeqName, ImGui::GetContentRegionAvail().x, THEME_COLOR);
.Color(THEME_COLOR) SohGui::mSohMenu->MenuDrawItem(ovlDuration, ImGui::GetContentRegionAvail().x, THEME_COLOR);
.Tooltip("Disables the voice audio when Navi calls you.")); SohGui::mSohMenu->MenuDrawItem(voicePitch, ImGui::GetContentRegionAvail().x, THEME_COLOR);
UIWidgets::CVarCheckbox(
"Disable Enemy Proximity Music", CVAR_AUDIO("EnemyBGMDisable"),
UIWidgets::CheckboxOptions()
.Color(THEME_COLOR)
.Tooltip("Disables the music change when getting close to enemies. Useful for hearing "
"your custom music for each scene more often."));
UIWidgets::CVarCheckbox(
"Disable Leading Music in Lost Woods", CVAR_AUDIO("LostWoodsConsistentVolume"),
UIWidgets::CheckboxOptions()
.Color(THEME_COLOR)
.Tooltip("Disables the volume shifting in the Lost Woods. Useful for hearing "
"your custom music in the Lost Woods if you don't need the navigation assitance "
"the volume changing provides. If toggling this while in the Lost Woods, reload "
"the area for the effect to kick in."));
UIWidgets::CVarCheckbox(
"Display Sequence Name on Overlay", CVAR_AUDIO("SeqNameOverlay"),
UIWidgets::CheckboxOptions()
.Color(THEME_COLOR)
.Tooltip("Displays the name of the current sequence in the corner of the screen whenever a new "
"sequence "
"is loaded to the main sequence player (does not apply to fanfares or enemy BGM)."));
UIWidgets::CVarSliderInt("Overlay Duration: %d seconds", CVAR_AUDIO("SeqNameOverlayDuration"),
UIWidgets::IntSliderOptions()
.Min(1)
.Max(10)
.DefaultValue(5)
.Size(ImVec2(300.0f, 0.0f))
.Color(THEME_COLOR));
UIWidgets::CVarSliderFloat("Link's voice pitch multiplier", CVAR_AUDIO("LinkVoiceFreqMultiplier"),
UIWidgets::FloatSliderOptions()
.IsPercentage()
.Min(0.4f)
.Max(2.5f)
.DefaultValue(1.0f)
.Size(ImVec2(300.0f, 0.0f))
.Color(THEME_COLOR));
ImGui::SameLine(); ImGui::SameLine();
ImGui::SetCursorPosY(ImGui::GetCursorPos().y + 40.f); ImGui::SetCursorPosY(ImGui::GetCursorPos().y + 40.f);
if (UIWidgets::Button("Reset##linkVoiceFreqMultiplier", if (UIWidgets::Button("Reset##linkVoiceFreqMultiplier",
UIWidgets::ButtonOptions().Size(ImVec2(80, 36)).Padding(ImVec2(5.0f, 0.0f)))) { UIWidgets::ButtonOptions().Size(ImVec2(80, 36)).Padding(ImVec2(5.0f, 0.0f)))) {
CVarSetFloat(CVAR_AUDIO("LinkVoiceFreqMultiplier"), 1.0f); CVarSetFloat(CVAR_AUDIO("LinkVoiceFreqMultiplier"), 1.0f);
} }
UIWidgets::CVarCheckbox( SohGui::mSohMenu->MenuDrawItem(randoMusicOnSceneChange, ImGui::GetContentRegionAvail().x, THEME_COLOR);
"Randomize All Music and Sound Effects on New Scene", CVAR_AUDIO("RandomizeAllOnNewScene"), SohGui::mSohMenu->MenuDrawItem(lowerOctaves, ImGui::GetContentRegionAvail().x, THEME_COLOR);
UIWidgets::CheckboxOptions()
.Color(THEME_COLOR)
.Tooltip(
"Enables randomizing all unlocked music and sound effects when you enter a new scene."));
UIWidgets::CVarCheckbox(
"Lower Octaves of Unplayable High Notes", CVAR_AUDIO("ExperimentalOctaveDrop"),
UIWidgets::CheckboxOptions()
.Color(THEME_COLOR)
.Tooltip("Some custom sequences may have notes that are too high for the game's audio "
"engine to play. Enabling this checkbox will cause these notes to drop a "
"couple of octaves so they can still harmonize with the other notes of the "
"sequence."));
} }
ImGui::EndChild(); ImGui::EndChild();
ImGui::EndTable(); ImGui::EndTable();
@ -834,3 +802,77 @@ void AudioEditor_UnlockAll() {
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame(); Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
} }
void RegisterAudioWidgets() {
lowHpAlarm = { .name = "Mute Low HP Alarm", .type = WidgetType::WIDGET_CVAR_CHECKBOX };
lowHpAlarm.CVar(CVAR_AUDIO("LowHpAlarm"))
.Options(CheckboxOptions().Color(THEME_COLOR).Tooltip("Disable the low HP beeping sound."));
SohGui::mSohMenu->AddSearchWidget({ lowHpAlarm, "Enhancements", "Audio Editor", "Audio Options" });
naviCall = { .name = "Disable Navi Call Audio", .type = WidgetType::WIDGET_CVAR_CHECKBOX };
naviCall.CVar(CVAR_AUDIO("DisableNaviCallAudio"))
.Options(CheckboxOptions().Color(THEME_COLOR).Tooltip("Disables the voice audio when Navi calls you."));
SohGui::mSohMenu->AddSearchWidget({ naviCall, "Enhancements", "Audio Editor", "Audio Options" });
enemyProx = { .name = "Disable Enemy Proximity Music", .type = WidgetType::WIDGET_CVAR_CHECKBOX };
enemyProx.CVar(CVAR_AUDIO("EnemyBGMDisable"))
.Options(CheckboxOptions()
.Color(THEME_COLOR)
.Tooltip("Disables the music change when getting close to enemies. Useful for hearing "
"your custom music for each scene more often."));
leadingMusic = { .name = "Disable Leading Music in Lost Woods", .type = WidgetType::WIDGET_CVAR_CHECKBOX };
leadingMusic.CVar(CVAR_AUDIO("LostWoodsConsistentVolume"))
.Options(CheckboxOptions()
.Color(THEME_COLOR)
.Tooltip("Disables the volume shifting in the Lost Woods. Useful for hearing "
"your custom music in the Lost Woods if you don't need the navigation assitance "
"the volume changing provides. If toggling this while in the Lost Woods, reload "
"the area for the effect to kick in."));
SohGui::mSohMenu->AddSearchWidget({ leadingMusic, "Enhancements", "Audio Editor", "Audio Options" });
displaySeqName = { .name = "Display Sequence Name on Overlay", .type = WidgetType::WIDGET_CVAR_CHECKBOX };
displaySeqName.CVar(CVAR_AUDIO("SeqNameOverlay"))
.Options(CheckboxOptions()
.Color(THEME_COLOR)
.Tooltip("Displays the name of the current sequence in the corner of the screen whenever a new "
"sequence "
"is loaded to the main sequence player (does not apply to fanfares or enemy BGM)."));
SohGui::mSohMenu->AddSearchWidget({ displaySeqName, "Enhancements", "Audio Editor", "Audio Options" });
ovlDuration = { .name = "Overlay Duration: %d seconds", .type = WidgetType::WIDGET_CVAR_SLIDER_INT };
ovlDuration.CVar(CVAR_AUDIO("SeqNameOverlayDuration"))
.Options(IntSliderOptions().Color(THEME_COLOR).Min(1).Max(10).DefaultValue(5).Size(ImVec2(300.0f, 0.0f)));
SohGui::mSohMenu->AddSearchWidget({ ovlDuration, "Enhancements", "Audio Editor", "Audio Options" });
voicePitch = { .name = "Link's Voice Pitch Multiplier", .type = WidgetType::WIDGET_CVAR_SLIDER_FLOAT };
voicePitch.CVar(CVAR_AUDIO("LinkVoiceFreqMultiplier"))
.Options(FloatSliderOptions()
.Color(THEME_COLOR)
.IsPercentage()
.Min(0.4f)
.Max(2.5f)
.DefaultValue(1.0f)
.Size(ImVec2(300.0f, 0.0f)));
SohGui::mSohMenu->AddSearchWidget({ voicePitch, "Enhancements", "Audio Editor", "Audio Options" });
randoMusicOnSceneChange = { .name = "Randomize All Music and Sound Effects on New Scene",
.type = WidgetType::WIDGET_CVAR_CHECKBOX };
randoMusicOnSceneChange.CVar(CVAR_AUDIO("RandomizeAllOnNewScene"))
.Options(CheckboxOptions()
.Color(THEME_COLOR)
.Tooltip("Enables randomizing all unlocked music and sound effects when you enter a new scene."));
SohGui::mSohMenu->AddSearchWidget({ randoMusicOnSceneChange, "Enhancements", "Audio Editor", "Audio Options" });
lowerOctaves = { .name = "Lower Octaves of Unplayable High Notes", .type = WidgetType::WIDGET_CVAR_CHECKBOX };
lowerOctaves.CVar(CVAR_AUDIO("ExperimentalOctaveDrop"))
.Options(CheckboxOptions()
.Color(THEME_COLOR)
.Tooltip("Some custom sequences may have notes that are too high for the game's audio "
"engine to play. Enabling this checkbox will cause these notes to drop a "
"couple of octaves so they can still harmonize with the other notes of the "
"sequence."));
SohGui::mSohMenu->AddSearchWidget({ lowerOctaves, "Enhancements", "Audio Editor", "Audio Options" });
}
static RegisterMenuInitFunc initAudioWidgets(RegisterAudioWidgets);

View file

@ -1,7 +1,7 @@
#include "SohInputEditorWindow.h" #include "SohInputEditorWindow.h"
#include <utils/StringHelper.h> #include <utils/StringHelper.h>
#include "soh/OTRGlobals.h" #include "soh/OTRGlobals.h"
#include "soh/SohGui/UIWidgets.hpp" #include "soh/SohGui/SohMenu.h"
#include "soh/SohGui/SohGui.hpp" #include "soh/SohGui/SohGui.hpp"
#include "z64.h" #include "z64.h"
#include "soh/cvar_prefixes.h" #include "soh/cvar_prefixes.h"
@ -13,6 +13,17 @@
using namespace UIWidgets; using namespace UIWidgets;
static WidgetInfo freeLook;
static WidgetInfo mouseControl;
static WidgetInfo rightStickOcarina;
static WidgetInfo dpadOcarina;
static WidgetInfo dpadPause;
static WidgetInfo dpadText;
namespace SohGui {
extern std::shared_ptr<SohMenu> mSohMenu;
}
SohInputEditorWindow::~SohInputEditorWindow() { SohInputEditorWindow::~SohInputEditorWindow() {
} }
@ -1321,8 +1332,8 @@ void SohInputEditorWindow::DrawOcarinaControlPanel() {
ImGui::SetCursorPos(ImVec2(cursor.x, cursor.y + 5)); ImGui::SetCursorPos(ImVec2(cursor.x, cursor.y + 5));
CheckboxOptions checkOpt = CheckboxOptions().Color(THEME_COLOR); CheckboxOptions checkOpt = CheckboxOptions().Color(THEME_COLOR);
CVarCheckbox("Dpad Ocarina Playback", CVAR_SETTING("CustomOcarina.Dpad"), checkOpt); SohGui::mSohMenu->MenuDrawItem(dpadOcarina, ImGui::GetContentRegionAvail().x, THEME_COLOR);
CVarCheckbox("Right Stick Ocarina Playback", CVAR_SETTING("CustomOcarina.RightStick"), checkOpt); SohGui::mSohMenu->MenuDrawItem(rightStickOcarina, ImGui::GetContentRegionAvail().x, THEME_COLOR);
CVarCheckbox("Customize Ocarina Controls", CVAR_SETTING("CustomOcarina.Enabled"), checkOpt); CVarCheckbox("Customize Ocarina Controls", CVAR_SETTING("CustomOcarina.Enabled"), checkOpt);
if (!CVarGetInteger(CVAR_SETTING("CustomOcarina.Enabled"), 0)) { if (!CVarGetInteger(CVAR_SETTING("CustomOcarina.Enabled"), 0)) {
@ -1354,12 +1365,8 @@ void SohInputEditorWindow::DrawOcarinaControlPanel() {
void SohInputEditorWindow::DrawCameraControlPanel() { void SohInputEditorWindow::DrawCameraControlPanel() {
ImVec2 cursor = ImGui::GetCursorPos(); ImVec2 cursor = ImGui::GetCursorPos();
ImGui::SetCursorPos(ImVec2(cursor.x + 5, cursor.y + 5)); ImGui::SetCursorPos(ImVec2(cursor.x + 5, cursor.y + 5));
CVarCheckbox( SohGui::mSohMenu->MenuDrawItem(mouseControl, ImGui::GetContentRegionAvail().x, THEME_COLOR);
"Enable Mouse Controls", CVAR_SETTING("EnableMouse"),
CheckboxOptions()
.Color(THEME_COLOR)
.Tooltip("Allows for using the mouse to control the camera (must enable Free Look), "
"aim with the shield, and perform quickspin attacks (quickly rotate the mouse then press B)"));
Ship::GuiWindow::BeginGroupPanel("Aiming/First-Person Camera", ImGui::GetContentRegionAvail()); Ship::GuiWindow::BeginGroupPanel("Aiming/First-Person Camera", ImGui::GetContentRegionAvail());
CVarCheckbox("Right Stick Aiming", CVAR_SETTING("Controls.RightStickAim"), CVarCheckbox("Right Stick Aiming", CVAR_SETTING("Controls.RightStickAim"),
CheckboxOptions() CheckboxOptions()
@ -1427,14 +1434,7 @@ void SohInputEditorWindow::DrawCameraControlPanel() {
ImGui::SetCursorPos(ImVec2(cursor.x + 5, cursor.y + 5)); ImGui::SetCursorPos(ImVec2(cursor.x + 5, cursor.y + 5));
Ship::GuiWindow::BeginGroupPanel("Third-Person Camera", ImGui::GetContentRegionAvail()); Ship::GuiWindow::BeginGroupPanel("Third-Person Camera", ImGui::GetContentRegionAvail());
CVarCheckbox( SohGui::mSohMenu->MenuDrawItem(freeLook, ImGui::GetContentRegionAvail().x, THEME_COLOR);
"Free Look", CVAR_SETTING("FreeLook.Enabled"),
CheckboxOptions()
.Color(THEME_COLOR)
.Tooltip("Enables free look camera control\nNote: You must remap C buttons off of the right stick in the "
"controller config menu, and map the camera stick to the right stick.\n"
"Doesn't work in areas were the game locks the camera.\n"
"Scene reload may be necessary to enable."));
CVarCheckbox("Invert Camera X Axis", CVAR_SETTING("FreeLook.InvertXAxis"), CVarCheckbox("Invert Camera X Axis", CVAR_SETTING("FreeLook.InvertXAxis"),
CheckboxOptions().Color(THEME_COLOR).Tooltip("Inverts the Camera X Axis in:\n-Free look")); CheckboxOptions().Color(THEME_COLOR).Tooltip("Inverts the Camera X Axis in:\n-Free look"));
CVarCheckbox( CVarCheckbox(
@ -1467,16 +1467,8 @@ void SohInputEditorWindow::DrawDpadControlPanel() {
ImVec2 cursor = ImGui::GetCursorPos(); ImVec2 cursor = ImGui::GetCursorPos();
ImGui::SetCursorPos(ImVec2(cursor.x + 5, cursor.y + 5)); ImGui::SetCursorPos(ImVec2(cursor.x + 5, cursor.y + 5));
Ship::GuiWindow::BeginGroupPanel("D-Pad Options", ImGui::GetContentRegionAvail()); Ship::GuiWindow::BeginGroupPanel("D-Pad Options", ImGui::GetContentRegionAvail());
CVarCheckbox("D-pad Support on Pause Screen", CVAR_SETTING("DPadOnPause"), SohGui::mSohMenu->MenuDrawItem(dpadPause, ImGui::GetContentRegionAvail().x, THEME_COLOR);
CheckboxOptions() SohGui::mSohMenu->MenuDrawItem(dpadText, ImGui::GetContentRegionAvail().x, THEME_COLOR);
.Color(THEME_COLOR)
.Tooltip("Navigate Pause with the D-pad\nIf used with \"D-pad as Equip Items\", you must hold "
"C-Up to equip instead of navigate"));
CVarCheckbox("D-pad Support in Text Boxes", CVAR_SETTING("DpadInText"),
CheckboxOptions()
.Color(THEME_COLOR)
.Tooltip("Navigate choices in text boxes, shop item selection, and the file select / name entry "
"screens with the D-pad"));
if (!CVarGetInteger(CVAR_SETTING("DPadOnPause"), 0) && !CVarGetInteger(CVAR_SETTING("DpadInText"), 0)) { if (!CVarGetInteger(CVAR_SETTING("DPadOnPause"), 0) && !CVarGetInteger(CVAR_SETTING("DpadInText"), 0)) {
ImGui::BeginDisabled(); ImGui::BeginDisabled();
@ -1902,3 +1894,52 @@ void SohInputEditorWindow::DrawElement() {
ImGui::PopStyleColor(3); ImGui::PopStyleColor(3);
ImGui::PopFont(); ImGui::PopFont();
} }
void RegisterInputWidgets() {
dpadOcarina = { .name = "Dpad Ocarina Playback", .type = WidgetType::WIDGET_CVAR_CHECKBOX };
dpadOcarina.CVar(CVAR_SETTING("CustomOcarina.Dpad")).Options(CheckboxOptions().Color(THEME_COLOR));
SohGui::mSohMenu->AddSearchWidget({ dpadOcarina, "Settings", "Controls", "Ocarina Controls", "" });
freeLook = { .name = "Free Look", .type = WidgetType::WIDGET_CVAR_CHECKBOX };
freeLook.CVar(CVAR_SETTING("FreeLook.Enabled"))
.Options(
CheckboxOptions()
.Color(THEME_COLOR)
.Tooltip(
"Enables free look camera control\nNote: You must remap C buttons off of the right stick in the "
"controller config menu, and map the camera stick to the right stick.\n"
"Doesn't work in areas were the game locks the camera.\n"
"Scene reload may be necessary to enable."));
SohGui::mSohMenu->AddSearchWidget({ freeLook, "Settings", "Controls", "Camera Controls" });
mouseControl = { .name = "Enable Mouse Controls", .type = WidgetType::WIDGET_CVAR_CHECKBOX };
mouseControl.CVar(CVAR_SETTING("EnableMouse"))
.Options(
CheckboxOptions()
.Color(THEME_COLOR)
.Tooltip("Allows for using the mouse to control the camera (must enable Free Look), "
"aim with the shield, and perform quickspin attacks (quickly rotate the mouse then press B)"));
SohGui::mSohMenu->AddSearchWidget({ mouseControl, "Settings", "Controls", "Camera Controls" });
rightStickOcarina = { .name = "Right Stick Ocarina Playback", .type = WidgetType::WIDGET_CVAR_CHECKBOX };
rightStickOcarina.CVar(CVAR_SETTING("CustomOcarina.RightStick")).Options(CheckboxOptions().Color(THEME_COLOR));
SohGui::mSohMenu->AddSearchWidget({ rightStickOcarina, "Settings", "Controls", "Ocarina Controls" });
dpadPause = { .name = "D-pad Support on Pause Screen", .type = WidgetType::WIDGET_CVAR_CHECKBOX };
dpadPause.CVar(CVAR_SETTING("DPadOnPause"))
.Options(CheckboxOptions()
.Color(THEME_COLOR)
.Tooltip("Navigate Pause with the D-pad\nIf used with \"D-pad as Equip Items\", you must hold "
"C-Up to equip instead of navigate"));
SohGui::mSohMenu->AddSearchWidget({ dpadPause, "Settings", "Controls", "Dpad Controls" });
dpadText = { .name = "D-pad Support in Text Boxes", .type = WidgetType::WIDGET_CVAR_CHECKBOX };
dpadText.CVar(CVAR_SETTING("DpadInText"))
.Options(CheckboxOptions()
.Color(THEME_COLOR)
.Tooltip("Navigate choices in text boxes, shop item selection, and the file select / name entry "
"screens with the D-pad"));
SohGui::mSohMenu->AddSearchWidget({ dpadText, "Settings", "Controls", "Dpad Controls" });
}
static RegisterMenuInitFunc initInputWidgets(RegisterInputWidgets);

View file

@ -2089,7 +2089,7 @@ void CheckTrackerSettingsWindow::DrawElement() {
ImGui::TableNextRow(); ImGui::TableNextRow();
ImGui::TableNextColumn(); ImGui::TableNextColumn();
ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x); ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x);
UIWidgets::CVarColorPicker("BG Color", CVAR_TRACKER_CHECK("BgColor"), Color_Bg_Default, true, UIWidgets::CVarColorPicker("Background Color", CVAR_TRACKER_CHECK("BgColor"), Color_Bg_Default, true,
UIWidgets::ColorPickerResetButton | UIWidgets::ColorPickerRandomButton, THEME_COLOR); UIWidgets::ColorPickerResetButton | UIWidgets::ColorPickerRandomButton, THEME_COLOR);
ImGui::PopItemWidth(); ImGui::PopItemWidth();
@ -2103,7 +2103,7 @@ void CheckTrackerSettingsWindow::DrawElement() {
if (CVarGetInteger(CVAR_TRACKER_CHECK("WindowType"), TRACKER_WINDOW_WINDOW) == TRACKER_WINDOW_FLOATING) { if (CVarGetInteger(CVAR_TRACKER_CHECK("WindowType"), TRACKER_WINDOW_WINDOW) == TRACKER_WINDOW_FLOATING) {
UIWidgets::CVarCheckbox("Enable Dragging", CVAR_TRACKER_CHECK("Draggable"), UIWidgets::CVarCheckbox("Enable Dragging", CVAR_TRACKER_CHECK("Draggable"),
UIWidgets::CheckboxOptions().Color(THEME_COLOR)); UIWidgets::CheckboxOptions().Color(THEME_COLOR));
UIWidgets::CVarCheckbox("Only enable while paused", CVAR_TRACKER_CHECK("ShowOnlyPaused"), UIWidgets::CVarCheckbox("Only Enable While Paused", CVAR_TRACKER_CHECK("ShowOnlyPaused"),
UIWidgets::CheckboxOptions().Color(THEME_COLOR)); UIWidgets::CheckboxOptions().Color(THEME_COLOR));
UIWidgets::CVarCombobox("Display Mode", CVAR_TRACKER_CHECK("DisplayType"), displayType, UIWidgets::CVarCombobox("Display Mode", CVAR_TRACKER_CHECK("DisplayType"), displayType,
UIWidgets::ComboboxOptions() UIWidgets::ComboboxOptions()
@ -2135,7 +2135,7 @@ void CheckTrackerSettingsWindow::DrawElement() {
.Color(THEME_COLOR)); .Color(THEME_COLOR));
ImGui::EndDisabled(); ImGui::EndDisabled();
if (UIWidgets::CVarCheckbox( if (UIWidgets::CVarCheckbox(
"Hide unshuffled shop item checks", CVAR_TRACKER_CHECK("HideUnshuffledShopChecks"), "Hide Unshuffled Shop Item Checks", CVAR_TRACKER_CHECK("HideUnshuffledShopChecks"),
UIWidgets::CheckboxOptions() UIWidgets::CheckboxOptions()
.Tooltip("If enabled, will prevent the tracker from displaying slots with non-shop-item shuffles.") .Tooltip("If enabled, will prevent the tracker from displaying slots with non-shop-item shuffles.")
.Color(THEME_COLOR))) { .Color(THEME_COLOR))) {
@ -2143,7 +2143,7 @@ void CheckTrackerSettingsWindow::DrawElement() {
UpdateFilters(); UpdateFilters();
} }
if (UIWidgets::CVarCheckbox( if (UIWidgets::CVarCheckbox(
"Always show gold skulltulas", CVAR_TRACKER_CHECK("AlwaysShowGSLocs"), "Always Show Gold Skulltulas", CVAR_TRACKER_CHECK("AlwaysShowGSLocs"),
UIWidgets::CheckboxOptions() UIWidgets::CheckboxOptions()
.Tooltip("If enabled, will show GS locations in the tracker regardless of tokensanity settings.") .Tooltip("If enabled, will show GS locations in the tracker regardless of tokensanity settings.")
.Color(THEME_COLOR))) { .Color(THEME_COLOR))) {

View file

@ -1781,7 +1781,7 @@ void ItemTrackerSettingsWindow::DrawElement() {
if (CVarCheckbox("Enable Dragging", CVAR_TRACKER_ITEM("Draggable"), CheckboxOptions().Color(THEME_COLOR))) { if (CVarCheckbox("Enable Dragging", CVAR_TRACKER_ITEM("Draggable"), CheckboxOptions().Color(THEME_COLOR))) {
shouldUpdateVectors = true; shouldUpdateVectors = true;
} }
if (CVarCheckbox("Only enable while paused", CVAR_TRACKER_ITEM("ShowOnlyPaused"), if (CVarCheckbox("Only Enable While Paused", CVAR_TRACKER_ITEM("ShowOnlyPaused"),
CheckboxOptions().Color(THEME_COLOR))) { CheckboxOptions().Color(THEME_COLOR))) {
shouldUpdateVectors = true; shouldUpdateVectors = true;
} }

View file

@ -24,11 +24,20 @@ namespace SohGui {
extern std::shared_ptr<SohModalWindow> mModalWindow; extern std::shared_ptr<SohModalWindow> mModalWindow;
} }
std::vector<SearchEntry> extraSearches = {};
std::vector<SearchWidget> extraSearchWidgets = {};
namespace Ship { namespace Ship {
std::string disabledTempTooltip; std::string disabledTempTooltip;
const char* disabledTooltip; const char* disabledTooltip;
bool disabledValue = false; bool disabledValue = false;
bool navigateToWidget = false;
const char* navigateMainEntry = "";
const char* navigateSidebar = "";
std::string navigateWidgetName = "";
bool highlightWidget = false;
bool operator==(Color_RGB8 const& l, Color_RGB8 const& r) noexcept { bool operator==(Color_RGB8 const& l, Color_RGB8 const& r) noexcept {
return l.r == r.r && l.g == r.g && l.b == r.b; return l.r == r.r && l.g == r.g && l.b == r.b;
} }
@ -186,7 +195,12 @@ bool ModernMenuHeaderEntry(std::string label) {
uint32_t Menu::DrawSearchResults(std::string& menuSearchText) { uint32_t Menu::DrawSearchResults(std::string& menuSearchText) {
int searchCount = 0; int searchCount = 0;
if (ImGui::BeginChild("Search Results")) { std::transform(menuSearchText.begin(), menuSearchText.end(), menuSearchText.begin(), ::tolower);
menuSearchText.erase(std::remove(menuSearchText.begin(), menuSearchText.end(), ' '), menuSearchText.end());
ImGui::SetNextWindowSizeConstraints({ ImGui::GetContentRegionAvail().x / 2, 0 },
{ ImGui::GetContentRegionAvail().x / 2, ImGui::GetContentRegionAvail().y });
if (ImGui::BeginChild("Search Results Col 1", { ImGui::GetContentRegionAvail().x / 2, 0 },
ImGuiChildFlags_AutoResizeY, ImGuiWindowFlags_NoTitleBar)) {
for (auto& menuLabel : menuOrder) { for (auto& menuLabel : menuOrder) {
auto& menuEntry = menuEntries.at(menuLabel); auto& menuEntry = menuEntries.at(menuLabel);
for (auto& sidebarLabel : menuEntry.sidebarOrder) { for (auto& sidebarLabel : menuEntry.sidebarOrder) {
@ -195,18 +209,15 @@ uint32_t Menu::DrawSearchResults(std::string& menuSearchText) {
auto& column = sidebar.columnWidgets.at(i); auto& column = sidebar.columnWidgets.at(i);
for (auto& info : column) { for (auto& info : column) {
if (info.type == WIDGET_SEARCH || info.type == WIDGET_SEPARATOR || if (info.type == WIDGET_SEARCH || info.type == WIDGET_SEPARATOR ||
info.type == WIDGET_SEPARATOR_TEXT || info.isHidden) { info.type == WIDGET_SEPARATOR_TEXT || info.isHidden || info.hideInSearch) {
continue; continue;
} }
const char* tooltip = info.options->tooltip; const char* tooltip = info.options->tooltip;
std::string widgetStr = std::string(info.name) + std::string(tooltip != NULL ? tooltip : ""); std::string widgetStr = std::string(info.name) + std::string(tooltip != NULL ? tooltip : "");
std::transform(menuSearchText.begin(), menuSearchText.end(), menuSearchText.begin(), ::tolower);
menuSearchText.erase(std::remove(menuSearchText.begin(), menuSearchText.end(), ' '),
menuSearchText.end());
std::transform(widgetStr.begin(), widgetStr.end(), widgetStr.begin(), ::tolower); std::transform(widgetStr.begin(), widgetStr.end(), widgetStr.begin(), ::tolower);
widgetStr.erase(std::remove(widgetStr.begin(), widgetStr.end(), ' '), widgetStr.end()); widgetStr.erase(std::remove(widgetStr.begin(), widgetStr.end(), ' '), widgetStr.end());
if (widgetStr.find(menuSearchText) != std::string::npos) { if (widgetStr.find(menuSearchText) != std::string::npos) {
MenuDrawItem(info, 90 / sidebar.columnCount, menuThemeIndex); MenuDrawItem(info, 400, menuThemeIndex);
ImGui::PushStyleColor(ImGuiCol_Text, UIWidgets::ColorValues.at(UIWidgets::Colors::Gray)); ImGui::PushStyleColor(ImGuiCol_Text, UIWidgets::ColorValues.at(UIWidgets::Colors::Gray));
std::string origin = std::string origin =
fmt::format(" ({} -> {}, Col {})", menuEntry.label, sidebarLabel, i + 1); fmt::format(" ({} -> {}, Col {})", menuEntry.label, sidebarLabel, i + 1);
@ -218,6 +229,60 @@ uint32_t Menu::DrawSearchResults(std::string& menuSearchText) {
} }
} }
} }
ImGui::EndChild();
}
ImGui::SameLine();
ImGui::SetNextWindowSizeConstraints({ ImGui::GetContentRegionAvail().x, 0 },
{ ImGui::GetContentRegionAvail().x, ImGui::GetContentRegionAvail().y });
if (ImGui::BeginChild("Search Results Col 2", { ImGui::GetContentRegionAvail().x, 0 }, ImGuiChildFlags_AutoResizeY,
ImGuiWindowFlags_NoTitleBar)) {
for (auto& entry : extraSearchWidgets) {
if (entry.info.type == WIDGET_SEARCH || entry.info.type == WIDGET_SEPARATOR ||
entry.info.type == WIDGET_SEPARATOR_TEXT || entry.info.isHidden || entry.info.hideInSearch) {
continue;
}
std::string widgetStr =
entry.info.name + entry.info.options->tooltip + entry.extraTerms + entry.sidebarName;
std::transform(widgetStr.begin(), widgetStr.end(), widgetStr.begin(), ::tolower);
widgetStr.erase(std::remove(widgetStr.begin(), widgetStr.end(), ' '), widgetStr.end());
if (widgetStr.find(menuSearchText) != std::string::npos) {
MenuDrawItem(entry.info, 400, menuThemeIndex);
ImGui::PushStyleColor(ImGuiCol_Text, UIWidgets::ColorValues.at(UIWidgets::Colors::Gray));
std::string origin = fmt::format(" ({} -> {}, {})", entry.menuName, entry.sidebarName, entry.location);
ImGui::Text("%s", origin.c_str());
ImGui::PopStyleColor();
searchCount++;
}
}
for (auto& entry : extraSearches) {
std::string widgetStr = entry.widgetName + entry.extraTerms + entry.sidebarName;
std::transform(widgetStr.begin(), widgetStr.end(), widgetStr.begin(), ::tolower);
widgetStr.erase(std::remove(widgetStr.begin(), widgetStr.end(), ' '), widgetStr.end());
if (widgetStr.find(menuSearchText) != std::string::npos) {
std::string origin = fmt::format(" ({} -> {}, {})", entry.menuName, entry.sidebarName, entry.location);
ImVec2 textSize = ImGui::CalcTextSize(origin.c_str());
ImVec2 pos = ImGui::GetCurrentWindow()->DC.CursorPos;
ImRect bb = { pos, { pos.x + textSize.x, pos.y + (textSize.y * 2) + ImGui::GetStyle().ItemSpacing.y } };
const ImGuiID igid =
ImGui::GetCurrentWindow()->GetID(std::string(entry.widgetName + "##" + entry.sidebarName).c_str());
ImGui::ItemSize(bb, ImGui::GetStyle().FramePadding.y);
ImGui::ItemAdd(bb, igid);
if (ImGui::ButtonBehavior(bb, igid, NULL, NULL)) {
navigateToWidget = true;
navigateMainEntry = entry.menuName.c_str();
navigateSidebar = entry.sidebarName.c_str();
navigateWidgetName = entry.widgetName;
break;
}
ImGui::GetCurrentWindow()->DC.CursorPos = pos;
ImGui::Text("%s", entry.widgetName.c_str());
ImGui::PushStyleColor(ImGuiCol_Text, UIWidgets::ColorValues.at(UIWidgets::Colors::Gray));
ImGui::Text("%s", origin.c_str());
ImGui::PopStyleColor();
searchCount++;
}
}
ImGui::EndChild();
} }
return searchCount; return searchCount;
} }
@ -227,6 +292,14 @@ void Menu::AddMenuEntry(std::string entryName, const char* entryCvar) {
menuOrder.push_back(entryName); menuOrder.push_back(entryName);
} }
void Menu::AddSearchEntry(SearchEntry entry) {
extraSearches.push_back(entry);
}
void Menu::AddSearchWidget(SearchWidget widget) {
extraSearchWidgets.push_back(widget);
}
std::unordered_map<uint32_t, disabledInfo>& Menu::GetDisabledMap() { std::unordered_map<uint32_t, disabledInfo>& Menu::GetDisabledMap() {
return disabledMap; return disabledMap;
} }
@ -473,7 +546,6 @@ void Menu::MenuDrawItem(WidgetInfo& widget, uint32_t width, UIWidgets::Colors me
return; return;
} }
DrawSearchResults(menuSearchText); DrawSearchResults(menuSearchText);
ImGui::EndChild();
} break; } break;
default: default:
break; break;
@ -500,6 +572,19 @@ void Menu::DrawElement() {
for (auto& [reason, info] : disabledMap) { for (auto& [reason, info] : disabledMap) {
info.active = info.evaluation(info); info.active = info.evaluation(info);
} }
const char* headerCvar = CVAR_SETTING("Menu.ActiveHeader");
if (navigateToWidget) {
if (menuEntries.contains(navigateMainEntry) &&
menuEntries.at(navigateMainEntry).sidebars.contains(navigateSidebar)) {
menuSearch.Clear();
CVarSetString(headerCvar, navigateMainEntry);
const char* sidebarCvar = menuEntries.at(navigateMainEntry).sidebarCvar;
CVarSetString(sidebarCvar, navigateSidebar);
highlightWidget = true;
}
navigateToWidget = false;
}
raceDisableActive = CVarGetInteger(CVAR_SETTING("DisableChanges"), 0); raceDisableActive = CVarGetInteger(CVAR_SETTING("DisableChanges"), 0);
@ -567,7 +652,6 @@ void Menu::DrawElement() {
ImGui::PushFont(OTRGlobals::Instance->fontStandardLargest); ImGui::PushFont(OTRGlobals::Instance->fontStandardLargest);
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(10.0f, 8.0f)); ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(10.0f, 8.0f));
const char* headerCvar = CVAR_SETTING("Menu.ActiveHeader");
std::string headerIndex = CVarGetString(headerCvar, "Settings"); std::string headerIndex = CVarGetString(headerCvar, "Settings");
ImVec2 pos = window->DC.CursorPos; ImVec2 pos = window->DC.CursorPos;
float centerX = pos.x + windowWidth / 2 - (style.ItemSpacing.x * (menuEntries.size() + 1)); float centerX = pos.x + windowWidth / 2 - (style.ItemSpacing.x * (menuEntries.size() + 1));
@ -797,12 +881,6 @@ void Menu::DrawElement() {
ImGuiWindowFlags_NoTitleBar); ImGuiWindowFlags_NoTitleBar);
} }
if (headerSearch && menuSearchText.length() > 0) { if (headerSearch && menuSearchText.length() > 0) {
uint32_t searchCount = DrawSearchResults(menuSearchText);
if (searchCount == 0) {
ImGui::SetCursorPosX((ImGui::GetWindowWidth() - ImGui::CalcTextSize("No results found").x) / 2);
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 10.0f);
ImGui::TextColored(ImVec4(1.0f, 1.0f, 1.0f, 0.4f), "No results found");
}
ImGui::SetCursorPosX((ImGui::GetWindowWidth() - ImGui::CalcTextSize("Clear Search").x) / 2 - 10.0f); ImGui::SetCursorPosX((ImGui::GetWindowWidth() - ImGui::CalcTextSize("Clear Search").x) / 2 - 10.0f);
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 10.0f); ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 10.0f);
UIWidgets::ButtonOptions clearBtnOpts = {}; UIWidgets::ButtonOptions clearBtnOpts = {};
@ -810,8 +888,12 @@ void Menu::DrawElement() {
if (UIWidgets::Button("Clear Search", clearBtnOpts)) { if (UIWidgets::Button("Clear Search", clearBtnOpts)) {
menuSearch.Clear(); menuSearch.Clear();
} }
uint32_t searchCount = DrawSearchResults(menuSearchText);
ImGui::EndChild(); if (searchCount == 0) {
ImGui::SetCursorPosX((ImGui::GetWindowWidth() - ImGui::CalcTextSize("No results found").x) / 2);
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 10.0f);
ImGui::TextColored(ImVec4(1.0f, 1.0f, 1.0f, 0.4f), "No results found");
}
} else { } else {
std::string menuLabel = menuEntries.at(headerIndex).label; std::string menuLabel = menuEntries.at(headerIndex).label;
if (MenuInit::GetUpdateFuncs().contains(menuLabel)) { if (MenuInit::GetUpdateFuncs().contains(menuLabel)) {

View file

@ -26,6 +26,8 @@ class Menu : public GuiWindow {
void MenuDrawItem(WidgetInfo& widget, uint32_t width, UIWidgets::Colors menuThemeIndex); void MenuDrawItem(WidgetInfo& widget, uint32_t width, UIWidgets::Colors menuThemeIndex);
void AddMenuEntry(std::string entryName, const char* entryCvar); void AddMenuEntry(std::string entryName, const char* entryCvar);
void AddSearchEntry(SearchEntry entry);
void AddSearchWidget(SearchWidget widget);
std::unordered_map<uint32_t, disabledInfo>& GetDisabledMap(); std::unordered_map<uint32_t, disabledInfo>& GetDisabledMap();
protected: protected:

View file

@ -111,11 +111,13 @@ struct WidgetInfo {
bool isHidden = false; bool isHidden = false;
bool sameLine = false; bool sameLine = false;
bool raceDisable = true; bool raceDisable = true;
bool hideInSearch = false;
WidgetInfo& CVar(const char* cVar_) { WidgetInfo& CVar(const char* cVar_) {
cVar = cVar_; cVar = cVar_;
return *this; return *this;
} }
WidgetInfo& Options(OptionsVariant options_) { WidgetInfo& Options(OptionsVariant options_) {
switch (type) { switch (type) {
case WIDGET_AUDIO_BACKEND: case WIDGET_AUDIO_BACKEND:
@ -155,48 +157,63 @@ struct WidgetInfo {
} }
return *this; return *this;
} }
WidgetInfo& Options(std::shared_ptr<UIWidgets::WidgetOptions> options_) {
options = options_;
return *this;
}
WidgetInfo& Callback(WidgetFunc callback_) {
callback = callback_;
return *this;
}
WidgetInfo& PreFunc(WidgetFunc preFunc_) {
preFunc = preFunc_;
return *this;
}
WidgetInfo& PostFunc(WidgetFunc postFunc_) {
postFunc = postFunc_;
return *this;
}
WidgetInfo& WindowName(const char* windowName_) {
windowName = windowName_;
return *this;
}
WidgetInfo& ValuePointer(std::variant<bool*, int32_t*, float*> valuePointer_) {
valuePointer = valuePointer_;
return *this;
}
WidgetInfo& SameLine(bool sameLine_) {
sameLine = sameLine_;
return *this;
}
WidgetInfo& CustomFunction(WidgetFunc customFunction_) {
customFunction = customFunction_;
return *this;
}
WidgetInfo& RaceDisable(bool disable) {
raceDisable = disable;
return *this;
}
WidgetInfo& HideInSearch(bool hide) {
hideInSearch = hide;
return *this;
}
void ResetDisables() { void ResetDisables() {
isHidden = false; isHidden = false;
options->disabled = false; options->disabled = false;
options->disabledTooltip = ""; options->disabledTooltip = "";
activeDisables.clear(); activeDisables.clear();
} }
WidgetInfo& Options(std::shared_ptr<UIWidgets::WidgetOptions> options_) {
options = options_;
return *this;
}
WidgetInfo& Callback(WidgetFunc callback_) {
callback = callback_;
return *this;
}
WidgetInfo& PreFunc(WidgetFunc preFunc_) {
preFunc = preFunc_;
return *this;
}
WidgetInfo& PostFunc(WidgetFunc postFunc_) {
postFunc = postFunc_;
return *this;
}
WidgetInfo& WindowName(const char* windowName_) {
windowName = windowName_;
return *this;
}
WidgetInfo& ValuePointer(std::variant<bool*, int32_t*, float*> valuePointer_) {
valuePointer = valuePointer_;
return *this;
}
WidgetInfo& SameLine(bool sameLine_) {
sameLine = sameLine_;
return *this;
}
WidgetInfo& CustomFunction(WidgetFunc customFunction_) {
customFunction = customFunction_;
return *this;
}
WidgetInfo& RaceDisable(bool disable) {
raceDisable = disable;
return *this;
}
}; };
struct WidgetPath { struct WidgetPath {
@ -269,6 +286,24 @@ struct MenuInit {
} }
}; };
struct SearchEntry {
// First four required
std::string widgetName;
std::string menuName;
std::string sidebarName;
std::string location;
std::string extraTerms = "";
};
struct SearchWidget {
// First four required
WidgetInfo& info;
std::string menuName;
std::string sidebarName;
std::string location;
std::string extraTerms = "";
};
struct RegisterMenuInitFunc { struct RegisterMenuInitFunc {
RegisterMenuInitFunc(std::function<void()> initFunc) { RegisterMenuInitFunc(std::function<void()> initFunc) {
auto& menuInitFuncs = MenuInit::GetInitFuncs(); auto& menuInitFuncs = MenuInit::GetInitFuncs();

View file

@ -124,6 +124,7 @@ void SohMenu::AddMenuDevTools() {
.CVar(CVAR_WINDOW("SohStats")) .CVar(CVAR_WINDOW("SohStats"))
.RaceDisable(false) .RaceDisable(false)
.WindowName("Stats##Soh") .WindowName("Stats##Soh")
.HideInSearch(true)
.Options(WindowButtonOptions().Tooltip("Enables the separate Stats Window.")); .Options(WindowButtonOptions().Tooltip("Enables the separate Stats Window."));
// Console // Console
@ -132,6 +133,7 @@ void SohMenu::AddMenuDevTools() {
AddWidget(path, "Popout Console", WIDGET_WINDOW_BUTTON) AddWidget(path, "Popout Console", WIDGET_WINDOW_BUTTON)
.CVar(CVAR_WINDOW("SohConsole")) .CVar(CVAR_WINDOW("SohConsole"))
.WindowName("Console##SoH") .WindowName("Console##SoH")
.HideInSearch(true)
.Options(WindowButtonOptions().Tooltip("Enables the separate Console Window.")); .Options(WindowButtonOptions().Tooltip("Enables the separate Console Window."));
// Save Editor // Save Editor
@ -140,6 +142,7 @@ void SohMenu::AddMenuDevTools() {
AddWidget(path, "Popout Save Editor", WIDGET_WINDOW_BUTTON) AddWidget(path, "Popout Save Editor", WIDGET_WINDOW_BUTTON)
.CVar(CVAR_WINDOW("SaveEditor")) .CVar(CVAR_WINDOW("SaveEditor"))
.WindowName("Save Editor") .WindowName("Save Editor")
.HideInSearch(true)
.Options(WindowButtonOptions().Tooltip("Enables the separate Save Editor Window.")); .Options(WindowButtonOptions().Tooltip("Enables the separate Save Editor Window."));
// Hook Debugger // Hook Debugger
@ -148,6 +151,7 @@ void SohMenu::AddMenuDevTools() {
AddWidget(path, "Popout Hook Debugger", WIDGET_WINDOW_BUTTON) AddWidget(path, "Popout Hook Debugger", WIDGET_WINDOW_BUTTON)
.CVar(CVAR_WINDOW("HookDebugger")) .CVar(CVAR_WINDOW("HookDebugger"))
.WindowName("Hook Debugger") .WindowName("Hook Debugger")
.HideInSearch(true)
.Options(WindowButtonOptions().Tooltip("Enables the separate Hook Debugger Window.")); .Options(WindowButtonOptions().Tooltip("Enables the separate Hook Debugger Window."));
// Collision Viewer // Collision Viewer
@ -156,6 +160,7 @@ void SohMenu::AddMenuDevTools() {
AddWidget(path, "Popout Collision Viewer", WIDGET_WINDOW_BUTTON) AddWidget(path, "Popout Collision Viewer", WIDGET_WINDOW_BUTTON)
.CVar(CVAR_WINDOW("CollisionViewer")) .CVar(CVAR_WINDOW("CollisionViewer"))
.WindowName("Collision Viewer") .WindowName("Collision Viewer")
.HideInSearch(true)
.Options(WindowButtonOptions().Tooltip("Enables the separate Collision Viewer Window.")); .Options(WindowButtonOptions().Tooltip("Enables the separate Collision Viewer Window."));
// Actor Viewer // Actor Viewer
@ -164,6 +169,7 @@ void SohMenu::AddMenuDevTools() {
AddWidget(path, "Popout Actor Viewer", WIDGET_WINDOW_BUTTON) AddWidget(path, "Popout Actor Viewer", WIDGET_WINDOW_BUTTON)
.CVar(CVAR_WINDOW("ActorViewer")) .CVar(CVAR_WINDOW("ActorViewer"))
.WindowName("Actor Viewer") .WindowName("Actor Viewer")
.HideInSearch(true)
.Options(WindowButtonOptions().Tooltip("Enables the separate Actor Viewer Window.")); .Options(WindowButtonOptions().Tooltip("Enables the separate Actor Viewer Window."));
// Display List Viewer // Display List Viewer
@ -172,6 +178,7 @@ void SohMenu::AddMenuDevTools() {
AddWidget(path, "Popout Display List Viewer", WIDGET_WINDOW_BUTTON) AddWidget(path, "Popout Display List Viewer", WIDGET_WINDOW_BUTTON)
.CVar(CVAR_WINDOW("DisplayListViewer")) .CVar(CVAR_WINDOW("DisplayListViewer"))
.WindowName("Display List Viewer") .WindowName("Display List Viewer")
.HideInSearch(true)
.Options(WindowButtonOptions().Tooltip("Enables the separate Display List Viewer Window.")); .Options(WindowButtonOptions().Tooltip("Enables the separate Display List Viewer Window."));
// Value Viewer // Value Viewer
@ -180,6 +187,7 @@ void SohMenu::AddMenuDevTools() {
AddWidget(path, "Popout Value Viewer", WIDGET_WINDOW_BUTTON) AddWidget(path, "Popout Value Viewer", WIDGET_WINDOW_BUTTON)
.CVar(CVAR_WINDOW("ValueViewer")) .CVar(CVAR_WINDOW("ValueViewer"))
.WindowName("Value Viewer") .WindowName("Value Viewer")
.HideInSearch(true)
.Options(WindowButtonOptions().Tooltip("Enables the separate Value Viewer Window.")); .Options(WindowButtonOptions().Tooltip("Enables the separate Value Viewer Window."));
// Message Viewer // Message Viewer
@ -188,6 +196,7 @@ void SohMenu::AddMenuDevTools() {
AddWidget(path, "Popout Message Viewer", WIDGET_WINDOW_BUTTON) AddWidget(path, "Popout Message Viewer", WIDGET_WINDOW_BUTTON)
.CVar(CVAR_WINDOW("MessageViewer")) .CVar(CVAR_WINDOW("MessageViewer"))
.WindowName("Message Viewer") .WindowName("Message Viewer")
.HideInSearch(true)
.Options(WindowButtonOptions().Tooltip("Enables the separate Message Viewer Window.")); .Options(WindowButtonOptions().Tooltip("Enables the separate Message Viewer Window."));
// Gfx Debugger // Gfx Debugger
@ -196,6 +205,7 @@ void SohMenu::AddMenuDevTools() {
AddWidget(path, "Popout Gfx Debugger", WIDGET_WINDOW_BUTTON) AddWidget(path, "Popout Gfx Debugger", WIDGET_WINDOW_BUTTON)
.CVar(CVAR_WINDOW("SohGfxDebugger")) .CVar(CVAR_WINDOW("SohGfxDebugger"))
.WindowName("GfxDebugger##SoH") .WindowName("GfxDebugger##SoH")
.HideInSearch(true)
.Options(WindowButtonOptions().Tooltip("Enables the separate Gfx Debugger Window.")); .Options(WindowButtonOptions().Tooltip("Enables the separate Gfx Debugger Window."));
} }

View file

@ -1831,6 +1831,7 @@ void SohMenu::AddMenuEnhancements() {
.CVar(CVAR_WINDOW("CosmeticsEditor")) .CVar(CVAR_WINDOW("CosmeticsEditor"))
.RaceDisable(false) .RaceDisable(false)
.WindowName("Cosmetics Editor") .WindowName("Cosmetics Editor")
.HideInSearch(true)
.Options(WindowButtonOptions().Tooltip("Enables the separate Cosmetics Editor Window.")); .Options(WindowButtonOptions().Tooltip("Enables the separate Cosmetics Editor Window."));
// Audio Editor // Audio Editor
@ -1840,6 +1841,7 @@ void SohMenu::AddMenuEnhancements() {
.CVar(CVAR_WINDOW("AudioEditor")) .CVar(CVAR_WINDOW("AudioEditor"))
.RaceDisable(false) .RaceDisable(false)
.WindowName("Audio Editor") .WindowName("Audio Editor")
.HideInSearch(true)
.Options(WindowButtonOptions().Tooltip("Enables the separate Audio Editor Window.")); .Options(WindowButtonOptions().Tooltip("Enables the separate Audio Editor Window."));
// Gameplay Stats // Gameplay Stats
@ -1849,6 +1851,7 @@ void SohMenu::AddMenuEnhancements() {
.CVar(CVAR_WINDOW("GameplayStats")) .CVar(CVAR_WINDOW("GameplayStats"))
.RaceDisable(false) .RaceDisable(false)
.WindowName("Gameplay Stats") .WindowName("Gameplay Stats")
.HideInSearch(true)
.Options(WindowButtonOptions().Tooltip("Enables the separate Gameplay Stats Window.")); .Options(WindowButtonOptions().Tooltip("Enables the separate Gameplay Stats Window."));
// Time Splits // Time Splits
@ -1858,6 +1861,7 @@ void SohMenu::AddMenuEnhancements() {
.CVar(CVAR_WINDOW("TimeSplits")) .CVar(CVAR_WINDOW("TimeSplits"))
.RaceDisable(false) .RaceDisable(false)
.WindowName("Time Splits") .WindowName("Time Splits")
.HideInSearch(true)
.Options(WindowButtonOptions().Tooltip("Enables the separate Time Splits Window.")); .Options(WindowButtonOptions().Tooltip("Enables the separate Time Splits Window."));
// Timers // Timers

View file

@ -22,6 +22,7 @@ void SohMenu::AddMenuRandomizer() {
AddWidget(path, "Popout Randomizer Settings Window", WIDGET_WINDOW_BUTTON) AddWidget(path, "Popout Randomizer Settings Window", WIDGET_WINDOW_BUTTON)
.CVar(CVAR_WINDOW("RandomizerSettings")) .CVar(CVAR_WINDOW("RandomizerSettings"))
.WindowName("Randomizer Settings") .WindowName("Randomizer Settings")
.HideInSearch(true)
.Options(WindowButtonOptions().Tooltip("Enables the separate Randomizer Settings Window.")); .Options(WindowButtonOptions().Tooltip("Enables the separate Randomizer Settings Window."));
// Enhancements // Enhancements
@ -104,6 +105,7 @@ void SohMenu::AddMenuRandomizer() {
.CVar(CVAR_WINDOW("PlandomizerEditor")) .CVar(CVAR_WINDOW("PlandomizerEditor"))
.RaceDisable(false) .RaceDisable(false)
.WindowName("Plandomizer Editor") .WindowName("Plandomizer Editor")
.HideInSearch(true)
.Options(WindowButtonOptions().Tooltip("Enables the separate Randomizer Settings Window.")); .Options(WindowButtonOptions().Tooltip("Enables the separate Randomizer Settings Window."));
// Item Tracker // Item Tracker
@ -115,6 +117,7 @@ void SohMenu::AddMenuRandomizer() {
.CVar(CVAR_WINDOW("ItemTracker")) .CVar(CVAR_WINDOW("ItemTracker"))
.RaceDisable(false) .RaceDisable(false)
.WindowName("Item Tracker") .WindowName("Item Tracker")
.HideInSearch(true)
.Options(WindowButtonOptions().Tooltip("Toggles the Item Tracker.").EmbedWindow(false)); .Options(WindowButtonOptions().Tooltip("Toggles the Item Tracker.").EmbedWindow(false));
AddWidget(path, "Item Tracker Settings", WIDGET_SEPARATOR_TEXT); AddWidget(path, "Item Tracker Settings", WIDGET_SEPARATOR_TEXT);
@ -122,6 +125,7 @@ void SohMenu::AddMenuRandomizer() {
.CVar(CVAR_WINDOW("ItemTrackerSettings")) .CVar(CVAR_WINDOW("ItemTrackerSettings"))
.RaceDisable(false) .RaceDisable(false)
.WindowName("Item Tracker Settings") .WindowName("Item Tracker Settings")
.HideInSearch(true)
.Options(WindowButtonOptions().Tooltip("Enables the separate Item Tracker Settings Window.")); .Options(WindowButtonOptions().Tooltip("Enables the separate Item Tracker Settings Window."));
// Entrance Tracker // Entrance Tracker
@ -133,6 +137,7 @@ void SohMenu::AddMenuRandomizer() {
.CVar(CVAR_WINDOW("EntranceTracker")) .CVar(CVAR_WINDOW("EntranceTracker"))
.RaceDisable(false) .RaceDisable(false)
.WindowName("Entrance Tracker") .WindowName("Entrance Tracker")
.HideInSearch(true)
.Options(WindowButtonOptions().Tooltip("Toggles the Entrance Tracker.").EmbedWindow(false)); .Options(WindowButtonOptions().Tooltip("Toggles the Entrance Tracker.").EmbedWindow(false));
AddWidget(path, "Entrance Tracker Settings", WIDGET_SEPARATOR_TEXT); AddWidget(path, "Entrance Tracker Settings", WIDGET_SEPARATOR_TEXT);
@ -140,6 +145,7 @@ void SohMenu::AddMenuRandomizer() {
.CVar(CVAR_WINDOW("EntranceTrackerSettings")) .CVar(CVAR_WINDOW("EntranceTrackerSettings"))
.RaceDisable(false) .RaceDisable(false)
.WindowName("Entrance Tracker Settings") .WindowName("Entrance Tracker Settings")
.HideInSearch(true)
.Options(WindowButtonOptions().Tooltip("Enables the separate Entrance Tracker Settings Window.")); .Options(WindowButtonOptions().Tooltip("Enables the separate Entrance Tracker Settings Window."));
// Check Tracker // Check Tracker
@ -151,6 +157,7 @@ void SohMenu::AddMenuRandomizer() {
.CVar(CVAR_WINDOW("CheckTracker")) .CVar(CVAR_WINDOW("CheckTracker"))
.RaceDisable(false) .RaceDisable(false)
.WindowName("Check Tracker") .WindowName("Check Tracker")
.HideInSearch(true)
.Options(WindowButtonOptions().Tooltip("Toggles the Check Tracker.").EmbedWindow(false)); .Options(WindowButtonOptions().Tooltip("Toggles the Check Tracker.").EmbedWindow(false));
AddWidget(path, "Check Tracker Settings", WIDGET_SEPARATOR_TEXT); AddWidget(path, "Check Tracker Settings", WIDGET_SEPARATOR_TEXT);
@ -158,7 +165,47 @@ void SohMenu::AddMenuRandomizer() {
.CVar(CVAR_WINDOW("CheckTrackerSettings")) .CVar(CVAR_WINDOW("CheckTrackerSettings"))
.RaceDisable(false) .RaceDisable(false)
.WindowName("Check Tracker Settings") .WindowName("Check Tracker Settings")
.HideInSearch(true)
.Options(WindowButtonOptions().Tooltip("Enables the separate Check Tracker Settings Window.")); .Options(WindowButtonOptions().Tooltip("Enables the separate Check Tracker Settings Window."));
AddSearchEntry({ "Background Color", "Randomizer", "Item Tracker", "General Settings" });
AddSearchEntry({ "Window Type", "Randomizer", "Item Tracker", "General Settings" });
AddSearchEntry({ "Enable Dragging", "Randomizer", "Item Tracker", "General Settings" });
AddSearchEntry({ "Only Enable While Paused", "Randomizer", "Item Tracker", "General Settings" });
AddSearchEntry({ "Ammo/Capacity Tracking", "Randomizer", "Item Tracker", "General Settings" });
AddSearchEntry({ "Key Count Tracking", "Randomizer", "Item Tracker", "General Settings" });
AddSearchEntry({ "Triforce Piece Count Tracking", "Randomizer", "Item Tracker", "General Settings" });
AddSearchEntry({ "Dungeon Items", "Randomizer", "Item Tracker", "General Settings", "keys maps compasses icon" });
AddSearchEntry({ "Greg", "Randomizer", "Item Tracker", "General Settings", "icon" });
AddSearchEntry({ "Triforce Pieces", "Randomizer", "Item Tracker", "General Settings", "icon" });
AddSearchEntry({ "Boss Souls", "Randomizer", "Item Tracker", "General Settings", "icon" });
AddSearchEntry({ "Ocarina Buttons", "Randomizer", "Item Tracker", "General Settings", "icon" });
AddSearchEntry({ "Overworld Keys", "Randomizer", "Item Tracker", "General Settings", "icon" });
AddSearchEntry({ "Fishing Pole", "Randomizer", "Item Tracker", "General Settings", "icon" });
AddSearchEntry({ "Personal Notes", "Randomizer", "Item Tracker", "General Settings", "icon" });
AddSearchEntry({ "Show Hookshot Identifiers", "Randomizer", "Item Tracker", "General Settings", "longshot icon" });
AddSearchEntry({ "Sort By", "Randomizer", "Entrance Tracker", "(Col 1)" });
AddSearchEntry({ "Auto Scroll", "Randomizer", "Entrance Tracker", "(Col 1)" });
AddSearchEntry({ "Highlight Previous", "Randomizer", "Entrance Tracker", "(Col 1)" });
AddSearchEntry({ "Highlight Available", "Randomizer", "Entrance Tracker", "(Col 1)" });
AddSearchEntry({ "Hide Undiscovered", "Randomizer", "Entrance Tracker", "(Col 1)" });
AddSearchEntry({ "Hide Reverse", "Randomizer", "Entrance Tracker", "(Col 1)" });
AddSearchEntry({ "Group By", "Randomizer", "Entrance Tracker", "(Col 2)" });
AddSearchEntry({ "Show Source", "Randomizer", "Entrance Tracker", "(Col 2)", "spoil" });
AddSearchEntry({ "Show Destination", "Randomizer", "Entrance Tracker", "(Col 2)", "spoil" });
AddSearchEntry({ "Background Color", "Randomizer", "Check Tracker", "General Settings" });
AddSearchEntry({ "Window Type", "Randomizer", "Check Tracker", "General Settings" });
AddSearchEntry({ "Vanilla/MQ Dungeon Spoilers", "Randomizer", "Check Tracker", "General Settings" });
AddSearchEntry({ "Hide Unshuffled Shop Item Checks", "Randomizer", "Check Tracker", "General Settings" });
AddSearchEntry({ "Always Show Gold Skulltulas", "Randomizer", "Check Tracker", "General Settings" });
AddSearchEntry({ "Show Logic", "Randomizer", "Check Tracker", "General Settings" });
AddSearchEntry({ "Display Check Availability", "Randomizer", "Check Tracker", "General Settings" });
AddSearchEntry({ "Area Complete", "Randomizer", "Check Tracker", "Section Settings", "hide" });
AddSearchEntry({ "Skipped", "Randomizer", "Check Tracker", "Section Settings", "hide" });
AddSearchEntry({ "Scummed", "Randomizer", "Check Tracker", "Section Settings", "hide" });
AddSearchEntry({ "Saved", "Randomizer", "Check Tracker", "Section Settings", "hide" });
} }
} // namespace SohGui } // namespace SohGui

View file

@ -433,6 +433,7 @@ void SohMenu::AddMenuSettings() {
.CVar(CVAR_WINDOW("ControllerConfiguration")) .CVar(CVAR_WINDOW("ControllerConfiguration"))
.RaceDisable(false) .RaceDisable(false)
.WindowName("Configure Controller") .WindowName("Configure Controller")
.HideInSearch(true)
.Options(WindowButtonOptions().Tooltip("Enables the separate Bindings Window.")); .Options(WindowButtonOptions().Tooltip("Enables the separate Bindings Window."));
// Input Viewer // Input Viewer
@ -443,6 +444,7 @@ void SohMenu::AddMenuSettings() {
.CVar(CVAR_WINDOW("InputViewer")) .CVar(CVAR_WINDOW("InputViewer"))
.RaceDisable(false) .RaceDisable(false)
.WindowName("Input Viewer") .WindowName("Input Viewer")
.HideInSearch(true)
.Options(WindowButtonOptions().Tooltip("Toggles the Input Viewer.").EmbedWindow(false)); .Options(WindowButtonOptions().Tooltip("Toggles the Input Viewer.").EmbedWindow(false));
AddWidget(path, "Input Viewer Settings", WIDGET_SEPARATOR_TEXT); AddWidget(path, "Input Viewer Settings", WIDGET_SEPARATOR_TEXT);
@ -450,6 +452,7 @@ void SohMenu::AddMenuSettings() {
.CVar(CVAR_WINDOW("InputViewerSettings")) .CVar(CVAR_WINDOW("InputViewerSettings"))
.RaceDisable(false) .RaceDisable(false)
.WindowName("Input Viewer Settings") .WindowName("Input Viewer Settings")
.HideInSearch(true)
.Options(WindowButtonOptions().Tooltip("Enables the separate Input Viewer Settings Window.")); .Options(WindowButtonOptions().Tooltip("Enables the separate Input Viewer Settings Window."));
// Notifications // Notifications