From 9866c6e3077d9da40ec602ea295ce895823fd42b Mon Sep 17 00:00:00 2001 From: Sri Sham Haran Date: Sun, 5 Mar 2023 21:33:05 +0800 Subject: [PATCH] Handle mouse center/visible when editor play/pause/stop --- SHADE_Engine/src/Editor/SHEditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SHADE_Engine/src/Editor/SHEditor.cpp b/SHADE_Engine/src/Editor/SHEditor.cpp index a17e4b53..4c7db57c 100644 --- a/SHADE_Engine/src/Editor/SHEditor.cpp +++ b/SHADE_Engine/src/Editor/SHEditor.cpp @@ -619,7 +619,6 @@ namespace SHADE } else if (editorState == State::PAUSE) { - SHWindow::SetMouseVisible(prevCursorVisibleState); editorState = State::PLAY; } @@ -636,6 +635,7 @@ namespace SHADE editorState = State::PAUSE; SHInputManager::SetMouseCentering(false); prevCursorVisibleState = SHWindow::GetMouseVisible(); + SHWindow::SetMouseVisible(true); SHEventManager::BroadcastEvent(STATE_CHANGE_EVENT, SH_EDITOR_ON_PAUSE_EVENT); }