]> git.localhorst.tv Git - blank.git/blobdiff - src/ui/Interface.hpp
combine text handling stuff into a class
[blank.git] / src / ui / Interface.hpp
index d01fe254a665ed0011c214a97fae7af4b9dbb030..d6c301981ef45125ac10cbf7a4eeabd7b987dbe6 100644 (file)
@@ -5,11 +5,11 @@
 #include "../app/FPSController.hpp"
 #include "../app/IntervalTimer.hpp"
 #include "../graphics/Font.hpp"
+#include "../graphics/Text.hpp"
 #include "../model/geometry.hpp"
 #include "../model/OutlineModel.hpp"
 #include "../world/Block.hpp"
 
-#include <SDL.h>
 #include <glm/glm.hpp>
 
 
@@ -17,9 +17,8 @@ namespace blank {
 
 class Assets;
 class Chunk;
-class BlendedSprite;
-class DirectionalLighting;
 class FrameCounter;
+class Viewport;
 class World;
 
 class Interface {
@@ -43,7 +42,6 @@ public:
        void HandlePress(const SDL_MouseButtonEvent &);
        void HandleRelease(const SDL_MouseButtonEvent &);
        void Handle(const SDL_MouseWheelEvent &);
-       void Handle(const SDL_WindowEvent &) noexcept;
 
        void FaceBlock();
        void TurnBlock();
@@ -68,7 +66,7 @@ public:
 
        void Update(int dt);
 
-       void Render(DirectionalLighting &, BlendedSprite &) noexcept;
+       void Render(Viewport &) noexcept;
 
 private:
        void CheckAim();
@@ -88,11 +86,7 @@ private:
        OutlineModel outline;
        glm::mat4 outline_transform;
 
-       bool show_counter;
-       Texture counter_tex;
-       SpriteModel counter_sprite;
-       glm::mat4 counter_transform;
-       SDL_Color counter_color;
+       Text counter_text;
 
        Config config;