Skip to content

Commit

Permalink
Update annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
Insality committed Dec 5, 2023
1 parent 01d1445 commit bdd9efb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
21 changes: 11 additions & 10 deletions druid/annotations.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,6 @@ local druid__back_handler = {}
---@class druid.base_component
local druid__base_component = {}

--- Set current component style table.
--- Invoke `on_style_change` on component, if exist. Component should handle their style changing and store all style params
---@param self druid.base_component @{BaseComponent}
---@param druid_style table|nil Druid style module
---@return druid.base_component @{BaseComponent}
function druid__base_component.component:set_style(self, druid_style) end

--- Return all children components, recursive
---@param self druid.base_component @{BaseComponent}
---@return table Array of childrens if the Druid component instance
Expand Down Expand Up @@ -138,6 +131,13 @@ function druid__base_component.set_input_priority(self, value, is_temporary) end
---@return druid.base_component @{BaseComponent}
function druid__base_component.set_nodes(self, nodes) end

--- Set current component style table.
--- Invoke `on_style_change` on component, if exist. Component should handle their style changing and store all style params
---@param self druid.base_component @{BaseComponent}
---@param druid_style table|nil Druid style module
---@return druid.base_component @{BaseComponent}
function druid__base_component.set_style(self, druid_style) end

--- Set component template name.
--- Use on all your custom components with GUI layouts used as templates. It will check parent template name to build full template name in self:get_node()
---@param self druid.base_component @{BaseComponent}
Expand Down Expand Up @@ -562,14 +562,15 @@ local druid__hotkey = {}
--- Add hotkey for component callback
---@param self druid.hotkey @{Hotkey}
---@param keys string[]|hash[]|string|hash that have to be pressed before key pressed to activate
---@param callback_argument value The argument to pass into the callback function
---@param callback_argument any|nil The argument to pass into the callback function
---@return druid.hotkey Current instance
function druid__hotkey.add_hotkey(self, keys, callback_argument) end

--- Component init function
--- The @{Hotkey} constructor
---@param self druid.hotkey @{Hotkey}
---@param keys string[]|string The keys to be pressed for trigger callback. Should contains one key and any modificator keys
---@param callback function The callback function
---@param callback_argument value The argument to pass into the callback function
---@param callback_argument any|nil The argument to pass into the callback function
function druid__hotkey.init(self, keys, callback, callback_argument) end

--- If true, the callback will be triggered on action.repeated
Expand Down
1 change: 0 additions & 1 deletion druid/component.lua
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ end
--
-- Invoke `on_style_change` on component, if exist. Component should handle
-- their style changing and store all style params
-- @function component:set_style
-- @tparam BaseComponent self @{BaseComponent}
-- @tparam table|nil druid_style Druid style module
-- @treturn BaseComponent @{BaseComponent}
Expand Down

0 comments on commit bdd9efb

Please sign in to comment.