X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp%2FMasterState.hpp;h=959af6269c7cfd805f854f108ec67cf1c6a00e1a;hb=fd08d1defb5c42d2847a9001e1921898e3d526bf;hp=fb245cb62b2afb9e080cdd272e75e992a632508c;hpb=be413456f57da06e918ae7bf4c4f35e5198ff7ce;p=blobs.git diff --git a/src/app/MasterState.hpp b/src/app/MasterState.hpp index fb245cb..959af62 100644 --- a/src/app/MasterState.hpp +++ b/src/app/MasterState.hpp @@ -5,6 +5,7 @@ #include "Assets.hpp" #include "../graphics/Camera.hpp" +#include "../ui/CreaturePanel.hpp" namespace blobs { @@ -28,11 +29,17 @@ public: MasterState &operator =(MasterState &&) = delete; public: - void SetReference(world::Body &r) { reference = &r; } + graphics::Camera &GetCamera() noexcept { return cam; } + const graphics::Camera &GetCamera() const noexcept { return cam; } + + ui::CreaturePanel &GetCreaturePanel() noexcept { return cp; } + const ui::CreaturePanel &GetCreaturePanel() const noexcept { return cp; } private: void OnResize(int w, int h) override; + void OnKeyDown(const SDL_KeyboardEvent &) override; + void OnUpdate(int dt) override; void OnRender(graphics::Viewport &) override; @@ -42,12 +49,13 @@ private: private: Assets &assets; world::Simulation ∼ - world::Body *reference; graphics::Camera cam; + ui::CreaturePanel cp; int remain; int thirds; + bool paused; };