From 7f90ae99e6042ab3ef2d014a29b3baaff103d9ec Mon Sep 17 00:00:00 2001 From: Insality Date: Tue, 27 Aug 2024 17:16:33 +0300 Subject: [PATCH] Update docs --- docs/modules/BackHandler.html | 3 +- docs/modules/Button.html | 11 +++-- docs/modules/Drag.html | 80 +++++++++++++++++++++++++++++++-- docs/modules/DruidInstance.html | 2 +- docs/modules/Hotkey.html | 35 +++++++++++++++ docs/modules/Input.html | 6 +-- docs/modules/Scroll.html | 27 ++++++++++- docs/modules/Text.html | 2 +- druid/annotations.lua | 4 +- 9 files changed, 148 insertions(+), 22 deletions(-) diff --git a/docs/modules/BackHandler.html b/docs/modules/BackHandler.html index 50d2bc5..df93b56 100644 --- a/docs/modules/BackHandler.html +++ b/docs/modules/BackHandler.html @@ -147,9 +147,8 @@ local back_handler = self.druid:new_back_handler(callback, [params]) diff --git a/docs/modules/Button.html b/docs/modules/Button.html index 2a0def6..0b8a8e9 100644 --- a/docs/modules/Button.html +++ b/docs/modules/Button.html @@ -97,7 +97,7 @@ print("Also the button component is passed in callback params") end -local custom_args = "any variable to pass inside callback" +local custom_args = "Any variable to pass inside callback" local button = self.druid:new_button("button_name", on_button_click, custom_args) @@ -153,7 +153,7 @@ local button = self.druid:new_button("button_name", on_button_click, c click_zone - Additional button click area, defined by another GUI Node + Additional button click area, defined by another GUI node hover @@ -433,7 +433,7 @@ button:set_enabled(true) Button
  • key - hash + hash or string The action_id of the input key
  • @@ -581,14 +581,13 @@ button:set_enabled(true) click_zone
    - Additional button click area, defined by another GUI Node + Additional button click area, defined by another GUI node diff --git a/docs/modules/Drag.html b/docs/modules/Drag.html index b6ce635..e967282 100644 --- a/docs/modules/Drag.html +++ b/docs/modules/Drag.html @@ -129,6 +129,10 @@ Is component now touching + node + Drag node + + on_drag on drag progress callback(self, dx, dy, total_x, total_y) @@ -138,7 +142,7 @@ on_drag_start - Event on drag start callback(self) + Event on drag start callback(self, touch) on_touch_end @@ -149,6 +153,14 @@ Event on touch start callback(self) + screen_x + Current touch x screen position + + + screen_y + Current touch y screen position + + touch_start_pos Touch start position @@ -184,7 +196,7 @@ Drag
  • node - node + node GUI node to detect dragging
  • on_drag_callback @@ -241,7 +253,7 @@ Drag
  • node - node + node Gui node
  • @@ -392,6 +404,26 @@ +
    +
    + + node +
    +
    + Drag node + + + + + + + +
    @@ -438,7 +470,7 @@ on_drag_start
    - Event on drag start callback(self) + Event on drag start callback(self, touch)
    +
    + + screen_x +
    +
    + Current touch x screen position + + + + + + + + +
    +
    + + screen_y +
    +
    + Current touch y screen position + + + + + + + +
    diff --git a/docs/modules/DruidInstance.html b/docs/modules/DruidInstance.html index 2e0ae35..1811027 100644 --- a/docs/modules/DruidInstance.html +++ b/docs/modules/DruidInstance.html @@ -1211,7 +1211,7 @@ end Message from on_message
  • sender - hash + url Sender from on_message
  • diff --git a/docs/modules/Hotkey.html b/docs/modules/Hotkey.html index 3cd5a00..bf191fb 100644 --- a/docs/modules/Hotkey.html +++ b/docs/modules/Hotkey.html @@ -90,6 +90,10 @@ init(self, keys, callback, callback_argument) The Hotkey constructor + + set_repeat(self, is_enabled_repeated) + If true, the callback will be triggered on action.repeated +

    Tables

    @@ -192,6 +196,37 @@ + +
    + + set_repeat(self, is_enabled_repeated) +
    +
    + If true, the callback will be triggered on action.repeated + + +

    Parameters:

    +
      +
    • self + Hotkey + Hotkey +
    • +
    • is_enabled_repeated + bool + The flag value +
    • +
    + +

    Returns:

    +
      + + Hotkey + +
    + + + +

    Tables

    diff --git a/docs/modules/Input.html b/docs/modules/Input.html index 14e605b..0434ec0 100644 --- a/docs/modules/Input.html +++ b/docs/modules/Input.html @@ -477,9 +477,8 @@ @@ -578,9 +577,8 @@ diff --git a/docs/modules/Scroll.html b/docs/modules/Scroll.html index 0c390a4..3cb1fac 100644 --- a/docs/modules/Scroll.html +++ b/docs/modules/Scroll.html @@ -177,6 +177,10 @@

    Fields

    + + + + @@ -817,6 +821,26 @@

    Fields

    +
    + + _is_inert +
    +
    + Flag, if scroll now moving by inertion + + +
      +
    • _is_inert + bool + +
    • +
    + + + + + +
    available_pos @@ -1027,9 +1051,8 @@
    • selected - number + number or nil - (optional)
    diff --git a/docs/modules/Text.html b/docs/modules/Text.html index 179c6cb..d4db3a6 100644 --- a/docs/modules/Text.html +++ b/docs/modules/Text.html @@ -544,7 +544,7 @@ Text
  • adjust_type - number or nil + string or nil See const.TEXT_ADJUST. If pass nil - use current adjust type
  • minimal_scale diff --git a/druid/annotations.lua b/druid/annotations.lua index efd981f..e6c25f9 100644 --- a/druid/annotations.lua +++ b/druid/annotations.lua @@ -390,12 +390,12 @@ function druid__data_list.set_data(self, data) end ---@field on_drag_start druid.event Event on drag start callback(self, touch) ---@field on_touch_end druid.event Event on touch end callback(self) ---@field on_touch_start druid.event Event on touch start callback(self) +---@field screen_x number Current touch x screen position +---@field screen_y number Current touch y screen position ---@field style druid.drag.style Component style params. ---@field touch_start_pos vector3 Touch start position ---@field x number Current touch x position ---@field y number Current touch y position ----@field screen_x number Current touch x screen position ----@field screen_y number Current touch y screen position local druid__drag = {} --- The @{Drag} constructor
  • _is_inertFlag, if scroll now moving by inertion
    available_pos Available position for content node: (min_x, max_y, max_x, min_y)