Difference between revisions of "DrawText"
From King Arthur's Gold Wiki
Shadlington (Talk | contribs) |
Shadlington (Talk | contribs) |
||
Line 4: | Line 4: | ||
As this is GUI-related it is client only - it should be wrapped in "if ( getNet().isClient() )" or be in a client-only script. | As this is GUI-related it is client only - it should be wrapped in "if ( getNet().isClient() )" or be in a client-only script. | ||
+ | |||
+ | This method is part of the GUI namespace so you need to prefix calls to it with 'GUI::'. | ||
This method has two variants. | This method has two variants. | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
− | void DrawText( const string &text, recti rect, SColor color, bool HorCenter, bool VerCenter ) | + | void GUI::DrawText( const string &text, recti rect, SColor color, bool HorCenter, bool VerCenter ) |
− | void DrawText( const string &text, position2di pos, SColor color ) | + | void GUI::DrawText( const string &text, position2di pos, SColor color ) |
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:Scripting]] | [[Category:Scripting]] | ||
[[Category:Global Functions]] | [[Category:Global Functions]] |
Revision as of 22:18, 6 September 2012
Draws some text.
As this is GUI-related it is client only - it should be wrapped in "if ( getNet().isClient() )" or be in a client-only script.
This method is part of the GUI namespace so you need to prefix calls to it with 'GUI::'.
This method has two variants.
void GUI::DrawText( const string &text, recti rect, SColor color, bool HorCenter, bool VerCenter ) void GUI::DrawText( const string &text, position2di pos, SColor color )