editor set mouse visibility
This commit is contained in:
parent
90dd589430
commit
fff2c73994
|
@ -618,6 +618,7 @@ namespace SHADE
|
|||
}
|
||||
else if (editorState == State::PAUSE)
|
||||
{
|
||||
SHWindow::SetMouseVisible(prevMouseVisibility);
|
||||
editorState = State::PLAY;
|
||||
}
|
||||
}
|
||||
|
@ -626,11 +627,13 @@ namespace SHADE
|
|||
{
|
||||
if (editorState == State::PAUSE)
|
||||
return;
|
||||
prevMouseVisibility = SHWindow::GetMouseVisible();
|
||||
const SHEditorStateChangeEvent STATE_CHANGE_EVENT
|
||||
{
|
||||
.previousState = editorState
|
||||
};
|
||||
editorState = State::PAUSE;
|
||||
SHWindow::SetMouseVisible(true);
|
||||
SHEventManager::BroadcastEvent<SHEditorStateChangeEvent>(STATE_CHANGE_EVENT, SH_EDITOR_ON_PAUSE_EVENT);
|
||||
}
|
||||
|
||||
|
@ -643,6 +646,7 @@ namespace SHADE
|
|||
.previousState = editorState
|
||||
};
|
||||
editorState = SHEditor::State::STOP;
|
||||
SHWindow::SetMouseVisible(true);
|
||||
SHCommandManager::SwapStacks();
|
||||
SHEventManager::BroadcastEvent<SHEditorStateChangeEvent>(STATE_CHANGE_EVENT, SH_EDITOR_ON_STOP_EVENT);
|
||||
|
||||
|
|
|
@ -154,7 +154,7 @@ namespace SHADE
|
|||
SHEventHandle onEditorStateChanged(SHEventPtr eventPtr);
|
||||
|
||||
bool isUnsavedChangesPromptOpen = false;
|
||||
|
||||
bool prevMouseVisibility = true;
|
||||
static constexpr std::string_view sceneNamePromptName = "Save scene as...";
|
||||
static constexpr std::string_view unsavedChangesPromptName = "Unsaved Changes";
|
||||
|
||||
|
|
Loading…
Reference in New Issue