X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fui%2FHUD.hpp;h=718e712485b30a727a14426dd50ead4ad8227d7a;hb=7c2a8b8285278b8a3077b311d82f05ea0463a96e;hp=245d886e795ffaccf35b658e7fde710457d46d9d;hpb=55dbd6b35a39888f245e247d2e140f141f918178;p=blank.git diff --git a/src/ui/HUD.hpp b/src/ui/HUD.hpp index 245d886..718e712 100644 --- a/src/ui/HUD.hpp +++ b/src/ui/HUD.hpp @@ -1,21 +1,19 @@ #ifndef BLANK_UI_HUD_H_ #define BLANK_UI_HUD_H_ -#include "../graphics/Texture.hpp" +#include "../graphics/FixedText.hpp" #include "../model/Model.hpp" #include "../model/OutlineModel.hpp" -#include "../model/SpriteModel.hpp" #include namespace blank { -class BlendedSprite; class Block; class BlockTypeRegistry; -class DirectionalLighting; class Font; +class Viewport; class HUD { @@ -25,12 +23,9 @@ public: 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 Display(const Block &); - void Render(DirectionalLighting &, BlendedSprite &) noexcept; + void Render(Viewport &) noexcept; private: const BlockTypeRegistry &types; @@ -40,19 +35,11 @@ private: Model::Buffer block_buf; glm::mat4 block_transform; - Texture block_label; - SpriteModel label_sprite; - glm::mat4 label_transform; - SDL_Color label_color; + FixedText block_label; bool block_visible; OutlineModel crosshair; - glm::mat4 crosshair_transform; - - float near, far; - glm::mat4 projection; - glm::mat4 view; };