1
1
forked from 0ad/0ad
0ad/source
elexis 3d07327837 Introduce a JSInterface_IGUITextOwner to encapsulate JSI_IGUIObject::getTextSize from 9c5062147a / D844.
JSI_IGUIObject should not contain functions that work only for some GUI
Object types, refs #5442.

Deduplicate the shuffled copy of CText::SetupText.

Avoid the 80 times slower dynamic_cast mandated by the virtual class
inheritance by adding an ugly overridable pointer to the base class
pointing at this derived classes, as bargained with Vladislav and
proposed by wraitii in D1781 id=8426.
This may be improved by refactoring the IGUIObject and JSInterface
classes to use templates and / or eliminating its virtual inheritance.

Implement and use FromJSVal / ToJSVal CSize specialization.
Remove the JS::CallArgsFromVp call.

Differential Revision: https://code.wildfiregames.com/D2136
Comments By: wraitii, Vladislav
This was SVN commit r22596.
2019-08-02 16:55:15 +00:00
..
collada Fix compiler warnings on VS 2015, refs #3439, refs #5069. 2018-03-10 09:58:53 +00:00
graphics Refactors Camera aspect ratio and calculation of plane points. 2019-07-24 23:08:02 +00:00
gui Introduce a JSInterface_IGUITextOwner to encapsulate JSI_IGUIObject::getTextSize from 9c5062147a / D844. 2019-08-02 16:55:15 +00:00
i18n Simple refactoring of Singleton. Make it non-copyable. 2019-01-13 15:11:40 +00:00
lib Removes clipboard debug logging on X11, fixes #5535 2019-07-25 05:34:04 +00:00
lobby Provide ScriptInterface CreateObject and CreateArray functions to replace Eval calls following 7c2e9027c2, 1c0536bf08 and later. 2019-07-22 19:35:14 +00:00
maths Cleanups BoundingBoxAxisAligned and fixes coding styles a bit. 2019-06-12 20:23:14 +00:00
mocks More FreeBSD build fixes. 2012-01-30 06:21:11 +00:00
network Provide ScriptInterface CreateObject and CreateArray functions to replace Eval calls following 7c2e9027c2, 1c0536bf08 and later. 2019-07-22 19:35:14 +00:00
pch Update precompiled headers to improve build times. 2019-05-26 07:21:12 +00:00
ps Delete CInternalCGUIAccessorBase class from c2a71e41bf. 2019-07-28 02:39:52 +00:00
renderer Refactors camera projections - makes projection functions of camera more clear. 2019-06-26 22:54:05 +00:00
scriptinterface Add missing CPos FromJSVal, ToJSVal following 659a9ea57a. 2019-07-29 11:56:11 +00:00
simulation2 Replace {gender} by {phenotype} and support this tag in VisualActor. 2019-08-01 19:14:40 +00:00
soundmanager Fix lineendings. 2019-07-12 17:40:40 +00:00
third_party Removes deprecated 'register' storage class from mongoose. Refs #3068 2019-07-18 06:28:51 +00:00
tools Fixes compiler warning about unused variable introduced in 09e129bce2. 2019-07-24 23:25:45 +00:00
main.cpp Alt+tab fix for ca9109be75 - call sound IdleTask in Atlas and swap buffers only once in Atlas. 2019-07-24 16:40:34 +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