]> git.localhorst.tv Git - blobs.git/blob - src/ui/RecordsPanel.hpp
track top ten for each record
[blobs.git] / src / ui / RecordsPanel.hpp
1 #ifndef BLOBS_UI_RECORDSPANEL_HPP_
2 #define BLOBS_UI_RECORDSPANEL_HPP_
3
4 #include "Panel.hpp"
5
6
7 namespace blobs {
8 namespace graphics {
9         class Viewport;
10 }
11 namespace world {
12         class Simulation;
13 }
14 namespace ui {
15
16 class Label;
17
18 class RecordsPanel {
19
20 public:
21         explicit RecordsPanel(world::Simulation &);
22         ~RecordsPanel();
23
24 public:
25         void Draw(graphics::Viewport &) noexcept;
26
27         void Show() noexcept { shown = true; }
28         void Hide() noexcept { shown = false; }
29         void Toggle() noexcept { shown = !shown; }
30         bool Shown() const noexcept { return shown; }
31
32         void ZIndex(float z) noexcept { panel.ZIndex(z); }
33
34 private:
35         world::Simulation ∼
36         std::vector<Label *> records;
37         std::vector<Label *> holders;
38         Panel panel;
39         bool shown;
40
41 };
42
43 }
44 }
45
46 #endif