Merge pull request #13 from antopilo/NK-71-add-play-mode-shortcut

Added Play Mode shortcut (F5)
This commit is contained in:
Antoine Pilote
2023-07-07 18:38:58 -04:00
committed by GitHub

View File

@@ -94,7 +94,7 @@ namespace Nuake {
float needed = half - used;
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0, 0));
if (ImGui::Button(ICON_FA_PLAY, ImVec2(30, 30)))
if (ImGui::Button(ICON_FA_PLAY, ImVec2(30, 30)) || (Input::IsKeyPressed(GLFW_KEY_F5) && !Engine::IsPlayMode))
{
SceneSnapshot = Engine::GetCurrentScene()->Copy();
Engine::EnterPlayMode();
@@ -102,7 +102,7 @@ namespace Nuake {
ImGui::SameLine();
if (ImGui::Button(ICON_FA_STOP, ImVec2(30, 30)) || Input::IsKeyPressed(297))
if (ImGui::Button(ICON_FA_STOP, ImVec2(30, 30)) || Input::IsKeyPressed(GLFW_KEY_F8))
{
Engine::ExitPlayMode();