From ccfc2a84bc5594328c30702417422eb841692b64 Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Wed, 14 Jun 2023 23:22:48 -0400 Subject: [PATCH] hide menu bar from menu bar (#2988) * hide menu bar from menu bar * show `-` on switch/wii u * actually show `-` * actually put the thing in a place where it works * spacers * reorder and use `[-]` instead of `-` --------- Co-authored-by: briaguya --- soh/soh/SohMenuBar.cpp | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/soh/soh/SohMenuBar.cpp b/soh/soh/SohMenuBar.cpp index a312b251c..84afa1055 100644 --- a/soh/soh/SohMenuBar.cpp +++ b/soh/soh/SohMenuBar.cpp @@ -120,20 +120,35 @@ void DrawMenuBarIcon() { void DrawShipMenu() { if (ImGui::BeginMenu("Ship")) { + if (ImGui::MenuItem("Hide Menu Bar", +#if !defined(__SWITCH__) && !defined(__WIIU__) + "F1" +#else + "[-]" +#endif + )) { + LUS::Context::GetInstance()->GetWindow()->GetGui()->GetMenuBar()->ToggleVisibility(); + } + UIWidgets::Spacer(0); +#if !defined(__SWITCH__) && !defined(__WIIU__) + if (ImGui::MenuItem("Toggle Fullscreen", "F11")) { + LUS::Context::GetInstance()->GetWindow()->ToggleFullscreen(); + } + UIWidgets::Spacer(0); +#endif if (ImGui::MenuItem("Reset", #ifdef __APPLE__ "Command-R" -#else +#elif !defined(__SWITCH__) && !defined(__WIIU__) "Ctrl+R" +#else + "" #endif )) { std::reinterpret_pointer_cast(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetGuiWindow("Console"))->Dispatch("reset"); } #if !defined(__SWITCH__) && !defined(__WIIU__) - auto backend = LUS::Context::GetInstance()->GetWindow()->GetWindowBackend(); - if (ImGui::MenuItem("Toggle Fullscreen", "F11")) { - LUS::Context::GetInstance()->GetWindow()->ToggleFullscreen(); - } + UIWidgets::Spacer(0); if (ImGui::MenuItem("Quit")) { LUS::Context::GetInstance()->GetWindow()->Close(); }