#pragma once
#include "node.h"
#include "font.h"

class NodeText : public Node
{
public:
    TextMesh m_text_mesh;
    std::string m_text;
    std::string m_font = "arial";
    glm::vec4 m_color{ 1, 1, 1, 1 };
    int m_font_size = 11;
    kFont font_id;
    virtual Node* clone_instantiate() const override;
    virtual void clone_copy(Node* dest) const override;
    virtual void create() override;
    virtual void restore_context() override;
    virtual void parse_attributes(kAttribute ka, const tinyxml2::XMLAttribute* attr) override;
    void set_text(const char* s);
    void set_text_format(const char* fmt, ...);
    void set_font(kFont fontID);
    virtual void draw() override;
};
