Resize ImGui windows automatically + Move "Tools" menu after "Enhancements" (#232)

* Resize ImGui windows automatically + Move "Tools" menu after "Enhancements"

* Oops, forgot one of those

* Always resize Tools menu

* Moved hotkeys to allow fullscreen & reset to be done without the menu open
This commit is contained in:
MelonSpeedruns
2026-04-05 14:30:48 -04:00
committed by GitHub
parent 7920a6144a
commit adf22e69c1
7 changed files with 22 additions and 21 deletions
+14 -1
View File
@@ -182,6 +182,17 @@ namespace dusk {
m_isLaunchInitialized = true;
}
if ((ImGui::IsKeyDown(ImGuiKey_LeftCtrl) || ImGui::IsKeyDown(ImGuiKey_RightCtrl)) &&
ImGui::IsKeyPressed(ImGuiKey_R))
{
JUTGamePad::C3ButtonReset::sResetSwitchPushing = true;
}
if (ImGui::IsKeyPressed(ImGuiKey_F11)) {
getSettings().video.enableFullscreen = !getSettings().video.enableFullscreen;
VISetWindowFullscreen(getSettings().video.enableFullscreen);
}
if (CheckMenuViewToggle(ImGuiKey_F1, m_isHidden)) {
ShowToasts();
return;
@@ -192,9 +203,11 @@ namespace dusk {
if (ImGui::BeginMainMenuBar()) {
m_menuGame.draw();
m_menuTools.draw();
m_menuEnhancements.draw();
// Keep always last
m_menuTools.draw();
ImGui::SetCursorPosX(ImGui::GetWindowWidth() - 80.0f * ImGuiScale());
ImGuiIO& io = ImGui::GetIO();
ImGuiStringViewText(fmt::format(FMT_STRING("FPS: {:.2f}\n"), io.Framerate));