1 #ifndef BLANK_UI_HUD_H_
2 #define BLANK_UI_HUD_H_
4 #include "FixedText.hpp"
5 #include "MessageBox.hpp"
6 #include "../graphics/EntityMesh.hpp"
7 #include "../graphics/PrimitiveMesh.hpp"
15 class BlockTypeRegistry;
25 explicit HUD(Environment &, Config &, const Player &);
27 HUD(const HUD &) = delete;
28 HUD &operator =(const HUD &) = delete;
31 void FocusBlock(const Chunk &, int);
32 void FocusEntity(const Entity &);
37 void Display(const BlockType &);
42 void UpdatePosition();
43 void UpdateOrientation();
46 void PostMessage(const char *);
47 void PostMessage(const std::string &msg) {
48 PostMessage(msg.c_str());
50 // whether to always render message box regardless of last post
51 void KeepMessages(bool k) { msg_keep = k; }
54 void Render(Viewport &) noexcept;
62 PrimitiveMesh outline;
63 glm::mat4 outline_transform;
68 EntityMesh::Buffer block_buf;
69 glm::mat4 block_transform;
70 FixedText block_label;
74 FixedText counter_text;
75 FixedText position_text;
76 FixedText orientation_text;
78 FixedText entity_text;
84 IntervalTimer msg_timer;
88 PrimitiveMesh crosshair;