Yao Wei Tjong 姚伟忠
b5836237e9
Remove dependency on Lua when LuaJIT is enabled.
...
Change build option name from ENABLE_LUA_JIT to ENABLE_LUAJIT.
Change tolua++ lua scripts to be compatible with both LuaJIT and Lua. Replace toluabind.c with the corresponding bytecode.
2013-10-11 02:02:08 +08:00
weitjong
1afb83b10b
Generated sources are defined before normal sources.
...
To be consistent with the rest of the CMakeLists.txt.
2013-10-06 14:01:11 +08:00
Lasse Öörni
36eb726d36
Add the concept of base class type to Object to simplify determining if a ScriptInstance's handle variable is a Node, Component or Resource. Serialize script's resource handles as ResourceRef attributes and allow editing them.
2013-10-05 23:24:39 +03:00
Lasse Öörni
25c7aa53c3
Added GetDesktopResolution() to Graphics.
2013-10-05 02:39:58 +03:00
Lasse Öörni
2fbe931cee
Added SetWindowPosition() / GetWindowPosition() to Graphics.
2013-10-05 02:22:02 +03:00
Lasse Öörni
39c8295eb3
Added editable flag to UI elements. When disabled, will not edit the value (eg. LineEdit text) through user input. Fixes #4 .
...
Moved UIElement default virtual function implementations to the header.
Removed clip border from the default style LineEdit, as some letters (eg. lowercase y) will clip with the font size used in the editor & console.
2013-10-04 01:58:46 +03:00
Lasse Öörni
b2d356ad5e
Allow using the operating system clipboard in UI.
2013-10-04 01:21:24 +03:00
aster2003
8098f588b4
Change LuaFunction to subclass of RefCounted.
2013-10-03 21:06:46 +08:00
Lasse Öörni
165b7c8eae
Default to ENABLE_SAFE_LUA=0 for improved performance.
2013-10-01 18:40:47 +00:00
Lasse Öörni
36e165596a
Create a dedicated depth stencil texture in View3D so that temporary depth stencils are not constantly generated when resizing a View3D.
...
Decrease screen buffer idle time before destruction to 1 second.
2013-09-30 11:22:11 +00:00
Aster Jian
a570bb8ad6
Add LuaJIT support in LuaScript module, please use ENABLE_LUA_JIT to enable it, just test on Windows.
2013-09-29 14:38:03 +00:00
Aster Jian
2d3740d28c
Fixed an error in PushString.
2013-09-29 09:00:59 +00:00
Lasse Öörni
fc2854167c
Changed Lua library & object registration order to ensure base classes are correctly set up.
2013-09-28 19:34:45 +00:00
Lasse Öörni
c7f098de3e
Updated documentation on changed Lua function call mechanism.
2013-09-27 21:36:19 +00:00
Lasse Öörni
c3870201b9
Added TransformChanged() script method to ScriptInstance & LuaScriptInstance. Called when node transform changes (hooks to OnMarkedDirty() on C++ side)
...
Ensure that LuaScriptInstance listens only to its own scene's & physics world's update events.
Changed LuaScriptInstance to use IsEnabledEffective() to make sure it gets disabled if the node is disabled.
2013-09-27 20:56:35 +00:00
Wei Tjong Yao
09ba853aba
Keep CMakeCache.txt in between build script invocation to speed things up. Correct typo error.
2013-09-26 20:56:42 +00:00
Aster Jian
4b9f241065
Add LuaFunction class, Add more Lua API in Sound, fixed typo.
2013-09-26 16:18:38 +00:00
Lasse Öörni
e5b7b6c916
Re-enable Lua's default loaders. Register own loader last into the table.
2013-09-26 07:23:09 +00:00
Lasse Öörni
49319ddb57
Disable Lua's inbuilt loaders. This fixes LuaScript's own loader possibly failing on Linux.
2013-09-25 19:44:35 +00:00
Lasse Öörni
4d4cb2cbb3
Fix incorrect assignment.
2013-09-25 17:11:05 +00:00
Lasse Öörni
d22dab085d
Restored Variant constructors & equality operators.
2013-09-25 14:30:24 +00:00
Lasse Öörni
862ca75a46
Added script (pkgToDox.lua) which regenerates Lua script API documentation. It can be run with a standalone Lua interpreter.
2013-09-25 06:59:47 +00:00
Wei Tjong Yao
1250776d0c
Added basic.lua as dependency in build script so that C++ to Lua binding codes would be automatically rebuilt.
2013-09-25 04:16:49 +00:00
Aster Jian
e4fda39b47
Rename function to solve name conflict with base class.
2013-09-24 15:51:21 +00:00
Aster Jian
241afce241
Handle enabled/disabled state change.
2013-09-24 13:21:27 +00:00
Lasse Öörni
586d878509
Fix enum.
2013-09-23 18:51:50 +00:00
Lasse Öörni
dbd7687c56
Added configurable Z bias to Text3D effect.
...
Default Text effect color changed to opaque black.
2013-09-23 18:49:50 +00:00
Aster Jian
902300e2e5
Add TextEffect in Text3D class.
2013-09-23 15:00:31 +00:00
Aster Jian
318d2bd5ef
Add TextEffect in Text class.
2013-09-23 14:38:21 +00:00
Aster Jian
bbf193dd5f
Move tolua++ Urho3D extension in a file, Move PushParameters function in ToluaUrho3DEx and change return type to bool.
2013-09-23 05:29:03 +00:00
Lasse Öörni
eb6ba62ab9
Added the LuaScript library to Doxygen documentation.
...
Added LuaScript doxygen page.
2013-09-22 23:41:27 +00:00
Lasse Öörni
f93a5e4a23
LuaScript library header formatting. Allow parameters also for procedural Lua functions. Renamed LuaScriptInstance::Execute() to ExecuteFunction().
2013-09-22 22:08:26 +00:00
Lasse Öörni
48532b2509
Added C++ / script integration samples, which reimplement AnimatingScene sample, but use a script object instead of a C++ component.
...
Added Execute() function to LuaScriptInstance.
Fixed LuaScriptInstance::SetScriptFileName() not loading the script.
2013-09-22 19:15:30 +00:00
Aster Jian
75a55050b7
Fixed Lua Chat sample bug, Replace Variant's constructor with SetXXX function.
2013-09-22 15:12:37 +00:00
Aster Jian
472a2b9bd9
Added Lua Chat sample.
2013-09-22 14:18:44 +00:00
Aster Jian
00342501ab
Binding more class in IO lib to Lua, Fixed multi inheritance class.
2013-09-22 05:51:05 +00:00
Lasse Öörni
da45ff6b6b
Added SceneReplication Lua sample.
2013-09-21 22:08:05 +00:00
Lasse Öörni
81f5233ef7
Added Lua Ragdolls sample.
2013-09-20 21:50:20 +00:00
Aster Jian
cb19db83d1
Add RenderToTexture and Physics sample in Lua.
2013-09-20 14:59:54 +00:00
Lasse Öörni
7a55a43725
Tidied up the sample descriptions.
...
Exposed UIElement::SetVar() and GetVar() to Lua script.
Modified the Lua Sprites sample to use custom vars inside UIElement.
2013-09-20 07:30:07 +00:00
Lasse Öörni
1cd73e46fd
Exposed StaticModelGroup to script. Ported HugeObjectCount example group mode switching to script versions.
2013-09-19 22:44:06 +00:00
Aster Jian
6e58119be9
Fixed typo error in comment.
2013-09-19 13:49:19 +00:00
Lasse Öörni
b3777b652c
Fixed StaticModel::SetModel() getting called instead of AnimatedModel::SetModel() in Lua script.
2013-09-18 23:42:48 +00:00
Wei Tjong Yao
e376dc4562
Identity the maintainer of the Urho3D/Lua fork. Regenerate toluabind.c and toluabind.h using bootstrap process. Only call 'standard' script functions when they are available and be silent about it when they are not defined in the Lua script.
2013-09-18 21:49:04 +00:00
Aster Jian
0ddb13f148
Add Update, PostUpdate, Save, Load function in LuaScriptInstance, Add one more LoadXML and SaveXML in Scene, Add destructor function in Math lib.
2013-09-18 17:25:16 +00:00
Lasse Öörni
0201c1d961
Undefine TOLUA_RELEASE by default for better Lua crash protection. Re-enable with the CMake build option -DENABLE_SAFE_LUA=0.
...
Fixed some Variant constructors failing in Lua (removed void pointer constructor.)
Removed deprecated RenderMode enum.
Added Camera's ViewOverrideFlags to Lua.
Added MultipleViewports Lua sample.
2013-09-17 19:49:18 +00:00
Aster Jian
80acf3e718
Add CreateScriptObject GetScriptObject Lua API in Node class.
2013-09-17 10:42:14 +00:00
Wei Tjong Yao
5d04c531a1
Pass window resized event (due to device orientation change) from SDL to Urho3D::Graphics class for both Android and iOS as well. Note that the event is only sent when the application has not locked the orientation. Minor code cleaned up on LuaScript subsystem.
2013-09-17 09:55:26 +00:00
Lasse Öörni
c20257cdf7
Merged the shaderData_ and worldTransform_ members of Batch & SourceBatch. The idea is that a batch can define multiple world transforms. For static geometry this means instance transforms. For skinned geometry they are bone transforms instead.
...
Inlined some functions in View & Drawable.
2013-09-17 07:14:13 +00:00
Aster Jian
78a77a7e36
Add type parameter to VariantMap::GetPtr funcition, so we can get correct type in Lua.
...
Remove SetCamera and GetCamera etc function in VariantMap, pls use SetPtr and GetPtr.
2013-09-17 05:55:04 +00:00