summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-12-31 12:33:38 +0100
committerAki <please@ignore.pl>2022-12-31 12:33:38 +0100
commit8cf68dfc5725e4a92a87390dcba2b9d7e5ef4e84 (patch)
tree487be238f678456c1db31a00a86be1ac972d6cbb
parente3dc285866822947a1a6710eb721d99922a4d8af (diff)
downloadkurator-8cf68dfc5725e4a92a87390dcba2b9d7e5ef4e84.zip
kurator-8cf68dfc5725e4a92a87390dcba2b9d7e5ef4e84.tar.gz
kurator-8cf68dfc5725e4a92a87390dcba2b9d7e5ef4e84.tar.bz2
Renamed and changed binding for restoring from a pause
-rw-r--r--kurator/src/Pause.cpp10
-rw-r--r--kurator/src/Pause.h2
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;