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;
17 class CongestionControl;
26 explicit HUD(Environment &, Config &, const Player &);
28 HUD(const HUD &) = delete;
29 HUD &operator =(const HUD &) = delete;
32 void FocusBlock(const Chunk &, int);
33 void FocusEntity(const Entity &);
38 void Display(const BlockType &);
43 void UpdatePosition();
44 void UpdateOrientation();
47 void UpdateNetStats(const CongestionControl &);
50 void PostMessage(const char *);
51 void PostMessage(const std::string &msg) {
52 PostMessage(msg.c_str());
54 // whether to always render message box regardless of last post
55 void KeepMessages(bool k) { msg_keep = k; }
58 void Render(Viewport &) noexcept;
66 PrimitiveMesh outline;
67 glm::mat4 outline_transform;
72 EntityMesh::Buffer block_buf;
73 glm::mat4 block_transform;
74 FixedText block_label;
78 FixedText counter_text;
79 FixedText position_text;
80 FixedText orientation_text;
82 FixedText entity_text;
87 FixedText bandwidth_text;
89 FixedText packet_loss_text;
94 CoarseTimer msg_timer;
98 PrimitiveMesh crosshair;