]> git.localhorst.tv Git - blank.git/blobdiff - src/ui/HUD.hpp
group entity updates in as few packets as possible
[blank.git] / src / ui / HUD.hpp
index ca6b7544a54ee9a15f7639bb2e1f6fba65376724..1917b130c926772b5518806c1fc04af157447271 100644 (file)
@@ -1,7 +1,8 @@
 #ifndef BLANK_UI_HUD_H_
 #define BLANK_UI_HUD_H_
 
-#include "../model/Model.hpp"
+#include "FixedText.hpp"
+#include "../model/EntityModel.hpp"
 #include "../model/OutlineModel.hpp"
 
 #include <glm/glm.hpp>
@@ -11,37 +12,35 @@ namespace blank {
 
 class Block;
 class BlockTypeRegistry;
-class DirectionalLighting;
+class Font;
+class Viewport;
 
 class HUD {
 
 public:
-       explicit HUD(const BlockTypeRegistry &);
+       HUD(const BlockTypeRegistry &, const Font &);
 
        HUD(const HUD &) = delete;
        HUD &operator =(const HUD &) = delete;
 
-       void Viewport(float width, float height) noexcept;
-       void Viewport(float x, float y, float width, float height) noexcept;
-
+       void DisplayNone();
        void Display(const Block &);
 
-       void Render(DirectionalLighting &) noexcept;
+       void Render(Viewport &) noexcept;
 
 private:
        const BlockTypeRegistry &types;
+       const Font &font;
 
-       Model block;
-       Model::Buffer block_buf;
+       EntityModel block;
+       EntityModel::Buffer block_buf;
        glm::mat4 block_transform;
+
+       FixedText block_label;
+
        bool block_visible;
 
        OutlineModel crosshair;
-       glm::mat4 crosshair_transform;
-
-       float near, far;
-       glm::mat4 projection;
-       glm::mat4 view;
 
 };