horizontal text

This commit is contained in:
devZoGok
2021-10-19 19:06:41 +03:00
parent 75d6273219
commit 808bb4cbfa
4 changed files with 20 additions and 13 deletions
+4 -2
View File
@@ -24,16 +24,17 @@ namespace vb01{
~Text();
void update();
void setText(std::wstring);
float getCharWidth(char);
inline Node* getNode(){return node;}
inline void setNode(Node *node){this->node = node;}
inline void setScale(float s){this->scale = s;}
inline void setColor(Vector4 c){this->color = c;}
inline int getLength(){return entry.length();}
inline std::wstring getText(){return entry;}
inline bool isHorizontal(){return horizontal;}
inline void setHorizontal(bool h){this->horizontal = h;}
private:
void initFont(std::string);
void prepareGlyphs(Glyph, float);
void prepareGlyphs(Glyph, Vector2);
void renderGlyphs(Glyph, float[], u32);
Glyph* getGlyph(u16);
@@ -43,6 +44,7 @@ namespace vb01{
Shader *shader = nullptr;
unsigned int VAO, VBO;
float scale = 1;
bool horizontal = true;
Vector4 color = Vector4::VEC_IJKL;
};
}