implement word wrap in text node
This commit is contained in:
@@ -44,6 +44,13 @@ public:
|
||||
|
||||
class TextMesh
|
||||
{
|
||||
struct Token
|
||||
{
|
||||
std::string s;
|
||||
float w;
|
||||
Token(const std::string& str, float width) : s(str), w(width) {}
|
||||
};
|
||||
std::vector<Token> tokenize(const std::string& s, const Font& f) const noexcept;
|
||||
public:
|
||||
GLuint font_array = 0;
|
||||
int font_array_count = 0;
|
||||
|
||||
Reference in New Issue
Block a user