Skip to content

Commit

Permalink
Fix Gui Menu buttons (#692)
Browse files Browse the repository at this point in the history
* Fix Gui Menu buttons

* swap if else conditions
  • Loading branch information
AloXado320 authored Oct 22, 2024
1 parent cd7721f commit 00c6bcc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/window/gui/Gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,9 +475,9 @@ void Gui::DrawMenu() {

if (ImGui::IsKeyPressed(TOGGLE_BTN) || ImGui::IsKeyPressed(ImGuiKey_Escape) ||
(ImGui::IsKeyPressed(TOGGLE_PAD_BTN) && CVarGetInteger(CVAR_IMGUI_CONTROLLER_NAV, 0))) {
if (ImGui::IsKeyPressed(TOGGLE_BTN) || (ImGui::IsKeyPressed(TOGGLE_PAD_BTN) && GetMenu())) {
if ((ImGui::IsKeyPressed(ImGuiKey_Escape) || ImGui::IsKeyPressed(TOGGLE_PAD_BTN)) && GetMenu()) {
GetMenu()->ToggleVisibility();
} else if (ImGui::IsKeyPressed(ImGuiKey_Escape) || (ImGui::IsKeyPressed(TOGGLE_PAD_BTN) && GetMenuBar())) {
} else if ((ImGui::IsKeyPressed(TOGGLE_BTN) || ImGui::IsKeyPressed(TOGGLE_PAD_BTN)) && GetMenuBar()) {
GetMenuBar()->ToggleVisibility();
}
if (wnd->IsFullscreen()) {
Expand Down

0 comments on commit 00c6bcc

Please sign in to comment.