]> git.localhorst.tv Git - blobs.git/blob - src/ui/CreaturePanel.hpp
color mutation
[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 #include <vector>
7
8
9 namespace blobs {
10 namespace app {
11         struct Assets;
12 }
13 namespace creature {
14         class Creature;
15 }
16 namespace graphics {
17         class Viewport;
18 }
19 namespace ui {
20
21 class Label;
22 class Meter;
23
24 class CreaturePanel {
25
26 public:
27         explicit CreaturePanel(app::Assets &);
28         ~CreaturePanel();
29
30         CreaturePanel(const CreaturePanel &) = delete;
31         CreaturePanel &operator =(const CreaturePanel &) = delete;
32
33         CreaturePanel(CreaturePanel &&) = delete;
34         CreaturePanel &operator =(CreaturePanel &&) = delete;
35
36 public:
37         void Show(creature::Creature &);
38         void Hide() noexcept;
39
40         bool Shown() const noexcept { return c; }
41         const creature::Creature &GetCreature() const noexcept { return *c; }
42
43         void Draw(graphics::Viewport &) noexcept;
44
45 private:
46         app::Assets &assets;
47         creature::Creature *c;
48
49         Label *name;
50         Label *parents;
51         Label *born;
52         Label *age;
53         Label *mass;
54         Label *goal;
55         Panel *composition;
56         std::vector<Label *> components;
57         Meter *stats[7];
58         Label *props[9];
59         Panel panel;
60
61 };
62
63 }
64 }
65
66 #endif