// // Created by sebastian on 10.02.26. // #ifndef DICEWARS_SIEDLER_UITEXT_H #define DICEWARS_SIEDLER_UITEXT_H #include "UiComponent.h" #include "UiRenderBundle.h" class Font; class UiText : public UiComponent, public std::enable_shared_from_this { public: UiText(Font& font, std::string text, const glm::vec2& relativePos, const glm::vec2& relativeSize); void setText(const std::string& text); [[nodiscard]] const Font& getFont() const { return font; } [[nodiscard]] std::string getText() const { return text; } protected: void onCollectRenderData(UiRenderBundle &uiRenderBundle) override; private: std::string text; Font& font; }; #endif //DICEWARS_SIEDLER_UITEXT_H