X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fui%2FCreaturePanel.hpp;h=b8a7bf602890af49c3a752939f41e79d34e3374a;hb=e0180e01f4c659c97973f585fea5eb3344254ce0;hp=a487b1a1637878c4c526ddd9c208061f3b1582d3;hpb=56f570e713c42d30109a214e68a2beed96ba1999;p=blobs.git diff --git a/src/ui/CreaturePanel.hpp b/src/ui/CreaturePanel.hpp index a487b1a..b8a7bf6 100644 --- a/src/ui/CreaturePanel.hpp +++ b/src/ui/CreaturePanel.hpp @@ -1,7 +1,6 @@ #ifndef BLOBS_UI_CREATUREPANEL_HPP_ #define BLOBS_UI_CREATUREPANEL_HPP_ -#include "Label.hpp" #include "Panel.hpp" @@ -17,6 +16,9 @@ namespace graphics { } namespace ui { +class Label; +class Meter; + class CreaturePanel { public: @@ -33,14 +35,30 @@ public: void Show(creature::Creature &); void Hide() noexcept; + bool Shown() const noexcept { return c; } + const creature::Creature &GetCreature() const noexcept { return *c; } + void Draw(app::Assets &, graphics::Viewport &) noexcept; private: + void CreateNeeds(); + +private: + const app::Assets &assets; creature::Creature *c; Label *name; + Label *age; + Label *mass; + Label *pos; + Label *tile; + Label *goal; + Panel *needs; Panel panel; + Meter *health_meter; + std::vector need_meters; + }; }