//
// Created by sebastian on 10.02.26.
//

#ifndef DICEWARS_SIEDLER_UITEXT_H
#define DICEWARS_SIEDLER_UITEXT_H
#include "UiComponent.h"
#include "UiRenderBundle.h"
#include "glm/vec3.hpp"

class Font;


class UiText : public UiComponent {
public:
    UiText(Font& font, std::string  text, LayoutStyle& style, glm::vec3 size);
    UiText(Font& font, std::string  text, LayoutStyle& style);
    void setText(const std::string& text);

    [[nodiscard]] const Font& getFont() const { return font; }

    [[nodiscard]] std::string  getText() const {
        return text;
    }

    [[nodiscard]] glm::vec3 getColor() const { return color; }

protected:
    void onCollectRenderData(UiRenderBundle &uiRenderBundle) override;
private:
    std::string text;
    Font& font;

    glm::vec3 color;
};


#endif //DICEWARS_SIEDLER_UITEXT_H