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/glm.hpp"
8 #include "../graphics/PrimitiveMesh.hpp"
14 class BlockTypeRegistry;
16 class CongestionControl;
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 UpdateNetStats(const CongestionControl &);
49 void PostMessage(const char *);
50 void PostMessage(const std::string &msg) {
51 PostMessage(msg.c_str());
53 // whether to always render message box regardless of last post
54 void KeepMessages(bool k) { msg_keep = k; }
57 void Render(Viewport &) noexcept;
65 PrimitiveMesh outline;
66 glm::mat4 outline_transform;
71 EntityMesh::Buffer block_buf;
72 glm::mat4 block_transform;
73 FixedText block_label;
77 FixedText counter_text;
78 FixedText position_text;
79 FixedText orientation_text;
81 FixedText entity_text;
86 FixedText bandwidth_text;
88 FixedText packet_loss_text;
93 CoarseTimer msg_timer;
97 PrimitiveMesh crosshair;