#ifndef TEXTNODE_H
#define TEXTNODE_H

#include "meshnode.h"

#include "SparrowRenderer/mesh.h"
#include "SparrowRenderer/pbrmaterial.h"

#include "glm/vec2.hpp"

class TextNode : public MeshNode
{
private:
    std::wstring m_string;
    float m_fontSize;
    glm::vec2 m_dimension;

    friend class LabelNode;
public:
    TextNode(Mesh* mesh,std::wstring s,float fontSize,bool visible = true) : MeshNode(mesh,visible),m_string(s),m_fontSize(fontSize) {}
    TextNode(Mesh* mesh,std::string s,float fontSize,bool visible = true) : MeshNode(mesh,visible),m_fontSize(fontSize) {
        m_string.assign(s.begin(),s.end());
    }
    ~TextNode(){delete m_geometry.mesh;}

    void setDimension(glm::vec2 dim){m_dimension = dim;}
    glm::vec2 getDimension(){return m_dimension;}

    float getFontSize(){return m_fontSize;}
    std::wstring getString(){return m_string;}
};

#endif // TEXTNODE_H
