diff --git a/docs/index.html b/docs/index.html index 87c1f53..639dc54 100644 --- a/docs/index.html +++ b/docs/index.html @@ -44,6 +44,7 @@
  • druid.radio_group
  • druid.scroll
  • druid.slider
  • +
  • druid.swipe
  • druid.text
  • druid.timer
  • component
  • @@ -124,6 +125,10 @@ druid.slider Druid slider component + + druid.swipe + Component to handle swipe gestures on node. + druid.text Component to handle all GUI texts. @@ -185,7 +190,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-13 19:36:00 +Last updated 2020-04-17 20:13:54
    diff --git a/docs/modules/component.html b/docs/modules/component.html index 4e3c79a..1748f3a 100644 --- a/docs/modules/component.html +++ b/docs/modules/component.html @@ -51,6 +51,7 @@
  • druid.radio_group
  • druid.scroll
  • druid.slider
  • +
  • druid.swipe
  • druid.text
  • druid.timer
  • component
  • @@ -440,7 +441,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-13 19:36:00 +Last updated 2020-04-17 20:13:54
    diff --git a/docs/modules/druid.back_handler.html b/docs/modules/druid.back_handler.html index 31faacf..dae7f4a 100644 --- a/docs/modules/druid.back_handler.html +++ b/docs/modules/druid.back_handler.html @@ -52,6 +52,7 @@
  • druid.radio_group
  • druid.scroll
  • druid.slider
  • +
  • druid.swipe
  • druid.text
  • druid.timer
  • component
  • @@ -215,7 +216,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-13 19:36:00 +Last updated 2020-04-17 20:13:54
    diff --git a/docs/modules/druid.blocker.html b/docs/modules/druid.blocker.html index 792519a..4f6e257 100644 --- a/docs/modules/druid.blocker.html +++ b/docs/modules/druid.blocker.html @@ -52,6 +52,7 @@
  • druid.radio_group
  • druid.scroll
  • druid.slider
  • +
  • druid.swipe
  • druid.text
  • druid.timer
  • component
  • @@ -234,7 +235,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-13 19:36:00 +Last updated 2020-04-17 20:13:54
    diff --git a/docs/modules/druid.button.html b/docs/modules/druid.button.html index 956c98c..9865e31 100644 --- a/docs/modules/druid.button.html +++ b/docs/modules/druid.button.html @@ -52,6 +52,7 @@
  • druid.radio_group
  • druid.scroll
  • druid.slider
  • +
  • druid.swipe
  • druid.text
  • druid.timer
  • component
  • @@ -404,7 +405,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-13 19:36:00 +Last updated 2020-04-17 20:13:54
    diff --git a/docs/modules/druid.checkbox.html b/docs/modules/druid.checkbox.html index 013ee8a..7081605 100644 --- a/docs/modules/druid.checkbox.html +++ b/docs/modules/druid.checkbox.html @@ -52,6 +52,7 @@
  • druid.radio_group
  • druid.scroll
  • druid.slider
  • +
  • druid.swipe
  • druid.text
  • druid.timer
  • component
  • @@ -277,7 +278,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-13 19:36:00 +Last updated 2020-04-17 20:13:54
    diff --git a/docs/modules/druid.checkbox_group.html b/docs/modules/druid.checkbox_group.html index bf11124..df09ed2 100644 --- a/docs/modules/druid.checkbox_group.html +++ b/docs/modules/druid.checkbox_group.html @@ -52,6 +52,7 @@
  • druid.radio_group
  • druid.scroll
  • druid.slider
  • +
  • druid.swipe
  • druid.text
  • druid.timer
  • component
  • @@ -239,7 +240,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-13 19:36:00 +Last updated 2020-04-17 20:13:54
    diff --git a/docs/modules/druid.grid.html b/docs/modules/druid.grid.html index 9bec5e2..f6c4c58 100644 --- a/docs/modules/druid.grid.html +++ b/docs/modules/druid.grid.html @@ -52,6 +52,7 @@
  • druid.radio_group
  • druid.scroll
  • druid.slider
  • +
  • druid.swipe
  • druid.text
  • druid.timer
  • component
  • @@ -370,7 +371,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-13 19:36:00 +Last updated 2020-04-17 20:13:54
    diff --git a/docs/modules/druid.helper.html b/docs/modules/druid.helper.html index 9ddb960..f4c3af0 100644 --- a/docs/modules/druid.helper.html +++ b/docs/modules/druid.helper.html @@ -51,6 +51,7 @@
  • druid.radio_group
  • druid.scroll
  • druid.slider
  • +
  • druid.swipe
  • druid.text
  • druid.timer
  • component
  • @@ -236,7 +237,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-13 19:36:00 +Last updated 2020-04-17 20:13:54
    diff --git a/docs/modules/druid.hover.html b/docs/modules/druid.hover.html index f2b29ac..3135adf 100644 --- a/docs/modules/druid.hover.html +++ b/docs/modules/druid.hover.html @@ -52,6 +52,7 @@
  • druid.radio_group
  • druid.scroll
  • druid.slider
  • +
  • druid.swipe
  • druid.text
  • druid.timer
  • component
  • @@ -93,7 +94,7 @@ set_click_zone(zone) - Strict button click area. + Strict hover click area.

    Tables

    @@ -162,7 +163,7 @@ set_click_zone(zone)
    - Strict button click area. Useful for + Strict hover click area. Useful for no click events outside stencil node @@ -211,7 +212,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-13 19:36:00 +Last updated 2020-04-17 20:13:54
    diff --git a/docs/modules/druid.html b/docs/modules/druid.html index 3bb74e7..076a530 100644 --- a/docs/modules/druid.html +++ b/docs/modules/druid.html @@ -51,6 +51,7 @@
  • druid.radio_group
  • druid.scroll
  • druid.slider
  • +
  • druid.swipe
  • druid.text
  • druid.timer
  • component
  • @@ -181,7 +182,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-13 19:36:00 +Last updated 2020-04-17 20:13:54
    diff --git a/docs/modules/druid.input.html b/docs/modules/druid.input.html index 0334fd1..e603bae 100644 --- a/docs/modules/druid.input.html +++ b/docs/modules/druid.input.html @@ -47,6 +47,7 @@
  • druid.radio_group
  • druid.scroll
  • druid.slider
  • +
  • druid.swipe
  • druid.text
  • druid.timer
  • component
  • @@ -86,7 +87,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-13 19:36:00 +Last updated 2020-04-17 20:13:54
    diff --git a/docs/modules/druid.lang_text.html b/docs/modules/druid.lang_text.html index ba2169c..31b46a3 100644 --- a/docs/modules/druid.lang_text.html +++ b/docs/modules/druid.lang_text.html @@ -52,6 +52,7 @@
  • druid.radio_group
  • druid.scroll
  • druid.slider
  • +
  • druid.swipe
  • druid.text
  • druid.timer
  • component
  • @@ -240,7 +241,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-13 19:36:00 +Last updated 2020-04-17 20:13:54
    diff --git a/docs/modules/druid.progress.html b/docs/modules/druid.progress.html index 841692c..f6d2790 100644 --- a/docs/modules/druid.progress.html +++ b/docs/modules/druid.progress.html @@ -52,6 +52,7 @@
  • druid.radio_group
  • druid.scroll
  • druid.slider
  • +
  • druid.swipe
  • druid.text
  • druid.timer
  • component
  • @@ -379,7 +380,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-13 19:36:00 +Last updated 2020-04-17 20:13:54
    diff --git a/docs/modules/druid.radio_group.html b/docs/modules/druid.radio_group.html index 6fb9890..91cb3f1 100644 --- a/docs/modules/druid.radio_group.html +++ b/docs/modules/druid.radio_group.html @@ -52,6 +52,7 @@
  • druid.radio_group
  • druid.scroll
  • druid.slider
  • +
  • druid.swipe
  • druid.text
  • druid.timer
  • component
  • @@ -239,7 +240,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-13 19:36:00 +Last updated 2020-04-17 20:13:54
    diff --git a/docs/modules/druid.scroll.html b/docs/modules/druid.scroll.html index 0b34dc6..c35e602 100644 --- a/docs/modules/druid.scroll.html +++ b/docs/modules/druid.scroll.html @@ -52,6 +52,7 @@
  • druid.radio_group
  • druid.scroll
  • druid.slider
  • +
  • druid.swipe
  • druid.text
  • druid.timer
  • component
  • @@ -507,7 +508,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-13 19:36:00 +Last updated 2020-04-17 20:13:54
    diff --git a/docs/modules/druid.slider.html b/docs/modules/druid.slider.html index 077bdb9..9ffc418 100644 --- a/docs/modules/druid.slider.html +++ b/docs/modules/druid.slider.html @@ -52,6 +52,7 @@
  • druid.radio_group
  • druid.scroll
  • druid.slider
  • +
  • druid.swipe
  • druid.text
  • druid.timer
  • component
  • @@ -278,7 +279,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-13 19:36:00 +Last updated 2020-04-17 20:13:54
    diff --git a/docs/modules/druid.swipe.html b/docs/modules/druid.swipe.html new file mode 100644 index 0000000..212bbc9 --- /dev/null +++ b/docs/modules/druid.swipe.html @@ -0,0 +1,226 @@ + + + + + Defold Druid UI Library + + + + +
    + +
    + +
    +
    +
    + + +
    + + + + + + +
    + +

    Module druid.swipe

    +

    Component to handle swipe gestures on node.

    +

    Swipe will be triggered, if swipe was started and + ended on one node

    + + +

    Functions

    + + + + + + + + + +
    init(node, on_swipe_callback)Component init function
    set_click_zone(zone)Strict swipe click area.
    +

    Tables

    + + + + + + + + + +
    EventsComponent events
    StyleComponent style params
    + +
    +
    + + +

    Functions

    + +
    +
    + + init(node, on_swipe_callback) +
    +
    + Component init function + + +

    Parameters:

    +
      +
    • node + node + Gui node +
    • +
    • on_swipe_callback + function + Swipe callback for onswipeend event +
    • +
    + + + + + +
    +
    + + set_click_zone(zone) +
    +
    + Strict swipe click area. Useful for + restrict events outside stencil node + + +

    Parameters:

    +
      +
    • zone + node + Gui node +
    • +
    + + + + + +
    +
    +

    Tables

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

    Fields:

    +
      +
    • on_swipe + druid_event + Trigger on swipe event +
    • +
    + + + + + +
    +
    + + Style +
    +
    + Component style params + + +

    Fields:

    +
      +
    • SWIPE_TIME + number + Maximum time for swipe trigger +
    • +
    • SWIPE_THRESHOLD + number + Minimum distance for swipe trigger +
    • +
    • SWIPE_TRIGGER_ON_MOVE + bool + If true, trigger on swipe moving, not only release action +
    • +
    + + + + + +
    +
    + + +
    +
    +
    +generated by LDoc 1.4.6 +Last updated 2020-04-17 20:13:54 +
    +
    + + diff --git a/docs/modules/druid.text.html b/docs/modules/druid.text.html index 32ed971..74b2de3 100644 --- a/docs/modules/druid.text.html +++ b/docs/modules/druid.text.html @@ -52,6 +52,7 @@
  • druid.radio_group
  • druid.scroll
  • druid.slider
  • +
  • druid.swipe
  • druid.text
  • druid.timer
  • component
  • @@ -352,7 +353,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-13 19:36:00 +Last updated 2020-04-17 20:13:54
    diff --git a/docs/modules/druid.timer.html b/docs/modules/druid.timer.html index 1c73f4b..97fd71e 100644 --- a/docs/modules/druid.timer.html +++ b/docs/modules/druid.timer.html @@ -52,6 +52,7 @@
  • druid.radio_group
  • druid.scroll
  • druid.slider
  • +
  • druid.swipe
  • druid.text
  • druid.timer
  • component
  • @@ -293,7 +294,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-13 19:36:00 +Last updated 2020-04-17 20:13:54
    diff --git a/docs/modules/druid_event.html b/docs/modules/druid_event.html index 25f3c52..81ef363 100644 --- a/docs/modules/druid_event.html +++ b/docs/modules/druid_event.html @@ -51,6 +51,7 @@
  • druid.radio_group
  • druid.scroll
  • druid.slider
  • +
  • druid.swipe
  • druid.text
  • druid.timer
  • component
  • @@ -239,7 +240,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-13 19:36:00 +Last updated 2020-04-17 20:13:54
    diff --git a/docs/modules/druid_instance.html b/docs/modules/druid_instance.html index d08a246..5a9f0fb 100644 --- a/docs/modules/druid_instance.html +++ b/docs/modules/druid_instance.html @@ -51,6 +51,7 @@
  • druid.radio_group
  • druid.scroll
  • druid.slider
  • +
  • druid.swipe
  • druid.text
  • druid.timer
  • component
  • @@ -93,6 +94,7 @@
  • druid.checkbox
  • druid.checkbox_group
  • druid.radio_group
  • +
  • druid.swipe
  • @@ -186,6 +188,10 @@ druid:new_radio_group(...) Create radio_group basic component + + druid:new_swipe(...) + Create swipe basic component +
    @@ -761,6 +767,33 @@ +
    +
    + + druid:new_swipe(...) +
    +
    + Create swipe basic component + + +

    Parameters:

    + + +

    Returns:

    +
      + + Component + swipe component +
    + + + +
    @@ -769,7 +802,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-13 19:36:00 +Last updated 2020-04-17 20:13:54
    diff --git a/docs/topics/01-components.md.html b/docs/topics/01-components.md.html index 3fdaf17..ac1bf54 100644 --- a/docs/topics/01-components.md.html +++ b/docs/topics/01-components.md.html @@ -47,6 +47,7 @@
  • Timer
  • Grid
  • Hover
  • +
  • Swipe
  • @@ -74,6 +75,7 @@
  • druid.radio_group
  • druid.scroll
  • druid.slider
  • +
  • druid.swipe
  • druid.text
  • druid.timer
  • component
  • @@ -362,19 +364,45 @@ Key is value from druid const: const.SIDE.X (or just "x") or const.SIDE.Y (or ju

    Hover API here

    Overview

    -

    System Druid component, handle hover node state

    +

    System Druid component, handle hover node state.

    Setup

    -

    Create grid component with druid: hover = druid:new_hover(node, callback)

    +

    Create hover component with druid: hover = druid:new_hover(node, callback)

    Notes

    +

    +

    Swipe

    +

    Swipe API here

    + +

    Overview

    +

    System Druid component, handle swipe actions on node

    + +

    Setup

    +

    Create hover component with druid: hover = druid:new_swipe(node, swipe_callback)

    + +

    Notes

    +

    - Swipe callback have next params: (self, swipe_side, distance, time)

    + +
    +- **self** - Druid self context
    +- **swipe_side**: *string* - values from ["up", "down", "left", "right"]
    +- **distance**: *number* - in pixels, distance of swipe
    +- **time**: *number* - in seconds, time of swiping
    +
    + +

    - Swipe trigger only, if all input actions was on swipe node. If action will be outside of node, swipe status will be reseted +- In swipe style table you can adjust minimal distance and maximum time to trigger swipe +- In swipe style table you can toggle type of swipe triggering. if SWIPETRIGGERON_MOVE setup to true - swipe will trigger as swipe can be triggered. If setup to false - swipe will trigger only on released action +- If you have stencil on swipe node and you don't want trigger it outside of stencil node, you can use swipe:set_click_zone to restrict swipe zone

    + +
    generated by LDoc 1.4.6 -Last updated 2020-04-13 19:36:00 +Last updated 2020-04-17 20:13:54
    diff --git a/docs/topics/02-creating_custom_components.md.html b/docs/topics/02-creating_custom_components.md.html index 6880c7f..478ff31 100644 --- a/docs/topics/02-creating_custom_components.md.html +++ b/docs/topics/02-creating_custom_components.md.html @@ -63,6 +63,7 @@
  • druid.radio_group
  • druid.scroll
  • druid.slider
  • +
  • druid.swipe
  • druid.text
  • druid.timer
  • component
  • @@ -233,7 +234,7 @@ There is next interests in druid:
    generated by LDoc 1.4.6 -Last updated 2020-04-13 19:36:00 +Last updated 2020-04-17 20:13:54
    diff --git a/docs/topics/03-styles.md.html b/docs/topics/03-styles.md.html index d632be3..b3e69bd 100644 --- a/docs/topics/03-styles.md.html +++ b/docs/topics/03-styles.md.html @@ -62,6 +62,7 @@
  • druid.radio_group
  • druid.scroll
  • druid.slider
  • +
  • druid.swipe
  • druid.text
  • druid.timer
  • component
  • @@ -138,7 +139,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-13 19:36:00 +Last updated 2020-04-17 20:13:54
    diff --git a/docs/topics/04-druid_assets.md.html b/docs/topics/04-druid_assets.md.html index 3d87441..f1c4cd7 100644 --- a/docs/topics/04-druid_assets.md.html +++ b/docs/topics/04-druid_assets.md.html @@ -60,6 +60,7 @@
  • druid.radio_group
  • druid.scroll
  • druid.slider
  • +
  • druid.swipe
  • druid.text
  • druid.timer
  • component
  • @@ -89,7 +90,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-13 19:36:00 +Last updated 2020-04-17 20:13:54
    diff --git a/docs/topics/05-examples.md.html b/docs/topics/05-examples.md.html index 5531e13..12b20c5 100644 --- a/docs/topics/05-examples.md.html +++ b/docs/topics/05-examples.md.html @@ -60,6 +60,7 @@
  • druid.radio_group
  • druid.scroll
  • druid.slider
  • +
  • druid.swipe
  • druid.text
  • druid.timer
  • component
  • @@ -87,7 +88,7 @@
    generated by LDoc 1.4.6 -Last updated 2020-04-13 19:36:00 +Last updated 2020-04-17 20:13:54
    diff --git a/docs/topics/README.md.html b/docs/topics/README.md.html index 197a296..d993a24 100644 --- a/docs/topics/README.md.html +++ b/docs/topics/README.md.html @@ -70,6 +70,7 @@
  • druid.radio_group
  • druid.scroll
  • druid.slider
  • +
  • druid.swipe
  • druid.text
  • druid.timer
  • component
  • @@ -168,6 +169,7 @@
  • Timer - Handle timer work on gui text node

  • Grid - Component for manage node positions

  • Hover - System Druid component, handle hover node state

  • +
  • Swipe - System Druid component, handle swipe gestures on node

  • Full info see on components.md

    @@ -314,7 +316,7 @@ https://insality.github.io/druid/

    generated by LDoc 1.4.6 -Last updated 2020-04-13 19:36:00 +Last updated 2020-04-17 20:13:54