Commit Graph

9886 Commits

Author SHA1 Message Date
Lasse Öörni
c3acff9a2d Added entity group flags for group-based scene queries.
Fixed Input error message in headless mode.
2011-02-22 07:40:12 +00:00
Lasse Öörni
0dc5690767 Exposed FileSelector to script fully.
Added safety checks to Entity::onEvent.
Replaced scanDirectory() booleans with flags.
UI tweaks.
2011-02-21 22:23:37 +00:00
Lasse Öörni
fa7cf0041f EventListener refactoring for safety.
ScriptEventListener simplification.
2011-02-21 17:42:04 +00:00
Lasse Öörni
cafd3c1491 Proper stacking of eventsenders for getEventSender().
Fixed crash if event sender is destroyed while sending.
Tweaked default UI style.
2011-02-21 12:25:37 +00:00
Lasse Öörni
24cec6fac5 Initial FileSelector implementation.
Console & DebugHud changed to load style from XML file.
UI bugfixes.
2011-02-21 09:13:23 +00:00
Lasse Öörni
ae7efc8683 Added doubleclick event to ListView.
Send ListView item selected event even if selection is the same.
2011-02-20 11:47:56 +00:00
Lasse Öörni
9350f4056e UI layout system refactoring.
DropDownList improvements.
UI bugfixes.
2011-02-19 18:59:11 +00:00
Lasse Öörni
93632f9e54 Small fix to DropDownList. 2011-02-18 16:22:56 +00:00
Lasse Öörni
dd24a35ab6 Initial DropDownList implementation.
Renamed MenuItem to Menu.
Bugfixes.
2011-02-18 08:43:09 +00:00
Lasse Öörni
4aa57980fb ListView API & code cleanup.
Fixed bug in Node & UIElement where moving a child from one parent to another, with no other references, would cause its deletion and a crash.
2011-02-17 21:04:54 +00:00
Lasse Öörni
c4d329d86f Exposed ListView to script, added functionality.
Added mouse wheel input to UI.
2011-02-17 13:49:13 +00:00
Lasse Öörni
cae8301062 Initial ListView implementation.
UI bugfixes.
2011-02-17 08:23:27 +00:00
Lasse Öörni
abc4b39adb Normalized scrollbar step size, by default on.
UI code cleanup.
2011-02-16 11:02:14 +00:00
Lasse Öörni
0d79f489d9 Simplified the default UI style. 2011-02-16 07:26:47 +00:00
Lasse Öörni
0bea69e546 ScrollView refactoring. Now ScrollView creates its own scrollbars.
Added UI element visibility change event.
UI bugfixes.
2011-02-15 23:16:51 +00:00
Lasse Öörni
7930515a57 Bugfixes. 2011-02-15 19:58:13 +00:00
Lasse Öörni
cb4d88a8f2 Replaced explicit image rect settings with offsets.
Added project() to Ray.
2011-02-15 19:30:22 +00:00
Lasse Öörni
47faf427f8 Fixed more possible layout bugs.
Replaced focus related UI element bools with FocusMode.
2011-02-15 11:52:18 +00:00
Lasse Öörni
d8a75f7d03 Simplified UI layout file structure (root UI element is also the root XML element.)
Fixed bug with element layout.
Changed ScrollBar to use layout instead of manual positioning.
2011-02-15 07:45:16 +00:00
Lasse Öörni
d3031713e2 Added ScrollBar UI element.
Modified ScrollView to use scrollbars.
Take child UI element visibility into account when calculating the layout.
More UI code cleanup (use events instead of tick update.)
Clearing the focus can be set per UI element.
Moved createScriptObject() functions to RegisterScript.
2011-02-14 23:35:14 +00:00
Lasse Öörni
df29fef170 Added error logging to createScriptObject(). 2011-02-14 17:34:57 +00:00
Lasse Öörni
9ef192a337 Common ScriptFile uninit code moved to releaseModule() function. 2011-02-14 17:18:34 +00:00
Lasse Öörni
c492a2ee69 Added the scriptFile property for accessing the currently executing script file.
Immediate script code can be optionally executed in a specified script file to access its classes.
Code cleanup.
2011-02-14 08:09:23 +00:00
Lasse Öörni
fe4ccf7c58 Added auto-adjusting layout support to UIElement.
Fixed event sending order.
Optimized UI drawing (less batches if there are child elements with same priority and renderstate.)
Adjusted subsystem creation/destruction order. Delete renderer last to avoid being unable to free GPU resources at exit.
Proper fix for BillboardSet zero size animation LOD bug.
Code cleanup.
2011-02-13 22:33:08 +00:00
Lasse Öörni
d5a35e6530 Garbage collection moved before rendering update so that "ghost" objects will not be rendered in any case.
Accumulate collision events during physics update, then send them later. This is to prevent crashes in case entities or rigid bodies are deleted in response to the events, while the world is locked for update.
Fixed BillboardSet bug of billboards possibly staying after being removed, if update LOD is being used.
Fixed player rotation stutter in singleplayer NinjaSnowWar.
Disabled AngelScript threading for slight performance gain.
2011-02-12 21:44:28 +00:00
Lasse Öörni
4e7da409cc Fixed AnimatedModel unnecessary update in case it is within the influence of an invisible light. 2011-02-12 12:55:32 +00:00
Lasse Öörni
8d943e5e4c Invisible animation update can be controlled per AnimatedModel. Default is to not update when invisible. 2011-02-12 12:15:42 +00:00
Lasse Öörni
0a8cfb5acf Cleanup of UI element code by using onResize(). 2011-02-11 23:44:38 +00:00
Lasse Öörni
9a640e1d10 Moved minimum & maximum size to UIElement.
Added UI element resize event and onResize() virtual function.
2011-02-11 15:01:52 +00:00
Lasse Öörni
553b5055ad Exposed EventListener, sending events to any EventListener (not just entities or components) and subscribing to sender specific events to script.
Fixed and simplified script function to ScriptFile mapping.
Renamed methods to get sub-elements (Console, LineEdit)
TextFinished event also sends the text like TextChanged.
2011-02-10 22:30:32 +00:00
Lasse Öörni
03e19a7ac2 Event refactoring. Now it is possible to subscribe to events of a specific sender. To be able to send events, one must also derive from EventListener.
Event library removed for containing only a few files. 
Event unsubscribing optimized.
Remote events changed back to a whitelist system.
2011-02-10 07:38:01 +00:00
Lasse Öörni
19acc85c8a Added delay-executed method calls to ScriptInstance.
Removed the getLastScriptFile() hack. Instead the executing function is queried from the script context and is mapped back to the ScriptFile.
2011-02-09 18:04:31 +00:00
Lasse Öörni
9e2da6555f Removed delay functionality from events. To work properly, it would need serialization when the scene is saved/loaded, but events may contain non-serializable data (pointers.) This is to be replaced with another, more manageable system. 2011-02-09 07:16:42 +00:00
Lasse Öörni
13ca9b42fe Added arrow key scrolling to ScrollView.
Clear UI element focus when a non-focusable element clicked.
ESC defocusing is now a property of UIElement. Defocusing is handled by UI.
Fixed UIElement::setSelected().
Renamed some keys.
2011-02-08 21:31:45 +00:00
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