Commit Graph

10202 Commits

Author SHA1 Message Date
Lasse Öörni
9f01763599 BillboardSet & ParticleEmitter UV animation support. 2011-02-08 20:26:55 +00:00
Lasse Öörni
1d3e0bbe41 Added cycling focus with TAB key to UI.
Remove text selection from LineEdit when defocusing.
2011-02-08 18:21:14 +00:00
Lasse Öörni
6d22d95d97 LineEdit copy-paste & selection by shift-cursor. 2011-02-08 11:06:12 +00:00
Lasse Öörni
5d5cf9e0e0 LineEdit drag selection support. 2011-02-08 07:38:22 +00:00
Lasse Öörni
ee5a087570 Added hover background color & selection color to Text.
Added qualifier key support to Input & UI.
2011-02-07 22:28:55 +00:00
Lasse Öörni
3dddb2be16 LineEdit scrolling fix and code cleanup.
Removed the HoverColor feature from UIElement, as it is rarely useful.
If Text has nonzero max line width, it also fixes the element width.
2011-02-07 11:20:06 +00:00
Lasse Öörni
523559f1a0 Added setFixedUpdateFps() to ScriptInstance.
Added setSelected() to UIElement. Visually it is the same as hover.
Added onKey() to UIElement.
Added cursor movement by arrows or mouse click and DEL key support to LineEdit.
Added possibility to query each char position from Text.
Script code cleanup.
2011-02-06 22:47:24 +00:00
Lasse Öörni
16aa868d4f Fixed AnimatedModel's animation possibly not updating when loading the scene.
Added light's shadow intensity & shadow fade distance parameters to the NinjaSnowWar scene.
2011-02-04 23:31:07 +00:00
Lasse Öörni
ea9cc96e52 Added shadow intensity and shadow fade distance parameters for Light.
Fixed light XML load not loading all shadow parameters.
2011-02-04 13:51:46 +00:00
Lasse Öörni
d1bf5d5702 Added getResourceRefs() function to Component. 2011-02-03 22:21:56 +00:00
Lasse Öörni
e6d971139d Fixed incorrect stencil clearing in deferred rendering when there is a point light which has some sides unshadowed.
Fixed particle emitter network update.
Completely removed garbage collection support from CScriptArray.
Garbage collection will first detect garbage using one step, then destroy garbage fully.
2011-02-03 17:05:55 +00:00
Lasse Öörni
7b30e4ca01 Fixed C++ NinjaSnowWar to use updateFixed() instead of postUpdateFixed(), like the script version. This ensures no forces are accumulated to be applied next frame (these would not be replicated properly.)
Fixed enemy ninjas' initial heading.
Added parameter passing to the script example batch files.
Added a profiling block to C++ NinjaSnowWar gameobject update, to be able to compare between C++ & script.
2011-02-02 07:57:17 +00:00
Lasse Öörni
43e374b4a3 Execute removal of scripted entities inside a scope block so that the array shouldn't keep the entities alive. 2011-02-01 23:01:23 +00:00
Lasse Öörni
bb67b6d7fe Playable scripted NinjaSnowWar.
Disabled garbage collection from CScriptArray again because of some very odd "objects not getting deleted" bugs.
Unprepare script contexts before garbage collection.
2011-02-01 22:51:45 +00:00
Lasse Öörni
c73c30fde1 Added the script-only function Entity::createScriptObject() for convenience. This is for cases where only the script object is significant, instead of the ScriptInstance component that is also created at the same time. 2011-02-01 07:07:34 +00:00
Lasse Öörni
bd1e1d879a Minor script bugfixes. 2011-01-31 22:39:37 +00:00
Lasse Öörni
7cc3d7d842 Script API fixes and additions.
Changed ScriptInstance to hold a weak pointer to the ScriptFile to avoid circular references.
Fixed missing RigidBody pointers in entity collision event.
More objects for scripted NinjaSnowWar.
2011-01-31 22:29:36 +00:00
Lasse Öörni
91eb98128d Removed unnecessary try-catch. 2011-01-31 09:10:37 +00:00
Lasse Öörni
21152191ac Added Engine::setDefaultScene(). The default scene will always be accessible as the "scene" global property.
Exposed functions to get number of entities & components, and to return all components of an entity.
2011-01-31 07:34:37 +00:00
Lasse Öörni
080d52e93c Exposed Model::getSkeleton() to script.
Added possibility to throw an exception without logging an error.
Added function to retrieve the last log message.
Added check for ScriptFile loading successfully in the Urho3D Shell.
2011-01-30 22:50:34 +00:00
Lasse Öörni
e4bb607126 Console & DebugHUD code cleanup. 2011-01-30 21:56:48 +00:00
Lasse Öörni
ffce296795 Further cleanup of exceptions. 2011-01-30 21:19:44 +00:00
Lasse Öörni
bac80cd8eb Handle window resize in the script examples. 2011-01-30 18:49:53 +00:00
Lasse Öörni
fba7a7dba1 Removed some exceptions. Now failing to load a resource returns a null pointer instead of throwing an exception. 2011-01-30 18:38:43 +00:00
Lasse Öörni
d4666eaacb Added snowballs to the scripted NinjaSnowWar.
Documentation update.
2011-01-30 16:26:54 +00:00
Lasse Öörni
6d015d064a ScriptFile method search cache.
Documentation update.
2011-01-30 11:49:03 +00:00
Lasse Öörni
dcc4765d6a Tweaked garbage collection.
Exposed immediate execution & running a full garbage collection cycle to script.
2011-01-29 23:11:26 +00:00
Lasse Öörni
f119d7b275 Split functionality to GameObject base class.
Updated documentation.
2011-01-29 22:16:39 +00:00
Lasse Öörni
56f39329cc GCC fixes. 2011-01-29 19:43:16 +00:00
Lasse Öörni
b8bc819b71 Removed ScriptTest. 2011-01-29 18:29:25 +00:00
Lasse Öörni
e7a3473066 Examples restructuring. The old Test is now remade in script and called GraphicsTest. The ScriptTest has been renamed to NSWRemake. The executable for running the script examples is renamed to Urho3D.exe.
Various script API fixes. CScriptArray is again garbage collected. 
More file & ProcessUtils functions exposed to script.
More random functions exposed to script.
VolumeNode & GeometryNode exposed to script.
2011-01-29 18:28:10 +00:00
Lasse Öörni
21e87d6a1b Made the debug console manually toggleable.
Registered convenience forms of print() to script (print int / float / bool.)
2011-01-28 23:20:06 +00:00
Lasse Öörni
74b348c0a5 Fixed bug with rendering nontextured UI elements.
Fixed EVENT_TEXTFINISHED being sent for every change in LineEdit.
Added possibility to specify less than fully opaque colors for UI elements, instead of having to use the opacity property, which is always inherited.
Added variant userdata to UI elements.
Added defocusable flag to LineEdit. This makes it possible to disable the default ESC-defocusing.
Added debug console, which prints log output, and executes AngelScript from the input prompt.
2011-01-28 22:19:33 +00:00
Lasse Öörni
ba3d4d726d Log resource paths in fixed form. 2011-01-27 20:35:22 +00:00
Lasse Öörni
52c5055c4e Fixed show/hide bugs with popup menu hierarchies. 2011-01-27 20:16:34 +00:00
Lasse Öörni
92c4f706c1 Added mouse wheel input. 2011-01-27 19:10:42 +00:00
Lasse Öörni
79df63289c ScriptInstance & ScriptFile no longer allocate own script contexts. Instead ScriptEngine preallocates a fixed number of script contexts, to account for the maximum allowed script execution nesting level.
Removed the need to delay entity removes from Scene.
2011-01-27 18:27:32 +00:00
Lasse Öörni
8f67b457c6 Removal of self from script is now properly delayed until the end of the scene update. 2011-01-27 08:50:28 +00:00
Lasse Öörni
174ba5cdb5 Refactoring of script object creation. 2011-01-26 21:17:49 +00:00
Lasse Öörni
956cac7648 Script reloading support. ScriptInstances register themselves with ScriptFile so that on reload, objects can be deleted and recreated.
Automatic caching for ScriptFile::getFunction() into a std::map.
2011-01-26 21:00:16 +00:00
Lasse Öörni
2ebe2a36b4 Fixed constness of some Scene & Entity functions exposed to script.
Exposed functions to get all scene entities, or scene entities with a specific script class.
2011-01-26 19:09:48 +00:00
Lasse Öörni
044ef4d5a9 Exposed Engine's runFrame() and associated sub-functions to script.
Moved ScriptTest scene init & frame iteration fully to script.
Added optional retained mode script engine logging. This is used for collecting errors during script module compile.
2011-01-26 18:35:02 +00:00
Lasse Öörni
5d53f2240a Check that script classes implement the empty "ScriptObject" interface. 2011-01-26 06:59:59 +00:00
Lasse Öörni
c13916474e Allow access to the ScriptInstance's object from script. The object should implement the empty interface "ScriptObject", so that a handle to it can be correctly returned.
Script context userdata is no longer used to identify the active ScriptInstance.
Removed ExecuteCache from ScriptInstance, as execute() should now be mostly unnecessary from script, and C++ code should perform its own method pointer caching in any case.
Removed the use of execute() from ScriptTest script code in favor of direct method calls.
2011-01-25 21:43:19 +00:00
Lasse Öörni
27a21e140e Made the CScriptArray a non-garbage collected type; otherwise a full garbage collection cycle would be required each frame to prevent memory use build up.
Release ScriptFile resources at ScriptTest exit to prevent memory leaks being reported.
2011-01-25 20:12:22 +00:00
Lasse Öörni
613d51b7bb Added pause toggle. 2011-01-25 19:22:14 +00:00
Lasse Öörni
b9250e7c04 Ninja movement, controls & camera update in ScriptTest.
Method pointer cache for ScriptInstance::execute().
Script interface additions & bugfixes.
Changed LineEdit & Text constructors to take the UI element name as the first argument.
2011-01-25 19:05:07 +00:00
Lasse Öörni
bdb5f427c0 Create overlays in script. 2011-01-25 15:49:38 +00:00
Lasse Öörni
19d0ed0e45 Added ScriptTest example, which will be a script-based (partial) reimplementation of NinjaSnowWar.
Script interface bugfixes.
2011-01-25 15:14:56 +00:00
Lasse Öörni
9f91d37518 Moved bringToFront() to UIElement.
Added getRootElement() to UIElement.
Cleaned up menu popup code.
To optimize UI rendering, only ScrollView & LineEdit clip child UI elements by default.
2011-01-25 07:58:38 +00:00