Powerful Defold UI component framework
Besides a lot of fixes (thanks for feedback!) two components was add: StaticGrid and DynamicGrid instead of usual Grid component (it is deprecated now). Add component:set_input_enabled for basic component class. So you can enable/disable user input for any component. Finaly implemented on_layout_changed support. Druid components now will try keep their data between layout changing! You also can use this callback in your custom components. Also check component.template.lua what you can use for your own custom components!
base
folder to extended
. In future to use them, you have to register them manually. This is done for decrease build size by excluding unused componentsreturn nil
in some on_input
functionsset_extra_stretch_size
renamedcomponent.template.lua
as template for Druid custom componentreturn nil
in some on_input
functionsset_extra_stretch_size
renamedcomponent.tempalte.lua
as template for Druid custom componentFix #64
Hover component: fix wrong mouse_hover default state
Fix #61
Druid 0.4.0:
Add Drag basic component
[Breaking changes] Druid Scroll component fully reworked. Input logic moved to Drag component
Druid Grid Update
grid:clear
now don't delete any GUI nodes. Druid will not care about gui.delete_node
logic anymore (#56)Druid Hover component now have two hover events (#49):
Styles update:
component:get_style
function. Now you can only set stylescomponent:on_style_change
function. It's invoked on component:set_style
functioncomponent:on_style_change
function or style component API on Druid API
Druid update:
druid:remove
remove instance and all instance children components. No more manual deleting child components (#41)Fix: Blocker component bug (blocker had very high priority, so it's block even button components, created after blocker)
Fix #58: Bug, when druid instance should be always named druid
(ex: self.druid = druid.new(self)
)
Fix #53: Bug with final Druid instance without any components
Druid 0.3.0:
Druid:final()
now is important function for correct working
Add swipe basic component
Add input basic component
on_input_wrong
will be called. By default it cause simple shake animationAdd two functions to basic component: increase_input_priority
and reset_input_priority
. It used to process component input first in current input stack (there is two input stacks now: INPUT and INPUT_HIGH). Example: on selecting input field, it increase input self priority until it be unselected
Add two new component interests: on_focus_gain
and on_focus_lost
Add global druid events:
druid.on_window_callback(event)
for on_focus_gain/lost correct workdruid.on_language_change()
(#38) for update all druid instances lang componentsdruid.on_layout_change()
(#37) for update all gui layouts (unimplemented now)Add button on_click_outside
event. You can subscribe on this event in button. Was needed for Input component (click outside to deselect input field)
Add start_pos field to button component
Changed input binding settings. Add esc, enter, text and marked_text. Backspace now is different from android back button event. Check the README setup section
Renamed on_change_language -> on_language_change component interest
Add several examples to druid-assets respository (see live example here): https://insality.github.io/druid-assets/)
Known issues:
Commit version before release of Defold forum.
First public release Repository now public