[FIX] Scene saving when you press play from pause
[FIX] WER for transform gizmo can now be pressed regardless of whether editor viewport is focused
This commit is contained in:
parent
9e0bc0bbc9
commit
36ed195a69
|
@ -221,13 +221,20 @@ namespace SHADE
|
||||||
ImGui::BeginDisabled(editor->editorState == SHEditor::State::PLAY);
|
ImGui::BeginDisabled(editor->editorState == SHEditor::State::PLAY);
|
||||||
if(ImGui::SmallButton(ICON_MD_PLAY_ARROW))
|
if(ImGui::SmallButton(ICON_MD_PLAY_ARROW))
|
||||||
{
|
{
|
||||||
if(editor->SaveScene())
|
if(editor->editorState == SHEditor::State::STOP)
|
||||||
|
{
|
||||||
|
if (editor->SaveScene())
|
||||||
|
{
|
||||||
|
editor->Play();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
editor->Play();
|
editor->Play();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ImGui::EndDisabled();
|
ImGui::EndDisabled();
|
||||||
ImGui::BeginDisabled(editor->editorState == SHEditor::State::PAUSE);
|
ImGui::BeginDisabled(editor->editorState == SHEditor::State::STOP || editor->editorState == SHEditor::State::PAUSE);
|
||||||
if(ImGui::SmallButton(ICON_MD_PAUSE))
|
if(ImGui::SmallButton(ICON_MD_PAUSE))
|
||||||
{
|
{
|
||||||
editor->Pause();
|
editor->Pause();
|
||||||
|
|
|
@ -85,7 +85,7 @@ namespace SHADE
|
||||||
|
|
||||||
shouldUpdateCamArm = ImGui::IsWindowHovered() && ImGui::IsKeyDown(ImGuiKey_LeftAlt) && ImGui::IsMouseDown(ImGuiMouseButton_Left);
|
shouldUpdateCamArm = ImGui::IsWindowHovered() && ImGui::IsKeyDown(ImGuiKey_LeftAlt) && ImGui::IsMouseDown(ImGuiMouseButton_Left);
|
||||||
|
|
||||||
if (editor->editorState != SHEditor::State::PLAY && ImGui::IsWindowFocused() && !ImGui::IsMouseDown(ImGuiMouseButton_Right))
|
if (editor->editorState != SHEditor::State::PLAY && !ImGui::IsAnyItemActive() && !ImGui::IsMouseDown(ImGuiMouseButton_Right))
|
||||||
{
|
{
|
||||||
if (ImGui::IsKeyReleased(ImGuiKey_W))
|
if (ImGui::IsKeyReleased(ImGuiKey_W))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue