0ad/source
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
..
collada Fix compiler warnings on VS 2015, refs #3439, refs #5069. 2018-03-10 09:58:53 +00:00
graphics Split CColor from Shapes. 2019-01-13 15:38:41 +00:00
gui Add a GetTextSize() method to GUI objects 2019-03-18 22:15:40 +00:00
i18n Simple refactoring of Singleton. Make it non-copyable. 2019-01-13 15:11:40 +00:00
lib Simple refactoring of Singleton. Make it non-copyable. 2019-01-13 15:11:40 +00:00
lobby Allow users to disable TLS encryption entirely in the GUI to ease use of the lobby if gloox/GnuTLS crashes upon TLS handshake, refs #5349, #4705. 2018-11-27 14:41:44 +00:00
maths Cleanup Camera code for projections. 2019-01-05 22:40:56 +00:00
mocks More FreeBSD build fixes. 2012-01-30 06:21:11 +00:00
network Don't let the duplicateplayernames setting break lobbied games (0fd8aa2a77) 2019-01-28 12:09:42 +00:00
pch Switch to std::shared_ptr and std::weak_ptr. 2015-01-25 03:10:58 +00:00
ps Add autostart conquest default description to readme.txt and add endless support for autostart in both readme.txt and GameSetup.cpp 2019-03-16 14:20:28 +00:00
renderer Split CColor from Shapes. 2019-01-13 15:38:41 +00:00
scriptinterface SpiderMonkey-related changes in preparation for the upgrade to SpiderMonkey 45, refs #4893. 2019-01-13 16:37:41 +00:00
simulation2 SpiderMonkey-related changes in preparation for the upgrade to SpiderMonkey 45, refs #4893. 2019-01-13 16:37:41 +00:00
soundmanager SoundGroup cleanup. 2019-01-02 22:31:46 +00:00
third_party Use libsodium for cryptography. 2018-04-08 21:41:31 +00:00
tools Rotate entities during placement in Atlas with the keyboard only when the window has focus. Reported by Andrettin. 2019-03-17 16:04:06 +00:00
main.cpp Test all full hashes in non-visual replaymode by default and keep skipping quick-hash by default. 2018-05-29 02:14:38 +00:00
test_setup.cpp Fix string format of the JS test assertion failure following 7c2e9027c2 (cxxtest expects a char* instead of a std::wstring, so newlines were printed as \n characters). 2017-10-13 21:56:45 +00:00