diff options
Diffstat (limited to 'src/port/SpaghettiGui.cpp')
| -rw-r--r-- | src/port/SpaghettiGui.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/port/SpaghettiGui.cpp b/src/port/SpaghettiGui.cpp index 56320e2be..17bfb2ec2 100644 --- a/src/port/SpaghettiGui.cpp +++ b/src/port/SpaghettiGui.cpp @@ -41,8 +41,8 @@ namespace Ship { #define TOGGLE_PAD_BTN ImGuiKey_GamepadBack void SpaghettiGui::DrawMenu() { - const std::shared_ptr<Window> wnd = Context::GetInstance()->GetWindow(); - const std::shared_ptr<Config> conf = Context::GetInstance()->GetConfig(); + const std::shared_ptr<Window> wnd = Context::GetRawInstance()->GetWindow(); + const std::shared_ptr<Config> conf = Context::GetRawInstance()->GetConfig(); ImGuiWindowFlags windowFlags = ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoMove | @@ -112,7 +112,7 @@ void SpaghettiGui::DrawMenu() { Gui::GetMenuBar()->ToggleVisibility(); } if (wnd->IsFullscreen()) { - Context::GetInstance()->GetWindow()->SetMouseCapture( + Context::GetRawInstance()->GetWindow()->SetMouseCapture( !(GetMenuOrMenubarVisible() || wnd->ShouldForceCursorVisibility())); } if (CVarGetInteger(CVAR_IMGUI_CONTROLLER_NAV, 0) && GetMenuOrMenubarVisible()) { @@ -126,14 +126,14 @@ void SpaghettiGui::DrawMenu() { if ((ImGui::IsKeyDown(ImGuiKey_LeftSuper) || ImGui::IsKeyDown(ImGuiKey_RightSuper)) && ImGui::IsKeyPressed(ImGuiKey_R, false)) { std::reinterpret_pointer_cast<ConsoleWindow>( - Context::GetInstance()->GetWindow()->GetGui()->GetGuiWindow("Console")) + Context::GetRawInstance()->GetWindow()->GetGui()->GetGuiWindow("Console")) ->Dispatch("reset"); } #else if ((ImGui::IsKeyDown(ImGuiKey_LeftCtrl) || ImGui::IsKeyDown(ImGuiKey_RightCtrl)) && ImGui::IsKeyPressed(ImGuiKey_R, false)) { std::reinterpret_pointer_cast<ConsoleWindow>( - Context::GetInstance()->GetWindow()->GetGui()->GetGuiWindow("Console")) + Context::GetRawInstance()->GetWindow()->GetGui()->GetGuiWindow("Console")) ->Dispatch("reset"); } #endif |
