Fixed F5 not stopping game

This commit is contained in:
Antoine Pilote
2024-04-01 19:21:58 -04:00
parent 46bcec62b7
commit aad15899fd

View File

@@ -116,7 +116,7 @@ namespace Nuake {
if (Engine::IsPlayMode())
{
if (ImGui::Button(ICON_FA_PAUSE, ImVec2(30, 30)) || (Input::IsKeyPressed(GLFW_KEY_F5)))
if (ImGui::Button(ICON_FA_PAUSE, ImVec2(30, 30)) || (Input::IsKeyDown(GLFW_KEY_F5)))
{
Engine::ExitPlayMode();
@@ -126,7 +126,7 @@ namespace Nuake {
}
else
{
if (ImGui::Button(ICON_FA_PLAY, ImVec2(30, 30)))
if (ImGui::Button(ICON_FA_PLAY, ImVec2(30, 30)) )
{
this->SceneSnapshot = Engine::GetCurrentScene()->Copy();
@@ -155,7 +155,7 @@ namespace Nuake {
ImGui::BeginDisabled();
}
if ((ImGui::Button(ICON_FA_STOP, ImVec2(30, 30)) || Input::IsKeyPressed(GLFW_KEY_F8)) && Engine::IsPlayMode())
if ((ImGui::Button(ICON_FA_STOP, ImVec2(30, 30)) || Input::IsKeyPressed(GLFW_KEY_F5)) && Engine::IsPlayMode())
{
Engine::ExitPlayMode();