From 8cf68dfc5725e4a92a87390dcba2b9d7e5ef4e84 Mon Sep 17 00:00:00 2001 From: Aki Date: Sat, 31 Dec 2022 12:33:38 +0100 Subject: Renamed and changed binding for restoring from a pause --- kurator/src/Pause.cpp | 10 +++++----- kurator/src/Pause.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/kurator/src/Pause.cpp b/kurator/src/Pause.cpp index 41d6e4b..9b28ef3 100644 --- a/kurator/src/Pause.cpp +++ b/kurator/src/Pause.cpp @@ -30,15 +30,15 @@ Pause::update(float) ImGui::SetNextWindowPos({GetScreenWidth()/2.0f, GetScreenHeight()/2.0f}, ImGuiCond_Once, {0.5f, 0.5f}); if (ImGui::Begin("Pause", nullptr, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse)) { if (ImGui::Button("Unpause", {-1.0f, 0.0f})) - stop(); + restore(); if (ImGui::Button("Exit to Menu", {-1.0f, 0.0f})) session->pop(); if (ImGui::Button("Exit to Desktop", {-1.0f, 0.0f})) session->quit(); } ImGui::End(); - if (IsKeyPressed(KEY_SPACE)) - stop(); + if (IsKeyPressed(KEY_ESCAPE)) + restore(); } @@ -51,9 +51,9 @@ Pause::draw() const void -Pause::stop() const +Pause::restore() const { - session->set(frame.view()); + session->set(scene); } diff --git a/kurator/src/Pause.h b/kurator/src/Pause.h index b3c4575..6e0cf9e 100644 --- a/kurator/src/Pause.h +++ b/kurator/src/Pause.h @@ -17,7 +17,7 @@ public: Pause(std::shared_ptr _session, std::shared_ptr _scene); void update(float dt) override; void draw() const override; - void stop() const; + void restore() const; private: std::shared_ptr session; std::shared_ptr scene; -- cgit v1.1