Added Play Mode shortcut (F5)

This commit is contained in:
emerycp
2023-07-07 17:07:03 -04:00
parent 53e5e9e071
commit 57a92387dc

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();