From 899b9488fe7aab07c500aa1a194c06bcd93ff83c Mon Sep 17 00:00:00 2001 From: FakeMichau <49685661+FakeMichau@users.noreply.github.com> Date: Mon, 5 Oct 2026 23:23:33 +0200 Subject: [PATCH] Swap positions of Open Wiki and Close buttons Hopefully you will quickly learn to not open the wiki constantly. But maybe some will learn that we have a wiki this way. --- OptiScaler/menu/menu_common.cpp | 39 ++++++++++++++++----------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/OptiScaler/menu/menu_common.cpp b/OptiScaler/menu/menu_common.cpp index ee09308c..d1ad0518 100644 --- a/OptiScaler/menu/menu_common.cpp +++ b/OptiScaler/menu/menu_common.cpp @@ -8312,6 +8312,25 @@ void MenuCommon::RenderMainMenuBottomBar(RenderMenuContext& ctx) auto& io = ctx.io; // BOTTOM LINE --------------- + if (ImGui::Button("Open Wiki")) + { + auto pIO = &ImGui::GetPlatformIO(); + auto ctx = ImGui::GetCurrentContext(); + pIO->Platform_OpenInShellFn(ctx, "https://github.com/optiscaler/OptiScaler/wiki"); + } + ShowTooltip("Click to open the OptiScaler Wiki page\nin your default browser\n\n" + "Compatibility list with known game issues\nand workarounds, FG options explained\n" + "and other useful info"); + + ImGui::SameLine(); + + auto& style = ImGui::GetStyle(); + float rightButtonsWidth = + ImGui::CalcTextSize("Save Settings").x + ImGui::CalcTextSize("Close").x + style.FramePadding.x * 4.0f + 6.0f; + + float avail = ImGui::GetContentRegionAvail().x; + ImGui::SetCursorPosX(ImGui::GetCursorPosX() + avail - rightButtonsWidth); + if (ImGui::Button("Save Settings")) config->SaveIni(); @@ -8330,26 +8349,6 @@ void MenuCommon::RenderMainMenuBottomBar(RenderMenuContext& ctx) io.WantCaptureKeyboard = false; io.WantCaptureMouse = false; } - - ImGui::SameLine(); - - auto textSize = ImGui::CalcTextSize("Open Wiki"); - auto& style = ImGui::GetStyle(); - textSize.x += style.FramePadding.x * 2.0f; - - float avail = ImGui::GetContentRegionAvail().x; - ImGui::SetCursorPosX(ImGui::GetCursorPosX() + avail - textSize.x); - - // Make button text underline - if (ImGui::Button("Open Wiki")) - { - auto pIO = &ImGui::GetPlatformIO(); - auto ctx = ImGui::GetCurrentContext(); - pIO->Platform_OpenInShellFn(ctx, "https://github.com/optiscaler/OptiScaler/wiki"); - } - ShowTooltip("Click to open the OptiScaler Wiki page\nin your default browser\n\n" - "Compatibility list with known game issues\nand workarounds, FG options explained\n" - "and other useful info"); } void MenuCommon::RenderMipmapBiasWindow(RenderMenuContext& ctx, ImGuiWindowFlags flags)