More Menu Improvements (#5155)

* fix mismatch on default value for notification position

* Fix checkbox vertical offset for multiline

* Moooore changeees too theee menuuuuuu

* capitalization again

* Fix controller config & remove test var
This commit is contained in:
aMannus 2025-03-20 20:19:16 +01:00 committed by GitHub
parent 65564e9469
commit b6f957b36f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 61 additions and 30 deletions

View file

@ -1501,10 +1501,10 @@ void SohInputEditorWindow::DrawLinkTab() {
} }
if (ImGui::CollapsingHeader("D-Pad", NULL, ImGuiTreeNodeFlags_DefaultOpen)) { if (ImGui::CollapsingHeader("D-Pad", NULL, ImGuiTreeNodeFlags_DefaultOpen)) {
DrawButtonLine(StringHelper::Sprintf("%s", ICON_FA_ARROW_UP).c_str(), portIndex, BTN_DUP); DrawButtonLine(StringHelper::Sprintf("D %s", ICON_FA_ARROW_UP).c_str(), portIndex, BTN_DUP);
DrawButtonLine(StringHelper::Sprintf("%s", ICON_FA_ARROW_DOWN).c_str(), portIndex, BTN_DDOWN); DrawButtonLine(StringHelper::Sprintf("D %s", ICON_FA_ARROW_DOWN).c_str(), portIndex, BTN_DDOWN);
DrawButtonLine(StringHelper::Sprintf("%s", ICON_FA_ARROW_LEFT).c_str(), portIndex, BTN_DLEFT); DrawButtonLine(StringHelper::Sprintf("D %s", ICON_FA_ARROW_LEFT).c_str(), portIndex, BTN_DLEFT);
DrawButtonLine(StringHelper::Sprintf("%s", ICON_FA_ARROW_RIGHT).c_str(), portIndex, BTN_DRIGHT); DrawButtonLine(StringHelper::Sprintf("D %s", ICON_FA_ARROW_RIGHT).c_str(), portIndex, BTN_DRIGHT);
} }
if (ImGui::CollapsingHeader("Analog Stick", NULL, ImGuiTreeNodeFlags_DefaultOpen)) { if (ImGui::CollapsingHeader("Analog Stick", NULL, ImGuiTreeNodeFlags_DefaultOpen)) {
@ -1782,6 +1782,11 @@ void SohInputEditorWindow::DrawSetDefaultsButton(uint8_t portIndex) {
} }
void SohInputEditorWindow::DrawElement() { void SohInputEditorWindow::DrawElement() {
ImGui::PushFont(OTRGlobals::Instance->fontMonoLarger);
ImVec4 themeColor = ColorValues.at(THEME_COLOR);
ImGui::PushStyleColor(ImGuiCol_Tab, ImVec4(themeColor.x, themeColor.y, themeColor.z, 0.8f));
ImGui::PushStyleColor(ImGuiCol_TabHovered, ImVec4(themeColor.x, themeColor.y, themeColor.z, 0.6f));
ImGui::PushStyleColor(ImGuiCol_TabActive, ImVec4(themeColor.x, themeColor.y, themeColor.z, 0.6f));
ImGui::BeginTabBar("##ControllerConfigPortTabs"); ImGui::BeginTabBar("##ControllerConfigPortTabs");
DrawLinkTab(); DrawLinkTab();
DrawIvanTab(); DrawIvanTab();
@ -1790,4 +1795,6 @@ void SohInputEditorWindow::DrawElement() {
DrawDebugPortTab(3); DrawDebugPortTab(3);
} }
ImGui::EndTabBar(); ImGui::EndTabBar();
ImGui::PopStyleColor(3);
ImGui::PopFont();
} }

View file

@ -20,7 +20,7 @@ void Window::Draw() {
const float margin = 30.0f; const float margin = 30.0f;
const float padding = 10.0f; const float padding = 10.0f;
int position = CVarGetInteger(CVAR_SETTING("Notifications.Position"), 0); int position = CVarGetInteger(CVAR_SETTING("Notifications.Position"), 3);
// Top Left // Top Left
ImVec2 basePosition; ImVec2 basePosition;

View file

@ -519,6 +519,10 @@ void Menu::DrawElement() {
ImGui::SetNextWindowPos(ImGui::GetMainViewport()->GetCenter(), windowCond, { 0.5f, 0.5f }); ImGui::SetNextWindowPos(ImGui::GetMainViewport()->GetCenter(), windowCond, { 0.5f, 0.5f });
ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0.0f); ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0.0f);
} }
ImGui::PushStyleColor(ImGuiCol_WindowBg,
ImVec4(0, 0, 0, CVarGetFloat(CVAR_SETTING("Menu.BackgroundOpacity"), 0.85f)));
if (!ImGui::Begin("Main Menu", NULL, windowFlags)) { if (!ImGui::Begin("Main Menu", NULL, windowFlags)) {
if (!popout) { if (!popout) {
ImGui::PopStyleVar(); ImGui::PopStyleVar();
@ -526,6 +530,9 @@ void Menu::DrawElement() {
ImGui::End(); ImGui::End();
return; return;
} }
ImGui::PopStyleColor();
if (popped != popout) { if (popped != popout) {
if (!popout) { if (!popout) {
ImGui::PopStyleVar(); ImGui::PopStyleVar();

View file

@ -116,7 +116,7 @@ void SohMenu::AddMenuEnhancements() {
AddWidget(path, "Nighttime GS Always Spawn", WIDGET_CVAR_CHECKBOX) AddWidget(path, "Nighttime GS Always Spawn", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_ENHANCEMENT("NightGSAlwaysSpawn")) .CVar(CVAR_ENHANCEMENT("NightGSAlwaysSpawn"))
.Options(CheckboxOptions().Tooltip("Nighttime Skulltulas will spawn during both day and night.")); .Options(CheckboxOptions().Tooltip("Nighttime Skulltulas will spawn during both day and night."));
AddWidget(path, "Pull Grave during the day", WIDGET_CVAR_CHECKBOX) AddWidget(path, "Pull Grave During the Day", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_ENHANCEMENT("DayGravePull")) .CVar(CVAR_ENHANCEMENT("DayGravePull"))
.Options(CheckboxOptions().Tooltip("Allows graves to be pulled when child during the day.")); .Options(CheckboxOptions().Tooltip("Allows graves to be pulled when child during the day."));
AddWidget(path, "Dampe Appears All Night", WIDGET_CVAR_CHECKBOX) AddWidget(path, "Dampe Appears All Night", WIDGET_CVAR_CHECKBOX)
@ -140,7 +140,7 @@ void SohMenu::AddMenuEnhancements() {
.DisabledTooltip("This is not compatible with the Locked Overworld Doors Randomizer option.")); .DisabledTooltip("This is not compatible with the Locked Overworld Doors Randomizer option."));
AddWidget(path, "Pause Menu", WIDGET_SEPARATOR_TEXT); AddWidget(path, "Pause Menu", WIDGET_SEPARATOR_TEXT);
AddWidget(path, "Allow the Cursor to be on any slot", WIDGET_CVAR_COMBOBOX) AddWidget(path, "Allow the Cursor to be on Any Slot", WIDGET_CVAR_COMBOBOX)
.CVar(CVAR_ENHANCEMENT("PauseAnyCursor")) .CVar(CVAR_ENHANCEMENT("PauseAnyCursor"))
.Options( .Options(
ComboboxOptions() ComboboxOptions()
@ -163,7 +163,7 @@ void SohMenu::AddMenuEnhancements() {
.Options(CheckboxOptions().Tooltip( .Options(CheckboxOptions().Tooltip(
"Removes the Input Requirement on Text boxes after defeating Ganon, allowing the Credits " "Removes the Input Requirement on Text boxes after defeating Ganon, allowing the Credits "
"Sequence to continue to progress.")); "Sequence to continue to progress."));
AddWidget(path, "Include Held Inputs at the Start of Buffer Input Window", WIDGET_CVAR_CHECKBOX) AddWidget(path, "Include Held Inputs at the Start of Pause Buffer Input Window", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_ENHANCEMENT("IncludeHeldInputsBufferWindow")) .CVar(CVAR_ENHANCEMENT("IncludeHeldInputsBufferWindow"))
.Options(CheckboxOptions().Tooltip( .Options(CheckboxOptions().Tooltip(
"Typically, inputs that are held prior to the buffer window are not included in the buffer. This " "Typically, inputs that are held prior to the buffer window are not included in the buffer. This "
@ -171,7 +171,15 @@ void SohMenu::AddMenuEnhancements() {
"undesireably, for instance Z-Targetting something you might not want to.")); "undesireably, for instance Z-Targetting something you might not want to."));
AddWidget(path, "Pause Buffer Input Window: %d frames", WIDGET_CVAR_SLIDER_INT) AddWidget(path, "Pause Buffer Input Window: %d frames", WIDGET_CVAR_SLIDER_INT)
.CVar(CVAR_ENHANCEMENT("PauseBufferWindow")) .CVar(CVAR_ENHANCEMENT("PauseBufferWindow"))
.Options(IntSliderOptions().Min(0).Max(40).DefaultValue(0).Format("%d frames")); .Options(IntSliderOptions()
.Min(0)
.Max(40)
.DefaultValue(0)
.Format("%d frames")
.Tooltip("Adds back in a delay after unpausing before the game resumes playing again, "
"where inputs can be held prematurely to be input immediately after the game resumes. "
"This essentially brings back behaviour from console releases which are lost on default "
"because SoH isn't limited to N64 hardware."));
AddWidget(path, "Simulated Input Lag: %d frames", WIDGET_CVAR_SLIDER_INT) AddWidget(path, "Simulated Input Lag: %d frames", WIDGET_CVAR_SLIDER_INT)
.CVar(CVAR_SIMULATED_INPUT_LAG) .CVar(CVAR_SIMULATED_INPUT_LAG)
.Options(IntSliderOptions() .Options(IntSliderOptions()
@ -214,7 +222,7 @@ void SohMenu::AddMenuEnhancements() {
"The default response to Kaepora Gaebora is always that you understood what he said.")); "The default response to Kaepora Gaebora is always that you understood what he said."));
AddWidget(path, "Convenience", WIDGET_SEPARATOR_TEXT); AddWidget(path, "Convenience", WIDGET_SEPARATOR_TEXT);
AddWidget(path, "Quit Fishing At Door", WIDGET_CVAR_CHECKBOX) AddWidget(path, "Quit Fishing at Door", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_ENHANCEMENT("QuitFishingAtDoor")) .CVar(CVAR_ENHANCEMENT("QuitFishingAtDoor"))
.Options(CheckboxOptions().Tooltip( .Options(CheckboxOptions().Tooltip(
"Fisherman asks if you want to quit at the door if you try to leave the Fishing Pond " "Fisherman asks if you want to quit at the door if you try to leave the Fishing Pond "
@ -222,7 +230,7 @@ void SohMenu::AddMenuEnhancements() {
AddWidget(path, "Instant Putaway", WIDGET_CVAR_CHECKBOX) AddWidget(path, "Instant Putaway", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_ENHANCEMENT("InstantPutaway")) .CVar(CVAR_ENHANCEMENT("InstantPutaway"))
.Options(CheckboxOptions().Tooltip("Allow Link to put items away without having to wait around.")); .Options(CheckboxOptions().Tooltip("Allow Link to put items away without having to wait around."));
AddWidget(path, "Navi Timer Resets", WIDGET_CVAR_CHECKBOX) AddWidget(path, "Navi Timer Resets on Scene Change", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_ENHANCEMENT("ResetNaviTimer")) .CVar(CVAR_ENHANCEMENT("ResetNaviTimer"))
.Options( .Options(
CheckboxOptions().Tooltip("Resets the Navi timer on scene change. If you have already talked to her, " CheckboxOptions().Tooltip("Resets the Navi timer on scene change. If you have already talked to her, "
@ -459,11 +467,6 @@ void SohMenu::AddMenuEnhancements() {
.CVar(CVAR_ENHANCEMENT("NewDrops")) .CVar(CVAR_ENHANCEMENT("NewDrops"))
.Options(CheckboxOptions().Tooltip( .Options(CheckboxOptions().Tooltip(
"Replaces most 2D items and projectiles on the overworld with their equivalent 3D models.")); "Replaces most 2D items and projectiles on the overworld with their equivalent 3D models."));
AddWidget(path, "Invisible Bunny Hood", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_ENHANCEMENT("HideBunnyHood"))
.Options(CheckboxOptions().Tooltip(
"Turns Bunny Hood Invisible while still maintaining its effects."
));
AddWidget(path, "Animated Link in Pause Menu", WIDGET_CVAR_CHECKBOX) AddWidget(path, "Animated Link in Pause Menu", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_ENHANCEMENT("PauseMenuAnimatedLink")) .CVar(CVAR_ENHANCEMENT("PauseMenuAnimatedLink"))
.Options(CheckboxOptions().Tooltip( .Options(CheckboxOptions().Tooltip(
@ -523,7 +526,7 @@ void SohMenu::AddMenuEnhancements() {
AddWidget(path, "Disable HUD Heart Animations", WIDGET_CVAR_CHECKBOX) AddWidget(path, "Disable HUD Heart Animations", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_ENHANCEMENT("NoHUDHeartAnimation")) .CVar(CVAR_ENHANCEMENT("NoHUDHeartAnimation"))
.Options(CheckboxOptions().Tooltip("Disables the Beating Animation of the Hearts on the HUD.")); .Options(CheckboxOptions().Tooltip("Disables the Beating Animation of the Hearts on the HUD."));
AddWidget(path, "Glitch line-up tick", WIDGET_CVAR_CHECKBOX) AddWidget(path, "Glitch Line-up Tick", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_ENHANCEMENT("DrawLineupTick")) .CVar(CVAR_ENHANCEMENT("DrawLineupTick"))
.Options(CheckboxOptions().Tooltip( .Options(CheckboxOptions().Tooltip(
"Displays a tick in the top center of the screen to help with glitch line-ups in SoH, since traditional " "Displays a tick in the top center of the screen to help with glitch line-ups in SoH, since traditional "
@ -549,7 +552,9 @@ void SohMenu::AddMenuEnhancements() {
.Options(CheckboxOptions().Tooltip( .Options(CheckboxOptions().Tooltip(
"Ammo counts in the pause menu will work correctly regardless of the position of items in the Inventory.")); "Ammo counts in the pause menu will work correctly regardless of the position of items in the Inventory."));
AddWidget(path, "Enable Passage of Time on File Select", WIDGET_CVAR_CHECKBOX) AddWidget(path, "Enable Passage of Time on File Select", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_ENHANCEMENT("TimeFlowFileSelect")); .CVar(CVAR_ENHANCEMENT("TimeFlowFileSelect"))
.Options(CheckboxOptions().Tooltip(
"The skybox in the background of the File Select screen will go through the day and night cycle over time."));
path.column = SECTION_COLUMN_3; path.column = SECTION_COLUMN_3;
AddWidget(path, "Misc.", WIDGET_SEPARATOR_TEXT); AddWidget(path, "Misc.", WIDGET_SEPARATOR_TEXT);
@ -690,6 +695,9 @@ void SohMenu::AddMenuEnhancements() {
"- When saving and quitting\n" "- When saving and quitting\n"
"- When dying\n" "- When dying\n"
"- When traveling thru time (if \"Masks Equippable as Adult\" is activated).")); "- When traveling thru time (if \"Masks Equippable as Adult\" is activated)."));
AddWidget(path, "Invisible Bunny Hood", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_ENHANCEMENT("HideBunnyHood"))
.Options(CheckboxOptions().Tooltip("Turns Bunny Hood Invisible while still maintaining its effects."));
AddWidget(path, "Mask Select in Inventory", WIDGET_CVAR_CHECKBOX) AddWidget(path, "Mask Select in Inventory", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_ENHANCEMENT("MaskSelect")) .CVar(CVAR_ENHANCEMENT("MaskSelect"))
.Options(CheckboxOptions().Tooltip( .Options(CheckboxOptions().Tooltip(
@ -962,7 +970,7 @@ void SohMenu::AddMenuEnhancements() {
"Only relevant for playthroughs involving Master Quest Dungeons.")); "Only relevant for playthroughs involving Master Quest Dungeons."));
AddWidget(path, "Desync Fixes", WIDGET_SEPARATOR_TEXT); AddWidget(path, "Desync Fixes", WIDGET_SEPARATOR_TEXT);
AddWidget(path, "Fix Darunia Dancing Too Fast", WIDGET_CVAR_CHECKBOX) AddWidget(path, "Fix Darunia Dancing too Fast", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_ENHANCEMENT("FixDaruniaDanceSpeed")) .CVar(CVAR_ENHANCEMENT("FixDaruniaDanceSpeed"))
.Options(CheckboxOptions().Tooltip( .Options(CheckboxOptions().Tooltip(
"Fixes Darunia's dancing speed so he dances to the beat of Saria's Song, like in the Original Game.")); "Fixes Darunia's dancing speed so he dances to the beat of Saria's Song, like in the Original Game."));
@ -1265,7 +1273,7 @@ void SohMenu::AddMenuEnhancements() {
.CVar(CVAR_ENHANCEMENT("FrogsUnlimitedFailTime")) .CVar(CVAR_ENHANCEMENT("FrogsUnlimitedFailTime"))
.PreFunc(frogsOcarinaGameDisabledFunc) .PreFunc(frogsOcarinaGameDisabledFunc)
.Options(CheckboxOptions().Tooltip("Removes the timer to play back the song.")); .Options(CheckboxOptions().Tooltip("Removes the timer to play back the song."));
AddWidget(path, "Modify note timer: %dx", WIDGET_CVAR_SLIDER_INT) AddWidget(path, "Modify Note Timer: %dx", WIDGET_CVAR_SLIDER_INT)
.CVar(CVAR_ENHANCEMENT("FrogsModifyFailTime")) .CVar(CVAR_ENHANCEMENT("FrogsModifyFailTime"))
.PreFunc([](WidgetInfo& info) { .PreFunc([](WidgetInfo& info) {
info.options->disabled = !CVarGetInteger(CVAR_ENHANCEMENT("CustomizeFrogsOcarinaGame"), 0) || info.options->disabled = !CVarGetInteger(CVAR_ENHANCEMENT("CustomizeFrogsOcarinaGame"), 0) ||
@ -1353,11 +1361,11 @@ void SohMenu::AddMenuEnhancements() {
.CVar(CVAR_ENHANCEMENT("GuaranteeFishingBite")) .CVar(CVAR_ENHANCEMENT("GuaranteeFishingBite"))
.PreFunc(fishingDisabledFunc) .PreFunc(fishingDisabledFunc)
.Options(CheckboxOptions().Tooltip("When a line is stable, guarantee bite. Otherwise use Default logic.")); .Options(CheckboxOptions().Tooltip("When a line is stable, guarantee bite. Otherwise use Default logic."));
AddWidget(path, "Fish Never Escape", WIDGET_CVAR_CHECKBOX) AddWidget(path, "Fish never Escape", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_ENHANCEMENT("FishNeverEscape")) .CVar(CVAR_ENHANCEMENT("FishNeverEscape"))
.PreFunc(fishingDisabledFunc) .PreFunc(fishingDisabledFunc)
.Options(CheckboxOptions().Tooltip("Once a hook as been set, Fish will never let go while being reeled in.")); .Options(CheckboxOptions().Tooltip("Once a hook as been set, Fish will never let go while being reeled in."));
AddWidget(path, "Loaches Always Appear", WIDGET_CVAR_CHECKBOX) AddWidget(path, "Loaches always Appear", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_ENHANCEMENT("LoachesAlwaysAppear")) .CVar(CVAR_ENHANCEMENT("LoachesAlwaysAppear"))
.PreFunc(fishingDisabledFunc) .PreFunc(fishingDisabledFunc)
.Options( .Options(
@ -1416,7 +1424,7 @@ void SohMenu::AddMenuEnhancements() {
"Enables Ivan the Fairy upon the next map change. Player 2 can control Ivan and press the C-Buttons to " "Enables Ivan the Fairy upon the next map change. Player 2 can control Ivan and press the C-Buttons to "
"use items and mess with Player 1!" "use items and mess with Player 1!"
)); ));
AddWidget(path, "Dogs Follow you Everywhere", WIDGET_CVAR_CHECKBOX) AddWidget(path, "Dogs Follow You Everywhere", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_ENHANCEMENT("DogFollowsEverywhere")) .CVar(CVAR_ENHANCEMENT("DogFollowsEverywhere"))
.Options(CheckboxOptions().Tooltip("Allows dogs to follow you anywhere you go, even if you leave the Market.")); .Options(CheckboxOptions().Tooltip("Allows dogs to follow you anywhere you go, even if you leave the Market."));
AddWidget(path, "Rupee Dash Mode", WIDGET_CVAR_CHECKBOX) AddWidget(path, "Rupee Dash Mode", WIDGET_CVAR_CHECKBOX)
@ -1554,7 +1562,7 @@ void SohMenu::AddMenuEnhancements() {
.PreFunc([](WidgetInfo& info) { .PreFunc([](WidgetInfo& info) {
info.isHidden = !CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0); info.isHidden = !CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0);
}); });
AddWidget(path, "Select All Enemies", WIDGET_CVAR_CHECKBOX) AddWidget(path, "Select all Enemies", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_ENHANCEMENT("RandomizedEnemyList.All")) .CVar(CVAR_ENHANCEMENT("RandomizedEnemyList.All"))
.PreFunc([](WidgetInfo& info) { .PreFunc([](WidgetInfo& info) {
info.isHidden = !CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0); info.isHidden = !CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0);
@ -1635,14 +1643,14 @@ void SohMenu::AddMenuEnhancements() {
.CVar(CVAR_CHEAT("NoRedeadFreeze")) .CVar(CVAR_CHEAT("NoRedeadFreeze"))
.Options( .Options(
CheckboxOptions().Tooltip("Prevents ReDeads and Gibdos from being able to freeze you with their scream.")); CheckboxOptions().Tooltip("Prevents ReDeads and Gibdos from being able to freeze you with their scream."));
AddWidget(path, "Keese/Guay Don't Target You", WIDGET_CVAR_CHECKBOX) AddWidget(path, "Keese/Guay don't Target You", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_CHEAT("NoKeeseGuayTarget")) .CVar(CVAR_CHEAT("NoKeeseGuayTarget"))
.Options(CheckboxOptions().Tooltip( .Options(CheckboxOptions().Tooltip(
"Keese and Guay no longer target you and simply ignore you as if you were wearing the " "Keese and Guay no longer target you and simply ignore you as if you were wearing the "
"Skull Mask.")); "Skull Mask."));
AddWidget(path, "Glitch Aids", WIDGET_SEPARATOR_TEXT); AddWidget(path, "Glitch Aids", WIDGET_SEPARATOR_TEXT);
AddWidget(path, "Easy Frame Advancing", WIDGET_CVAR_CHECKBOX) AddWidget(path, "Easy Frame Advancing with Pause", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_CHEAT("EasyFrameAdvance")) .CVar(CVAR_CHEAT("EasyFrameAdvance"))
.Options(CheckboxOptions().Tooltip( .Options(CheckboxOptions().Tooltip(
"Continue holding START button when unpausing to only advance a single frame and then re-pause.")); "Continue holding START button when unpausing to only advance a single frame and then re-pause."));
@ -1664,10 +1672,10 @@ void SohMenu::AddMenuEnhancements() {
.CVar(CVAR_CHEAT("DropsDontDie")) .CVar(CVAR_CHEAT("DropsDontDie"))
.Options( .Options(
CheckboxOptions().Tooltip("Drops from enemies, grass, etc. don't disappear after a set amount of time.")); CheckboxOptions().Tooltip("Drops from enemies, grass, etc. don't disappear after a set amount of time."));
AddWidget(path, "Fish Don't Despawn", WIDGET_CVAR_CHECKBOX) AddWidget(path, "Fish don't Despawn", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_CHEAT("NoFishDespawn")) .CVar(CVAR_CHEAT("NoFishDespawn"))
.Options(CheckboxOptions().Tooltip("Prevents fish from automatically despawning after a while when dropped.")); .Options(CheckboxOptions().Tooltip("Prevents fish from automatically despawning after a while when dropped."));
AddWidget(path, "Bugs Don't Despawn", WIDGET_CVAR_CHECKBOX) AddWidget(path, "Bugs don't Despawn", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_CHEAT("NoBugsDespawn")) .CVar(CVAR_CHEAT("NoBugsDespawn"))
.Options(CheckboxOptions().Tooltip("Prevents bugs from automatically despawning after a while when dropped.")); .Options(CheckboxOptions().Tooltip("Prevents bugs from automatically despawning after a while when dropped."));

View file

@ -55,7 +55,7 @@ void SohMenu::AddMenuSettings() {
WidgetPath path = { "Settings", "General", SECTION_COLUMN_1 }; WidgetPath path = { "Settings", "General", SECTION_COLUMN_1 };
// General - Settings // General - Settings
AddWidget(path, "General Settings", WIDGET_SEPARATOR_TEXT); AddWidget(path, "Menu Settings", WIDGET_SEPARATOR_TEXT);
AddWidget(path, "Menu Theme", WIDGET_CVAR_COMBOBOX) AddWidget(path, "Menu Theme", WIDGET_CVAR_COMBOBOX)
.CVar(CVAR_SETTING("Menu.Theme")) .CVar(CVAR_SETTING("Menu.Theme"))
.Options(ComboboxOptions() .Options(ComboboxOptions()
@ -69,6 +69,14 @@ void SohMenu::AddMenuSettings() {
"Allows controller navigation of the port menu (Settings, Enhancements,...)\nCAUTION: " "Allows controller navigation of the port menu (Settings, Enhancements,...)\nCAUTION: "
"This will disable game inputs while the menu is visible.\n\nD-pad to move between " "This will disable game inputs while the menu is visible.\n\nD-pad to move between "
"items, A to select, B to move up in scope.")); "items, A to select, B to move up in scope."));
AddWidget(path, "Menu Background Opacity", WIDGET_CVAR_SLIDER_FLOAT)
.CVar(CVAR_SETTING("Menu.BackgroundOpacity"))
.Options(FloatSliderOptions()
.DefaultValue(0.85f)
.IsPercentage()
.Tooltip("Sets the opacity of the background of the port menu."));
AddWidget(path, "General Settings", WIDGET_SEPARATOR_TEXT);
AddWidget(path, "Cursor Always Visible", WIDGET_CVAR_CHECKBOX) AddWidget(path, "Cursor Always Visible", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_SETTING("CursorVisibility")) .CVar(CVAR_SETTING("CursorVisibility"))
.Callback([](WidgetInfo& info) { .Callback([](WidgetInfo& info) {

View file

@ -330,7 +330,8 @@ bool Checkbox(const char* _label, bool* value, const CheckboxOptions& options) {
if (options.labelPosition == LabelPositions::Above) { if (options.labelPosition == LabelPositions::Above) {
checkPos.y += label_size.y + (style.ItemInnerSpacing.y * 2.0f); checkPos.y += label_size.y + (style.ItemInnerSpacing.y * 2.0f);
} else { } else {
labelPos.y += (square_sz / 2) - (label_size.y / 2); // Center with checkbox automatically
labelPos.y += ImGui::CalcTextSize("g").y / 8;
} }
if (options.alignment == ComponentAlignments::Right) { if (options.alignment == ComponentAlignments::Right) {
checkPos.x = total_bb.Max.x - square_sz; checkPos.x = total_bb.Max.x - square_sz;