feat: keyboard shortcut for log window
All checks were successful
CI / build-and-test (push) Successful in 2m16s

This commit is contained in:
2025-11-14 13:02:10 +13:00
parent 3607ccee3b
commit 34304fcb2c
2 changed files with 7 additions and 2 deletions

View File

@@ -10,7 +10,7 @@ Collapsed=0
[Window][Game Window]
Pos=8,27
Size=1264,579
Size=1264,685
Collapsed=0
DockId=0x00000001,0

View File

@@ -70,11 +70,16 @@ void GuiManager::SetupDockspace(RenderTexture2D &renderTexture)
{
if (ImGui::BeginMenu("View"))
{
ImGui::MenuItem("Log Viewer", nullptr, &showLogWindow);
ImGui::MenuItem("Log Viewer", "Ctrl + L", &showLogWindow);
ImGui::EndMenu();
}
ImGui::EndMenuBar();
}
if (ImGui::GetIO().KeyCtrl && ImGui::IsKeyPressed(ImGuiKey_L))
{
showLogWindow = !showLogWindow;
}
ImGuiID dockspace_id = ImGui::GetID("MyDockSpace");
ImGui::DockSpace(dockspace_id, ImVec2(0.0f, 0.0f), dockspace_flags);