]> git.localhorst.tv Git - blobs.git/blob - src/ui/CreaturePanel.hpp
fix resource locator
[blobs.git] / src / ui / CreaturePanel.hpp
1 #ifndef BLOBS_UI_CREATUREPANEL_HPP_
2 #define BLOBS_UI_CREATUREPANEL_HPP_
3
4 #include "Panel.hpp"
5
6
7 namespace blobs {
8 namespace app {
9         struct Assets;
10 }
11 namespace creature {
12         class Creature;
13 }
14 namespace graphics {
15         class Viewport;
16 }
17 namespace ui {
18
19 class Label;
20 class Meter;
21
22 class CreaturePanel {
23
24 public:
25         explicit CreaturePanel(const app::Assets &);
26         ~CreaturePanel();
27
28         CreaturePanel(const CreaturePanel &) = delete;
29         CreaturePanel &operator =(const CreaturePanel &) = delete;
30
31         CreaturePanel(CreaturePanel &&) = delete;
32         CreaturePanel &operator =(CreaturePanel &&) = delete;
33
34 public:
35         void Show(creature::Creature &);
36         void Hide() noexcept;
37
38         void Draw(app::Assets &, graphics::Viewport &) noexcept;
39
40 private:
41         void CreateNeeds();
42
43 private:
44         const app::Assets &assets;
45         creature::Creature *c;
46
47         Label *name;
48         Label *age;
49         Label *mass;
50         Label *pos;
51         Label *tile;
52         Label *goal;
53         Panel *needs;
54         Panel panel;
55
56         Meter *health_meter;
57         std::vector<Meter *> need_meters;
58
59 };
60
61 }
62 }
63
64 #endif