Skip to content

Commit

Permalink
swap if else conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
AloXado320 committed Oct 22, 2024
1 parent 67e0426 commit 00263d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/window/gui/Gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,10 +475,10 @@ 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)) && GetMenuBar()) {
GetMenuBar()->ToggleVisibility();
} else if ((ImGui::IsKeyPressed(ImGuiKey_Escape) || ImGui::IsKeyPressed(TOGGLE_PAD_BTN)) && GetMenu()) {
if ((ImGui::IsKeyPressed(ImGuiKey_Escape) || ImGui::IsKeyPressed(TOGGLE_PAD_BTN)) && GetMenu()) {
GetMenu()->ToggleVisibility();
} else if ((ImGui::IsKeyPressed(TOGGLE_BTN) || ImGui::IsKeyPressed(TOGGLE_PAD_BTN)) && GetMenuBar()) {
GetMenuBar()->ToggleVisibility();
}
if (wnd->IsFullscreen()) {
Context::GetInstance()->GetWindow()->SetCursorVisibility(GetMenuOrMenubarVisible() ||
Expand Down

0 comments on commit 00263d9

Please sign in to comment.