From dd2627c4d26b28a69d9d770bd6af486e79521e1e Mon Sep 17 00:00:00 2001 From: Insality Date: Sat, 18 Apr 2020 14:39:27 +0300 Subject: [PATCH] Update ldoc --- docs/index.html | 7 +- docs/modules/component.html | 39 ++- docs/modules/druid.back_handler.html | 3 +- docs/modules/druid.blocker.html | 3 +- docs/modules/druid.button.html | 33 +- docs/modules/druid.checkbox.html | 3 +- docs/modules/druid.checkbox_group.html | 3 +- docs/modules/druid.grid.html | 3 +- docs/modules/druid.helper.html | 3 +- docs/modules/druid.hover.html | 3 +- docs/modules/druid.html | 146 ++++++++- docs/modules/druid.input.html | 302 +++++++++++++++++- docs/modules/druid.lang_text.html | 3 +- docs/modules/druid.progress.html | 3 +- docs/modules/druid.radio_group.html | 3 +- docs/modules/druid.scroll.html | 3 +- docs/modules/druid.slider.html | 3 +- docs/modules/druid.swipe.html | 33 +- docs/modules/druid.text.html | 55 +++- docs/modules/druid.timer.html | 3 +- docs/modules/druid_event.html | 3 +- docs/modules/druid_instance.html | 80 ++++- docs/topics/01-components.md.html | 12 +- .../02-creating_custom_components.md.html | 22 +- docs/topics/03-styles.md.html | 11 +- docs/topics/04-druid_assets.md.html | 3 +- docs/topics/05-examples.md.html | 3 +- docs/topics/README.md.html | 30 +- docs/topics/changelog.md.html | 132 ++++++++ 29 files changed, 894 insertions(+), 56 deletions(-) create mode 100644 docs/topics/changelog.md.html diff --git a/docs/index.html b/docs/index.html index 639dc54..3ffa283 100644 --- a/docs/index.html +++ b/docs/index.html @@ -60,6 +60,7 @@
  • Styles
  • Druid assets
  • Examples
  • +
  • changelog
  • README
  • @@ -180,6 +181,10 @@ 05-examples.md + + changelog.md + + README.md @@ -190,7 +195,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-17 20:13:54 +Last updated 2020-04-18 14:39:17
    diff --git a/docs/modules/component.html b/docs/modules/component.html index 1748f3a..37fd89c 100644 --- a/docs/modules/component.html +++ b/docs/modules/component.html @@ -67,6 +67,7 @@
  • Styles
  • Druid assets
  • Examples
  • +
  • changelog
  • README
  • @@ -118,6 +119,14 @@ Get current component interests + increase_input_priority() + Increase input priority in current input stack + + + reset_input_priority() + Reset input priority in current input stack + + get_node(node_or_name) Get node for component by name. @@ -325,6 +334,34 @@ + +
    + + increase_input_priority() +
    +
    + Increase input priority in current input stack + + + + + + + +
    +
    + + reset_input_priority() +
    +
    + Reset input priority in current input stack + + + + + + +
    @@ -441,7 +478,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-17 20:13:54 +Last updated 2020-04-18 14:39:17
    diff --git a/docs/modules/druid.back_handler.html b/docs/modules/druid.back_handler.html index dae7f4a..0bc2cc0 100644 --- a/docs/modules/druid.back_handler.html +++ b/docs/modules/druid.back_handler.html @@ -68,6 +68,7 @@
  • Styles
  • Druid assets
  • Examples
  • +
  • changelog
  • README
  • @@ -216,7 +217,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-17 20:13:54 +Last updated 2020-04-18 14:39:17
    diff --git a/docs/modules/druid.blocker.html b/docs/modules/druid.blocker.html index 4f6e257..02feafd 100644 --- a/docs/modules/druid.blocker.html +++ b/docs/modules/druid.blocker.html @@ -68,6 +68,7 @@
  • Styles
  • Druid assets
  • Examples
  • +
  • changelog
  • README
  • @@ -235,7 +236,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-17 20:13:54 +Last updated 2020-04-18 14:39:17
    diff --git a/docs/modules/druid.button.html b/docs/modules/druid.button.html index 9865e31..b59dd1c 100644 --- a/docs/modules/druid.button.html +++ b/docs/modules/druid.button.html @@ -68,6 +68,7 @@
  • Styles
  • Druid assets
  • Examples
  • +
  • changelog
  • README
  • @@ -97,11 +98,11 @@ Return button enabled state - set_click_zone(zone) + set_click_zone(zone, Self) Strict button click area. - set_key_trigger(key) + set_key_trigger(key, Self) Set key-code to trigger this button @@ -210,7 +211,7 @@
    - set_click_zone(zone) + set_click_zone(zone, Self)
    Strict button click area. Useful for @@ -223,6 +224,10 @@ node Gui node +
  • Self + druid.button + instance to make chain calls +
  • @@ -232,7 +237,7 @@
    - set_key_trigger(key) + set_key_trigger(key, Self)
    Set key-code to trigger this button @@ -244,6 +249,10 @@ hash The action_id of the key +
  • Self + druid.button + instance to make chain calls +
  • @@ -305,6 +314,10 @@ druid_event (self, params, buttoninstance, time) On button hold before longclick callback +
  • on_click_outside + druid_event + (self, params, button_instance) On click outside of button +
  • @@ -335,6 +348,10 @@ vector3 Initial scale of anim_node +
  • start_pos + vector3 + Initial pos of anim_node +
  • pos vector3 Initial pos of anim_node @@ -384,12 +401,6 @@
  • on_set_enabled function (self, node, enabled_state) -
  • -
  • IS_HOVER - bool - - -
  • @@ -405,7 +416,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-17 20:13:54 +Last updated 2020-04-18 14:39:17
    diff --git a/docs/modules/druid.checkbox.html b/docs/modules/druid.checkbox.html index 7081605..1411d1c 100644 --- a/docs/modules/druid.checkbox.html +++ b/docs/modules/druid.checkbox.html @@ -68,6 +68,7 @@
  • Styles
  • Druid assets
  • Examples
  • +
  • changelog
  • README
  • @@ -278,7 +279,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-17 20:13:54 +Last updated 2020-04-18 14:39:17
    diff --git a/docs/modules/druid.checkbox_group.html b/docs/modules/druid.checkbox_group.html index df09ed2..0a7c625 100644 --- a/docs/modules/druid.checkbox_group.html +++ b/docs/modules/druid.checkbox_group.html @@ -68,6 +68,7 @@
  • Styles
  • Druid assets
  • Examples
  • +
  • changelog
  • README
  • @@ -240,7 +241,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-17 20:13:54 +Last updated 2020-04-18 14:39:17
    diff --git a/docs/modules/druid.grid.html b/docs/modules/druid.grid.html index f6c4c58..0a0ae13 100644 --- a/docs/modules/druid.grid.html +++ b/docs/modules/druid.grid.html @@ -68,6 +68,7 @@
  • Styles
  • Druid assets
  • Examples
  • +
  • changelog
  • README
  • @@ -371,7 +372,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-17 20:13:54 +Last updated 2020-04-18 14:39:17
    diff --git a/docs/modules/druid.helper.html b/docs/modules/druid.helper.html index f4c3af0..822ba15 100644 --- a/docs/modules/druid.helper.html +++ b/docs/modules/druid.helper.html @@ -67,6 +67,7 @@
  • Styles
  • Druid assets
  • Examples
  • +
  • changelog
  • README
  • @@ -237,7 +238,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-17 20:13:54 +Last updated 2020-04-18 14:39:17
    diff --git a/docs/modules/druid.hover.html b/docs/modules/druid.hover.html index 3135adf..5313e41 100644 --- a/docs/modules/druid.hover.html +++ b/docs/modules/druid.hover.html @@ -68,6 +68,7 @@
  • Styles
  • Druid assets
  • Examples
  • +
  • changelog
  • README
  • @@ -212,7 +213,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-17 20:13:54 +Last updated 2020-04-18 14:39:17
    diff --git a/docs/modules/druid.html b/docs/modules/druid.html index 076a530..021f3db 100644 --- a/docs/modules/druid.html +++ b/docs/modules/druid.html @@ -67,6 +67,7 @@
  • Styles
  • Druid assets
  • Examples
  • +
  • changelog
  • README
  • @@ -107,6 +108,30 @@ new(context[, style]) Create Druid instance. + + set_default_style(style) + Set new default style. + + + set_text_function(callback) + Set text function. + + + set_sound_function(callback) + Set sound function. + + + on_window_callback(event) + Callback on global window event. + + + on_layout_change() + Callback on global layout change event. + + + on_language_change() + Callback on global language change event. +
    @@ -174,6 +199,125 @@ +
    +
    + + set_default_style(style) +
    +
    + Set new default style. + + +

    Parameters:

    + + + + + + +
    +
    + + set_text_function(callback) +
    +
    + Set text function. + Druid locale component will call this function + to get translated text. After settextfuntion + all existing locale component will be updated + + +

    Parameters:

    + + + + + + +
    +
    + + set_sound_function(callback) +
    +
    + Set sound function. + Component will call this function to + play sound by sound_id + + +

    Parameters:

    + + + + + + +
    +
    + + on_window_callback(event) +
    +
    + Callback on global window event. + Used to trigger onfocuslost and onfocusgain + + +

    Parameters:

    + + + + + + +
    +
    + + on_layout_change() +
    +
    + Callback on global layout change event. + + + + + + + +
    +
    + + on_language_change() +
    +
    + Callback on global language change event. + Use to update all lang texts + + + + + + +
    @@ -182,7 +326,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-17 20:13:54 +Last updated 2020-04-18 14:39:17
    diff --git a/docs/modules/druid.input.html b/docs/modules/druid.input.html index e603bae..8f6b84b 100644 --- a/docs/modules/druid.input.html +++ b/docs/modules/druid.input.html @@ -30,6 +30,11 @@
  • Index
  • +

    Contents

    +

    Modules

    @@ -63,6 +68,7 @@
  • Styles
  • Druid assets
  • Examples
  • +
  • changelog
  • README
  • @@ -72,22 +78,312 @@

    Module druid.input

    Druid input text component.

    -

    Carry on user text input - UNIMPLEMENTED

    +

    Carry on user text input

    +

    Info:

    + +

    Functions

    + + + + + + + + + + + + + + + + + + + + + +
    set_text(input_text)Set text for input field
    get_text()Return current input field text
    set_max_length(max_length, Self)Set maximum length for input field.
    set_allowerd_characters(characters, Self)Set allowed charaters for input field.
    reset_changes()Reset current input selection and return previous value
    +

    Tables

    + + + + + + + + + + + + + +
    EventsComponent events
    FieldsComponent fields
    StyleComponent style params


    +

    Functions

    + +
    +
    + + set_text(input_text) +
    +
    + Set text for input field + + +

    Parameters:

    +
      +
    • input_text + string + The string to apply for input field +
    • +
    + + + + + +
    +
    + + get_text() +
    +
    + Return current input field text + + + +

    Returns:

    +
      + + string + The current input field text +
    + + + + +
    +
    + + set_max_length(max_length, Self) +
    +
    + Set maximum length for input field. + Pass nil to make input field unliminted (by default) + + +

    Parameters:

    +
      +
    • max_length + number + Maximum length for input text field +
    • +
    • Self + druid.input + instance to make chain calls +
    • +
    + + + + + +
    +
    + + set_allowerd_characters(characters, Self) +
    +
    + Set allowed charaters for input field. + See: https://defold.com/ref/stable/string/ + ex: [%a%d] for alpha and numeric + + +

    Parameters:

    +
      +
    • characters + string + Regulax exp. for validate user input +
    • +
    • Self + druid.input + instance to make chain calls +
    • +
    + + + + + +
    +
    + + reset_changes() +
    +
    + Reset current input selection and return previous value + + + + + + + +
    +
    +

    Tables

    + +
    +
    + + Events +
    +
    + Component events + + +

    Fields:

    +
      +
    • on_input_select + druid_event + (self, button_node) On input field select callback +
    • +
    • on_input_unselect + druid_event + (self, button_node) On input field unselect callback +
    • +
    • on_input_text + druid_event + (self, input_text) On input field text change callback +
    • +
    • on_input_empty + druid_event + (self, input_text) On input field text change to empty string callback +
    • +
    • on_input_full + druid_event + (self, input_text) On input field text change to max length string callback +
    • +
    • on_input_wrong + druid_event + (self, params, button_instance) On trying user input with not allowed character callback +
    • +
    + + + + + +
    +
    + + Fields +
    +
    + Component fields + + +

    Fields:

    +
      +
    • text + druid.text + Text component +
    • +
    • button + druid.button + Button component +
    • +
    • is_selected + bool + Is current input selected now +
    • +
    • is_empty + bool + Is current input is empty now +
    • +
    • max_length + number + Max length for input text + (optional) +
    • +
    • allowerd_characters + string + Pattern matching for user input + (optional) +
    • +
    • keyboard_type + number + Gui keyboard type for input field +
    • +
    + + + + + +
    +
    + + Style +
    +
    + Component style params + + +

    Fields:

    +
      +
    • IS_LONGTAP_ERASE + bool + Is long tap will erase current input data +
    • +
    • BUTTON_SELECT_INCREASE + number + Button scale multiplier on selecting input field +
    • +
    • MASK_DEFAULT_CHAR + string + Default character mask for password input +
    • +
    • on_select + function + (self, button_node) Callback on input field selecting +
    • +
    • on_unselect + function + (self, button_node) Callback on input field unselecting +
    • +
    • on_input_wrong + function + (self, button_node) Callback on wrong user input +
    • +
    • button + table + Custom button style for input node +
    • +
    + + + + + +
    +
    generated by LDoc 1.4.6 -Last updated 2020-04-17 20:13:54 +Last updated 2020-04-18 14:39:17
    diff --git a/docs/modules/druid.lang_text.html b/docs/modules/druid.lang_text.html index 31b46a3..3ffaa4c 100644 --- a/docs/modules/druid.lang_text.html +++ b/docs/modules/druid.lang_text.html @@ -68,6 +68,7 @@
  • Styles
  • Druid assets
  • Examples
  • +
  • changelog
  • README
  • @@ -241,7 +242,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-17 20:13:54 +Last updated 2020-04-18 14:39:17
    diff --git a/docs/modules/druid.progress.html b/docs/modules/druid.progress.html index f6d2790..2181941 100644 --- a/docs/modules/druid.progress.html +++ b/docs/modules/druid.progress.html @@ -68,6 +68,7 @@
  • Styles
  • Druid assets
  • Examples
  • +
  • changelog
  • README
  • @@ -380,7 +381,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-17 20:13:54 +Last updated 2020-04-18 14:39:17
    diff --git a/docs/modules/druid.radio_group.html b/docs/modules/druid.radio_group.html index 91cb3f1..e2de393 100644 --- a/docs/modules/druid.radio_group.html +++ b/docs/modules/druid.radio_group.html @@ -68,6 +68,7 @@
  • Styles
  • Druid assets
  • Examples
  • +
  • changelog
  • README
  • @@ -240,7 +241,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-17 20:13:54 +Last updated 2020-04-18 14:39:17
    diff --git a/docs/modules/druid.scroll.html b/docs/modules/druid.scroll.html index c35e602..a4b9263 100644 --- a/docs/modules/druid.scroll.html +++ b/docs/modules/druid.scroll.html @@ -68,6 +68,7 @@
  • Styles
  • Druid assets
  • Examples
  • +
  • changelog
  • README
  • @@ -508,7 +509,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-17 20:13:54 +Last updated 2020-04-18 14:39:17
    diff --git a/docs/modules/druid.slider.html b/docs/modules/druid.slider.html index 9ffc418..2c42e44 100644 --- a/docs/modules/druid.slider.html +++ b/docs/modules/druid.slider.html @@ -68,6 +68,7 @@
  • Styles
  • Druid assets
  • Examples
  • +
  • changelog
  • README
  • @@ -279,7 +280,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-17 20:13:54 +Last updated 2020-04-18 14:39:17
    diff --git a/docs/modules/druid.swipe.html b/docs/modules/druid.swipe.html index 212bbc9..15505fb 100644 --- a/docs/modules/druid.swipe.html +++ b/docs/modules/druid.swipe.html @@ -68,6 +68,7 @@
  • Styles
  • Druid assets
  • Examples
  • +
  • changelog
  • README
  • @@ -94,6 +95,10 @@

    Tables

    + + + + @@ -162,6 +167,32 @@

    Tables

    +
    + + Fields +
    +
    + Components fields + + +

    Fields:

    +
      +
    • node + node + Swipe node +
    • +
    • click_zone + node + Restriction zone + (optional) +
    • +
    + + + + + +
    Events @@ -219,7 +250,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-17 20:13:54 +Last updated 2020-04-18 14:39:17
    diff --git a/docs/modules/druid.text.html b/docs/modules/druid.text.html index 74b2de3..15e8ccc 100644 --- a/docs/modules/druid.text.html +++ b/docs/modules/druid.text.html @@ -68,6 +68,7 @@
  • Styles
  • Druid assets
  • Examples
  • +
  • changelog
  • README
  • @@ -88,6 +89,10 @@
    + + + + @@ -107,6 +112,10 @@ + + + +
    FieldsComponents fields
    Events Component events Component init function
    get_text_width([text])Calculate text width with font with respect to trailing space
    set_to(set_to) Set text to text field
    set_pivot(pivot) Set text pivot.
    is_multiline()Return true, if text with line break

    Tables

    @@ -157,6 +166,30 @@ + +
    + + get_text_width([text]) +
    +
    + Calculate text width with font with respect to trailing space + + +

    Parameters:

    + + + + + +
    @@ -263,6 +296,26 @@ + +
    + + is_multiline() +
    +
    + Return true, if text with line break + + + +

    Returns:

    +
      + + boolean + Is text node with line break +
    + + + +

    Tables

    @@ -353,7 +406,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-17 20:13:54 +Last updated 2020-04-18 14:39:17
    diff --git a/docs/modules/druid.timer.html b/docs/modules/druid.timer.html index 97fd71e..3bf0f9d 100644 --- a/docs/modules/druid.timer.html +++ b/docs/modules/druid.timer.html @@ -68,6 +68,7 @@
  • Styles
  • Druid assets
  • Examples
  • +
  • changelog
  • README
  • @@ -294,7 +295,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-17 20:13:54 +Last updated 2020-04-18 14:39:17
    diff --git a/docs/modules/druid_event.html b/docs/modules/druid_event.html index 81ef363..df96371 100644 --- a/docs/modules/druid_event.html +++ b/docs/modules/druid_event.html @@ -67,6 +67,7 @@
  • Styles
  • Druid assets
  • Examples
  • +
  • changelog
  • README
  • @@ -240,7 +241,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-17 20:13:54 +Last updated 2020-04-18 14:39:17
    diff --git a/docs/modules/druid_instance.html b/docs/modules/druid_instance.html index 5a9f0fb..0a4c8b4 100644 --- a/docs/modules/druid_instance.html +++ b/docs/modules/druid_instance.html @@ -67,6 +67,7 @@
  • Styles
  • Druid assets
  • Examples
  • +
  • changelog
  • README
  • @@ -129,6 +130,22 @@ + + + + + + + + + + + + + + + + @@ -362,6 +379,67 @@ + +
    + + druid:on_focus_lost() +
    +
    + Druid on focus lost interest function. + This one called by onwindowcallback by global window listener + + + + + + + +
    +
    + + druid:on_focus_gained() +
    +
    + Druid on focus gained interest function. + This one called by onwindowcallback by global window listener + + + + + + + +
    +
    + + druid:on_layout_change() +
    +
    + Druid on layout change function. + Called on update gui layout + + + + + + + +
    +
    + + druid.on_language_change() +
    +
    + Druid on language change. + This one called by global gruid.onlanguagechange, but can be + call manualy to update all translations + + + + + + +
    @@ -802,7 +880,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-17 20:13:54 +Last updated 2020-04-18 14:39:17
    diff --git a/docs/topics/01-components.md.html b/docs/topics/01-components.md.html index ac1bf54..9b1000c 100644 --- a/docs/topics/01-components.md.html +++ b/docs/topics/01-components.md.html @@ -58,6 +58,7 @@
  • Styles
  • Druid assets
  • Examples
  • +
  • changelog
  • README
  • Modules

    @@ -279,8 +280,17 @@ Key is value from druid const: const.SIDE.X (or just "x") or const.SIDE.Y (or ju

    Basic Druid text input component (unimplemented)

    Setup

    +

    Create input component with druid: input = druid:new_input(button_node_name, text_node_name, keyboard_type)

    Notes

    +

    - Input component handle user text input. Input contains from button and text components. Button needed for selecting/unselecting input field +- Long click on input field for clear and select input field (clearing can be disable via styles) +- Click outside of button to unselect input field +- On focus lost (game minimized) input field will be unselected +- You can setup max length of the text +- You can setup allowed characters. On add not allowed characters on_input_wrong will be called. By default it cause simple shake animation +- The keyboard for input will not show on mobile HTML5. So input field in mobile HTML5 is not working now +- To make work different keyboard type, make sure value in game.project Android:InputMethod set to HidderInputField (https://defold.com/manuals/project-settings/#input-method)

    @@ -402,7 +412,7 @@ Key is value from druid const: const.SIDE.X (or just "x") or const.SIDE.Y (or ju
    generated by LDoc 1.4.6 -Last updated 2020-04-17 20:13:54 +Last updated 2020-04-18 14:39:17
    diff --git a/docs/topics/02-creating_custom_components.md.html b/docs/topics/02-creating_custom_components.md.html index 478ff31..0251ceb 100644 --- a/docs/topics/02-creating_custom_components.md.html +++ b/docs/topics/02-creating_custom_components.md.html @@ -46,6 +46,7 @@
  • Styles
  • Druid assets
  • Examples
  • +
  • changelog
  • README
  • Modules

    @@ -115,8 +116,8 @@ function M.on_message(self, message_id, message, sender) end --- Call only if component with ON_CHANGE_LANGUAGE interest -function M.on_change_language(self) +-- Call only if component with ON_LANGUAGE_CHANGE interest +function M.on_language_change(self) end -- Call only if component with ON_LAYOUT_CHANGE interest @@ -128,6 +129,14 @@ function M.on_input_interrupt(self) end +-- Call, if game lost focus. Need ON_FOCUS_LOST intereset +function M.on_focus_lost(self) +end + +-- Call, if game gained focus. Need ON_FOCUS_GAINED intereset +function M.on_focus_gained(self) +end + -- Call on component remove or on druid:final function M.on_remove(self) end @@ -178,11 +187,12 @@ There is next interests in druid:
  • ON_UPDATE - component will be updated from update

  • ONINPUTHIGH - component will receive input from oninput, before other components with ONINPUT

  • ON_INPUT - component will receive input from oninput, after other components with ONINPUT_HIGH

  • -
  • ONCHANGELANGUAGE - will call onchangelanguage function on language change trigger

  • -
  • ONLAYOUTCHANGED will call onlayoutchange function on layout change trigger

  • +
  • ONLANGUAGECHANGE - will call onlanguagechange function on language change trigger

  • +
  • ONLAYOUTCHANGE will call onlayoutchange function on layout change trigger

  • +
  • ONFOCUSLOST will call onfocustlost function in on focus lost event. You need to pass window_callback to global druid:on_window_callback

  • +
  • ONFOCUSGAINED will call onfocustgained function in on focus gained event. You need to pass window_callback to global druid:on_window_callback

  • -

    Best practice on custom components

    On each component recommended describe component scheme in next way:

    @@ -234,7 +244,7 @@ There is next interests in druid:
    generated by LDoc 1.4.6 -Last updated 2020-04-17 20:13:54 +Last updated 2020-04-18 14:39:17
    diff --git a/docs/topics/03-styles.md.html b/docs/topics/03-styles.md.html index b3e69bd..8d2a391 100644 --- a/docs/topics/03-styles.md.html +++ b/docs/topics/03-styles.md.html @@ -34,7 +34,6 @@ @@ -45,6 +44,7 @@
  • Styles
  • Druid assets
  • Examples
  • +
  • changelog
  • README
  • Modules

    @@ -89,7 +89,7 @@

    Usage

    -

    Setup default druid style for all druid instances via druid.set_default_style

    +

    Setup default druid style for all druid instances via druid.set_default_style

     local druid = require("druid.druid")
    @@ -129,17 +129,12 @@
     
    -

    -

    Create custom components

    -

    Styles is just lua table, so it can be described in just one single file -TODO

    -
    generated by LDoc 1.4.6 -Last updated 2020-04-17 20:13:54 +Last updated 2020-04-18 14:39:17
    diff --git a/docs/topics/04-druid_assets.md.html b/docs/topics/04-druid_assets.md.html index f1c4cd7..227822d 100644 --- a/docs/topics/04-druid_assets.md.html +++ b/docs/topics/04-druid_assets.md.html @@ -43,6 +43,7 @@
  • Styles
  • Druid assets
  • Examples
  • +
  • changelog
  • README
  • Modules

    @@ -90,7 +91,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-17 20:13:54 +Last updated 2020-04-18 14:39:17
    diff --git a/docs/topics/05-examples.md.html b/docs/topics/05-examples.md.html index 12b20c5..28a3d17 100644 --- a/docs/topics/05-examples.md.html +++ b/docs/topics/05-examples.md.html @@ -43,6 +43,7 @@
  • Styles
  • Druid assets
  • Examples
  • +
  • changelog
  • README
  • Modules

    @@ -88,7 +89,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-17 20:13:54 +Last updated 2020-04-18 14:39:17
    diff --git a/docs/topics/README.md.html b/docs/topics/README.md.html index d993a24..f57e3ae 100644 --- a/docs/topics/README.md.html +++ b/docs/topics/README.md.html @@ -53,6 +53,7 @@
  • Styles
  • Druid assets
  • Examples
  • +
  • changelog
  • README
  • Modules

    @@ -110,11 +111,14 @@ -

    +

    +

    Input capturing [optional]

    @@ -144,6 +148,18 @@ -- Used for change default druid style druid.set_default_style(your_style) + +-- Call this function on language changing in the game, +-- to retranslate all lang_text components: +druid.on_languge_change() + +-- Call this function on layout changing in the game, +-- to reapply layouts +druid.on_layout_change() + +-- Call this function inside window.set_listener +-- to catch game focus lost/gained callbacks: +druid.on_window_callback(event) @@ -192,11 +208,15 @@ print("Button was clicked!") end -local function init(self) +function init(self) self.druid = druid.new(self) self.druid:new_button("button_node_name", button_callback) end +function final(self) + self.druid:final() +end + function on_input(self, action_id, action) return self.druid:on_input(action_id, action) end @@ -316,7 +336,7 @@ https://insality.github.io/druid/

    generated by LDoc 1.4.6 -Last updated 2020-04-17 20:13:54 +Last updated 2020-04-18 14:39:17
    diff --git a/docs/topics/changelog.md.html b/docs/topics/changelog.md.html new file mode 100644 index 0000000..9eba3e8 --- /dev/null +++ b/docs/topics/changelog.md.html @@ -0,0 +1,132 @@ + + + + + Defold Druid UI Library + + + + +
    + +
    + +
    +
    +
    + + +
    + + + + + + +
    + + +

    Druid 0.3.0:

    + +
      +
    • Druid:final now is important function for correct working

    • +
    • Add swipe basic component

      + +
      +- Swipe component handle simple swipe gestures on node. It has single callback with direction on swipe. You can adjust a several parameters of swipe in druid style.
      +- Swipe can be triggered on action.released or while user is make swiping (in process)
      +- Add swipe example at main Druid example. Try swipe left/right to switch example pages.
      +
      +
    • +
    • Add input basic component

      + +
      +- Input component handle user text input. Input contains from button and text components. Button needed for selecting/unselecting input field
      +- Long click on input field for clear and select input field (clearing can be disable via styles)
      +- Click outside of button to unselect input field
      +- On focus lost (game minimized) input field will be unselected
      +- You can setup max length of the text
      +- You can setup allowed characters. On add not allowed characters on_input_wrong will be called. By default it cause simple shake animation
      +- The keyboard for input will not show on mobile HTML5. So input field in mobile HTML5 is not working now
      +- To make work different keyboard type, make sure value in game.project Android:InputMethod set to HidderInputField (https://defold.com/manuals/project-settings/#input-method)
      +
      +
    • +
    • Add button onclickoutside event. You can subscribe on this event in button. Was needed for Input component (click outside to deselect input field).

    • +
    • Add start_pos to button component

    • +
    • Changed input binding settings. Add backspace, enter, text and marked_text. Backspace now is different from android back button.

    • +
    • Renamed onchangelanguage -> onlanguagechange component interest

    • +
    • Add basic component two functions: increase_input_priority and reset_input_priority. It used to process component input first in current input stack (there is two input stacks: 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:

      + +
      +- on_window_callback: call druid.on_window_callback(event) for on_focus_gain/lost correct work
      +- on_language_change: call druid.on_language_change() (#38) for update all druid instances lang components
      +- on_layout_change: call druid.on_layout_change() (#37) for update all gui layouts (unimplemented now)
      +
      +
    • +
    • Add several examples to druid-assets respository

    • +
    • Known issues:

      + +
      +- Adjusting text size by height works wrong. Adjusting single line texting works fine
      +
      +
    • +
    + + +
    +
    +
    +generated by LDoc 1.4.6 +Last updated 2020-04-18 14:39:17 +
    +
    + +
    Druid on_message function
    druid:on_focus_lost()Druid on focus lost interest function.
    druid:on_focus_gained()Druid on focus gained interest function.
    druid:on_layout_change()Druid on layout change function.
    druid.on_language_change()Druid on language change.
    druid:new_button(...) Create button basic component