Difference between revisions of "GetTextDimensions"

From King Arthur's Gold Wiki
Jump to: navigation, search
(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-...")
 
 
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 ::string &in text, ::dimension2di &out dim  )
+
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  )