]> git.localhorst.tv Git - blank.git/blob - src/ui/HUD.hpp
55f3afb806cb56d73a01f27d881a0adb8d76816a
[blank.git] / src / ui / HUD.hpp
1 #ifndef BLANK_UI_HUD_H_
2 #define BLANK_UI_HUD_H_
3
4 #include "../graphics/Texture.hpp"
5 #include "../model/Model.hpp"
6 #include "../model/OutlineModel.hpp"
7 #include "../model/SpriteModel.hpp"
8
9 #include <glm/glm.hpp>
10
11
12 namespace blank {
13
14 class Block;
15 class BlockTypeRegistry;
16 class Font;
17 class Viewport;
18
19 class HUD {
20
21 public:
22         HUD(const BlockTypeRegistry &, const Font &);
23
24         HUD(const HUD &) = delete;
25         HUD &operator =(const HUD &) = delete;
26
27         void Display(const Block &);
28
29         void Render(Viewport &) noexcept;
30
31 private:
32         const BlockTypeRegistry &types;
33         const Font &font;
34
35         Model block;
36         Model::Buffer block_buf;
37         glm::mat4 block_transform;
38
39         Texture block_label;
40         SpriteModel label_sprite;
41         glm::mat4 label_transform;
42
43         bool block_visible;
44
45         OutlineModel crosshair;
46
47 };
48
49 }
50
51 #endif