0ad/source/gui/scripting
s0600204 9c5062147a Add a GetTextSize() method to GUI objects
Usage:
  let size = Engine.GetGUIObjectByName({gui_object_name}).GetTextSize()

Returns a JS object containing the height and width of the primary text
field within
the object, taking into account new lines, text wrapping, and font
changes.

Unless the object doesn't contain text, in which case the method will
return undefined.

Commented on by: vladislavbelov
Additional code by: elexis
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D844
This was SVN commit r22134.
2019-03-18 22:15:40 +00:00
..
GuiScriptConversions.cpp Replace input.js doubleclick hack and ease doubleclicking on moving units. 2017-04-22 01:24:03 +00:00
JSInterface_GUIManager.cpp Add missing ScriptInterface includes to 2018-04-27 16:48:44 +00:00
JSInterface_GUIManager.h Add missing ScriptInterface includes to 2018-04-27 16:48:44 +00:00
JSInterface_GUITypes.cpp SpiderMonkey-related changes in preparation for the upgrade to SpiderMonkey 45, refs #4893. 2019-01-13 16:37:41 +00:00
JSInterface_GUITypes.h Add missing ScriptInterface includes to 2018-04-27 16:48:44 +00:00
JSInterface_IGUIObject.cpp Add a GetTextSize() method to GUI objects 2019-03-18 22:15:40 +00:00
JSInterface_IGUIObject.h Add a GetTextSize() method to GUI objects 2019-03-18 22:15:40 +00:00
ScriptFunctions.cpp Move UserReporter C++/JS functions from JSInterface_Debug.cpp to JSInterface_UserReport.cpp, refs #4772. 2018-08-22 12:48:27 +00:00
ScriptFunctions.h # Rewrite of the game's simulation system 2010-01-09 19:20:14 +00:00