diff --git a/include/Cubed/tools/font.hpp b/include/Cubed/tools/font.hpp index 263bfa0..2566c77 100644 --- a/include/Cubed/tools/font.hpp +++ b/include/Cubed/tools/font.hpp @@ -22,6 +22,16 @@ struct Character { GLuint advance; }; +struct TextMesh { + std::vector vertices; + + float width; + float height; + + float min_x; + float min_y; +}; + class Shader; class Font { @@ -29,7 +39,7 @@ public: Font(); ~Font(); - static std::vector vertices(const std::string& text); + static TextMesh vertices(const std::string& text); static const Texture* text_texture(); static const std::string& font_path(); diff --git a/include/Cubed/ui/button.hpp b/include/Cubed/ui/button.hpp index 5f550e3..2b34a28 100644 --- a/include/Cubed/ui/button.hpp +++ b/include/Cubed/ui/button.hpp @@ -1,5 +1,7 @@ #pragma once +#include "Cubed/ui/image.hpp" +#include "Cubed/ui/label.hpp" #include "Cubed/ui/widget.hpp" #include @@ -47,8 +49,8 @@ public: private: std::function m_clicked; - std::unique_ptr m_background; - std::unique_ptr m_foreground; + std::unique_ptr m_background; + std::unique_ptr