unselect when entering playmode

This commit is contained in:
Antoine Pilote
2024-03-16 16:36:45 -04:00
parent 4b58175015
commit 16e12ff37d

View File

@@ -119,14 +119,14 @@ namespace Nuake {
if (ImGui::Button(ICON_FA_PAUSE, ImVec2(30, 30)) || (Input::IsKeyPressed(GLFW_KEY_F5)))
{
Engine::ExitPlayMode();
Engine::LoadScene(SceneSnapshot);
Selection = EditorSelection();
}
}
else
{
if (ImGui::Button(ICON_FA_PLAY, ImVec2(30, 30)) || (Input::IsKeyPressed(GLFW_KEY_F5)))
if (ImGui::Button(ICON_FA_PLAY, ImVec2(30, 30)))
{
this->SceneSnapshot = Engine::GetCurrentScene()->Copy();
@@ -135,6 +135,8 @@ namespace Nuake {
ScriptingEngineNet::Get().BuildProjectAssembly(Engine::GetProject());
};
Selection = EditorSelection();
JobSystem::Get().Dispatch(job, []() { Engine::EnterPlayMode(); });
}