off mouse centering on pause/stop

This commit is contained in:
Sri Sham Haran 2023-03-04 10:37:01 +08:00
parent fff2c73994
commit 51d4b26e3d
1 changed files with 3 additions and 0 deletions

View File

@ -55,6 +55,7 @@
#include "Scene/SHSceneManager.h"
#include "Serialization/SHSerialization.h"
#include "Tools/SHDebugDraw.h"
#include "Input/SHInputManager.h"
RTTR_REGISTRATION
{
@ -634,6 +635,7 @@ namespace SHADE
};
editorState = State::PAUSE;
SHWindow::SetMouseVisible(true);
SHInputManager::SetMouseCentering(false);
SHEventManager::BroadcastEvent<SHEditorStateChangeEvent>(STATE_CHANGE_EVENT, SH_EDITOR_ON_PAUSE_EVENT);
}
@ -647,6 +649,7 @@ namespace SHADE
};
editorState = SHEditor::State::STOP;
SHWindow::SetMouseVisible(true);
SHInputManager::SetMouseCentering(false);
SHCommandManager::SwapStacks();
SHEventManager::BroadcastEvent<SHEditorStateChangeEvent>(STATE_CHANGE_EVENT, SH_EDITOR_ON_STOP_EVENT);