Commit Graph

10192 Commits

Author SHA1 Message Date
Lasse Öörni
fd24ca3c69 UI improvements and cleanup.
Drag and drop & window resize visualization by changing the mouse cursor shape.
2011-02-23 18:38:45 +00:00
Lasse Öörni
c30b162267 Support for different UI cursor shapes. 2011-02-23 08:01:33 +00:00
Lasse Öörni
f2492935d4 Initial UI drag and drop support. No visualization yet. 2011-02-22 23:03:23 +00:00
Lasse Öörni
bc79209861 Added simple hierarchical mode to ListView.
UIElement userdata is now a VariantMap.
2011-02-22 22:17:50 +00:00
Lasse Öörni
e343f0c631 Replaced TryFocus event with UIMouseClick.
Added ListViewKey event for unhandled keypressed while the ListView is focused. Now ListView no longer equates enter press as a doubleclick by itself.
2011-02-22 19:40:21 +00:00
Lasse Öörni
d02e959f9a Improved replaceInPlace().
Focus FileSelector file list initially.
2011-02-22 16:39:10 +00:00
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