-
Notifications
You must be signed in to change notification settings - Fork 2
Text
M4T1A5 edited this page Oct 31, 2014
·
2 revisions
The engine supports drawing text using regular font files (e.g .ttf). Most fonts should work.
Using text is pretty simple.
Text* text = new Text("font.ttf", fontSize);
gameObject.AddComponent(text);
// You could also use AddText
text->SetText("Some text");
// or
text->SetText("Some colored text", pmath::Vec4(0, 0, 1, 1));There is also a SetColor function to change the color of the text at any time.