Skip to content

Commit 53cfa4e

Browse files
committed
InputBindings: open binding window as popup, handles screen fade/centering
1 parent 9c20684 commit 53cfa4e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/input_manager.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,12 @@ class InputManager
863863
if ((switch_overlay & (1 << int(SwitchId::Back) | 1 << int(SwitchId::B))) != 0)
864864
dialogOpen = false;
865865

866-
if (ImGui::Begin("Input Bindings", &dialogOpen))
866+
ImGui::OpenPopup("Input Bindings");
867+
if (ImGui::BeginPopupModal("Input Bindings", &dialogOpen, ImGuiWindowFlags_NoSavedSettings |
868+
ImGuiWindowFlags_NoTitleBar |
869+
ImGuiWindowFlags_NoResize |
870+
ImGuiWindowFlags_NoMove |
871+
ImGuiWindowFlags_AlwaysAutoResize))
867872
{
868873
if (ImGui::BeginTable("Controllers", 2, ImGuiTableFlags_Borders))
869874
{
@@ -1154,8 +1159,8 @@ class InputManager
11541159
}
11551160
}
11561161
}
1162+
ImGui::EndPopup();
11571163
}
1158-
ImGui::End();
11591164

11601165
return dialogOpen;
11611166
}

0 commit comments

Comments
 (0)