]> git.localhorst.tv Git - blobs.git/blobdiff - src/ui/Label.hpp
fix layout
[blobs.git] / src / ui / Label.hpp
index 90ed738639e5761df8de90ee4a2817ab48cdc0f8..7ba884b3d6d47430df5c406d05d28395a746946b 100644 (file)
@@ -21,16 +21,16 @@ public:
        ~Label() override;
 
 public:
-       Label &Text(const std::string &);
-       Label &Font(const graphics::Font &);
-       Label &Foreground(const glm::vec4 &);
-       Label &Background(const glm::vec4 &);
+       Label *Text(const std::string &);
+       Label *Font(const graphics::Font &);
+       Label *Foreground(const glm::vec4 &);
+       Label *Background(const glm::vec4 &);
 
        glm::vec2 Size() override;
        void Draw(app::Assets &, graphics::Viewport &) noexcept override;
 
 private:
-       void Update();
+       void FixLayout() override;
 
 private:
        const graphics::Font *font;
@@ -38,7 +38,6 @@ private:
        graphics::Texture tex;
        glm::vec4 fg_color;
        glm::vec4 bg_color;
-       bool dirty;
 
 };