]> git.localhorst.tv Git - blobs.git/blob - src/ui/CreaturePanel.hpp
track top ten for each record
[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 ZIndex(float z) noexcept { panel.ZIndex(z); }
44
45         void Draw(graphics::Viewport &) noexcept;
46
47 private:
48         app::Assets &assets;
49         creature::Creature *c;
50
51         Label *name;
52         Label *parents;
53         Label *born;
54         Label *age;
55         Label *mass;
56         Label *goal;
57         Label *pos;
58         Label *tile;
59         Label *head;
60         Panel *composition;
61         std::vector<Label *> components;
62         Meter *stats[7];
63         Label *props[9];
64         Panel panel;
65
66 };
67
68 }
69 }
70
71 #endif