Difference between revisions of "GetTextDimensions"
From King Arthur's Gold Wiki
Shadlington (Talk | contribs) (Created page with "<onlyinclude> Gets the dimensions of some text. </onlyinclude> As this is GUI-related it is client only - it should be wrapped in "if ( getNet().isClient() )" or be in a client-...") |
Shadlington (Talk | contribs) |
||
Line 7: | Line 7: | ||
This method is part of the GUI namespace so you need to prefix calls to it with 'GUI::'. | This method is part of the GUI namespace so you need to prefix calls to it with 'GUI::'. | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
− | void GUI::GetTextDimensions( const | + | void GUI::GetTextDimensions( const string &in text, dimension2di &out dim ) |
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:Scripting]] | [[Category:Scripting]] | ||
[[Category:Global Functions]] | [[Category:Global Functions]] |
Latest revision as of 12:30, 6 October 2012
Gets the dimensions of 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::'.
void GUI::GetTextDimensions( const string &in text, dimension2di &out dim )