Update annotations

This commit is contained in:
Insality
2024-11-07 18:32:46 +01:00
parent 60ef641276
commit 999c6222a0
22 changed files with 140 additions and 144 deletions

View File

@@ -25,13 +25,13 @@
-- @tfield number last_index
--- Event triggered when scroll progress is changed; event(self, progress_value)
-- @tfield DruidEvent on_scroll_progress_change DruidEvent
-- @tfield druid.event on_scroll_progress_change druid.event
---On DataList visual element created Event callback(self, index, node, instance)
-- @tfield DruidEvent on_element_add DruidEvent
-- @tfield druid.event on_element_add druid.event
---On DataList visual element created Event callback(self, index)
-- @tfield DruidEvent on_element_remove DruidEvent
-- @tfield druid.event on_element_remove druid.event
---
@@ -223,7 +223,7 @@ end
--- Add element at passed index using cache or create new
-- @tparam DataList self DataList
-- @tparam number index
-- @local
---@private
function M:_add_at(index)
if self._data_visual[index] then
self:_remove_at(index)
@@ -257,7 +257,7 @@ end
--- Remove element from passed index and add it to cache if applicable
-- @tparam DataList self DataList
-- @tparam number index
-- @local
---@private
function M:_remove_at(index)
self.grid:remove(index, const.SHIFT.NO_SHIFT)
@@ -287,7 +287,7 @@ end
--- Refresh all elements in DataList
-- @tparam DataList self DataList
-- @local
---@private
function M:_refresh()
self.scroll:set_size(self.grid:get_size_for(#self._data))

View File

@@ -8,10 +8,10 @@
-- @alias druid.hotkey
--- On hotkey released callback(self, argument)
-- @tfield DruidEvent on_hotkey_pressed DruidEvent
-- @tfield druid.event on_hotkey_pressed druid.event
--- On hotkey released callback(self, argument)
-- @tfield DruidEvent on_hotkey_released DruidEvent
-- @tfield druid.event on_hotkey_released druid.event
--- Visual node
-- @tfield node node

View File

@@ -10,25 +10,25 @@
-- @alias druid.input
--- On input field select callback(self, input_instance)
-- @tfield DruidEvent on_input_select DruidEvent
-- @tfield druid.event on_input_select druid.event
--- On input field unselect callback(self, input_text, input_instance)
-- @tfield DruidEvent on_input_unselect DruidEvent
-- @tfield druid.event on_input_unselect druid.event
--- On input field text change callback(self, input_text)
-- @tfield DruidEvent on_input_text DruidEvent
-- @tfield druid.event on_input_text druid.event
--- On input field text change to empty string callback(self, input_text)
-- @tfield DruidEvent on_input_empty DruidEvent
-- @tfield druid.event on_input_empty druid.event
--- On input field text change to max length string callback(self, input_text)
-- @tfield DruidEvent on_input_full DruidEvent
-- @tfield druid.event on_input_full druid.event
--- On trying user input with not allowed character callback(self, params, input_text)
-- @tfield DruidEvent on_input_wrong DruidEvent
-- @tfield druid.event on_input_wrong druid.event
--- On cursor position change callback(self, cursor_index, start_index, end_index)
-- @tfield DruidEvent on_select_cursor_change DruidEvent
-- @tfield druid.event on_select_cursor_change druid.event
--- The cursor index. The index of letter cursor after. Leftmost cursor - 0
-- @tfield number cursor_index

View File

@@ -18,7 +18,7 @@
-- @alias druid.lang_text
--- On change text callback
-- @tfield DruidEvent on_change DruidEvent
-- @tfield druid.event on_change druid.event
--- The text component
-- @tfield Text text Text

View File

@@ -20,7 +20,7 @@
-- @alias druid.progress
--- On progress bar change callback(self, new_value)
-- @tfield DruidEvent on_change DruidEvent
-- @tfield druid.event on_change druid.event
--- Progress bar fill node
-- @tfield node node

View File

@@ -8,7 +8,7 @@
-- @alias druid.slider
--- On change value callback(self, value)
-- @tfield DruidEvent on_change_value DruidEvent
-- @tfield druid.event on_change_value druid.event
--- Slider pin node
-- @tfield node node

View File

@@ -16,7 +16,7 @@
-- @tparam node|nil click_zone
--- Trigger on swipe event(self, swipe_side, dist, delta_time)
-- @tfield DruidEvent on_swipe) DruidEvent
-- @tfield druid.event on_swipe) druid.event
---