From f6c310ae84db6f03f9f5a12cc7ff08d6c227c083 Mon Sep 17 00:00:00 2001 From: PurpleHato Date: Sat, 28 Jan 2023 18:02:38 +0100 Subject: [PATCH] TWEAK: Controller Navigation rename + tooltip (#2407) * TWEAK: Controller Navigation rename + tooltip * TWEAK: add back FW * TWEAK: Button size + name * TWEAK: Tooltip and text position * TWEAK: added a PaddedSeparator * TWEAK: Removed the padding from aMannus Request --- soh/soh/GameMenuBar.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/soh/soh/GameMenuBar.cpp b/soh/soh/GameMenuBar.cpp index 48eb99240..0a778bb80 100644 --- a/soh/soh/GameMenuBar.cpp +++ b/soh/soh/GameMenuBar.cpp @@ -150,23 +150,24 @@ namespace GameMenuBar { if (ImGui::BeginMenu("Controller")) { ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2 (12.0f, 6.0f)); - ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0, 0)); + ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, ImVec2(0.0f, 0.0f)); ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 1.0f); ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0.22f, 0.38f, 0.56f, 1.0f)); - if (ImGui::Button(GetWindowButtonText("Controller Configuration", CVarGetInteger("gControllerConfigurationEnabled", 0)).c_str())) + if (ImGui::Button(GetWindowButtonText("Controller Configuration", CVarGetInteger("gControllerConfigurationEnabled", 0)).c_str(), ImVec2 (-1.0f, 0.0f))) { bool currentValue = CVarGetInteger("gControllerConfigurationEnabled", 0); CVarSetInteger("gControllerConfigurationEnabled", !currentValue); SohImGui::RequestCvarSaveOnNextTick(); SohImGui::ToggleInputEditorWindow(CVarGetInteger("gControllerConfigurationEnabled", 0)); } + UIWidgets::PaddedSeparator(); ImGui::PopStyleColor(1); ImGui::PopStyleVar(3); #ifndef __SWITCH__ - UIWidgets::PaddedEnhancementCheckbox("Use Controller Navigation", "gControlNav", true, false); - UIWidgets::Tooltip("Allows controller navigation of the menu bar\nD-pad to move between items, A to select, and X to grab focus on the menu bar"); + UIWidgets::EnhancementCheckbox("Menubar Controller Navigation", "gControlNav"); + UIWidgets::Tooltip("Allows controller navigation of the SOH menu bar (Settings, Enhancements,...)\nCAUTION: This will disable game inputs while the menubar is visible.\n\nD-pad to move between items, A to select, and X to grab focus on the menu bar"); #endif - UIWidgets::PaddedEnhancementCheckbox("Show Inputs", "gInputEnabled", true, false); + UIWidgets::EnhancementCheckbox("Show Inputs", "gInputEnabled"); UIWidgets::Tooltip("Shows currently pressed inputs on the bottom right of the screen"); UIWidgets::Spacer(0); ImGui::PushItemWidth(ImGui::GetWindowSize().x - 20.0f);