diff options
-rw-r--r-- | kurator/src/Pause.cpp | 10 | ||||
-rw-r--r-- | 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> _session, std::shared_ptr<Scene> _scene); void update(float dt) override; void draw() const override; - void stop() const; + void restore() const; private: std::shared_ptr<Session> session; std::shared_ptr<Scene> scene; |