]> git.localhorst.tv Git - blobs.git/blob - src/ui/CreaturePanel.hpp
864fede83c983756ad5f2af333b984bc37c62b53
[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         bool Shown() const noexcept { return c; }
39         const creature::Creature &GetCreature() const noexcept { return *c; }
40
41         void Draw(app::Assets &, graphics::Viewport &) noexcept;
42
43 private:
44         void CreateNeeds();
45
46 private:
47         const app::Assets &assets;
48         creature::Creature *c;
49
50         Label *name;
51         Label *born;
52         Label *age;
53         Label *mass;
54         Label *pos;
55         Label *tile;
56         Label *goal;
57         Meter *stats[7];
58         Label *props[8];
59         Panel panel;
60
61 };
62
63 }
64 }
65
66 #endif