X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fui%2FCreaturePanel.hpp;h=7a96bf8f4cf09125a47bd4e9b98ed5b2a62c56ba;hb=refs%2Fheads%2Fmaster;hp=a487b1a1637878c4c526ddd9c208061f3b1582d3;hpb=56f570e713c42d30109a214e68a2beed96ba1999;p=blobs.git diff --git a/src/ui/CreaturePanel.hpp b/src/ui/CreaturePanel.hpp index a487b1a..7a96bf8 100644 --- a/src/ui/CreaturePanel.hpp +++ b/src/ui/CreaturePanel.hpp @@ -1,9 +1,10 @@ #ifndef BLOBS_UI_CREATUREPANEL_HPP_ #define BLOBS_UI_CREATUREPANEL_HPP_ -#include "Label.hpp" #include "Panel.hpp" +#include + namespace blobs { namespace app { @@ -17,10 +18,13 @@ namespace graphics { } namespace ui { +class Label; +class Meter; + class CreaturePanel { public: - explicit CreaturePanel(const app::Assets &); + explicit CreaturePanel(app::Assets &); ~CreaturePanel(); CreaturePanel(const CreaturePanel &) = delete; @@ -33,12 +37,31 @@ public: void Show(creature::Creature &); void Hide() noexcept; - void Draw(app::Assets &, graphics::Viewport &) noexcept; + bool Shown() const noexcept { return c; } + const creature::Creature &GetCreature() const noexcept { return *c; } + + void ZIndex(float z) noexcept { panel.ZIndex(z); } + + void Draw(graphics::Viewport &) noexcept; private: + app::Assets &assets; creature::Creature *c; Label *name; + Label *parents; + Label *born; + Label *age; + Label *mass; + Label *size; + Label *goal; + Label *pos; + Label *tile; + Label *head; + Panel *composition; + std::vector