drawUIText
Script::drawUIText
Draws text on the User Interface.
Declaration
void drawUIText(FontID fontID, const std::wstring& text, const Math::vec2& position, const Math::vec4& color = Math::vec4(0.0f, 0.0f, 0.0f, 1.0f));
Parameters
Name |
Type |
Description |
---|---|---|
fontID |
The font to use to draw the text. |
|
text |
const std::wstring& |
The text to draw. |
position |
const Math::vec2& |
The position where the text will start to draw. |
color |
const Math::vec4& |
The color and opacity of the text. |
Returns
None.
Notes
If text
is directly written on the source code, the string literal “L” must be used, for example: L”NutshellEngine”.
The position
is in pixels, with (0, 0) being the top-left corner of the UI.
Draws text on the User Interface.
Declaration
void drawUIText(FontID fontID, const std::string& text, const Math::vec2& position, const Math::vec4& color = Math::vec4(0.0f, 0.0f, 0.0f, 1.0f));
Parameters
Name |
Type |
Description |
---|---|---|
fontID |
The font to use to draw the text. |
|
text |
const std::string& |
The text to draw. |
position |
const Math::vec2& |
The position where the text will start to draw. |
color |
const Math::vec4& |
The color and opacity of the text. |
Returns
None.
Notes
The position
is in pixels, with (0, 0) being the top-left corner of the UI.