Update documentation

This commit is contained in:
Insality
2020-03-28 23:10:30 +03:00
parent d24107550a
commit 9dd3a029ad
4 changed files with 144 additions and 21 deletions

View File

@@ -3,11 +3,11 @@
--- Component events
-- @table Events
-- @tfield druid_event on_click On release button callback
-- @tfield druid_event on_repeated_click On repeated action button callback
-- @tfield druid_event on_long_click On long tap button callback
-- @tfield druid_event on_double_click On double tap button callback
-- @tfield druid_event on_hold_callback On button hold before long_click callback
-- @tfield druid_event on_click (self, params, button_instance) On release button callback
-- @tfield druid_event on_repeated_click (self, params, button_instance, click_amount) On repeated action button callback
-- @tfield druid_event on_long_click (self, params, button_instance, time) On long tap button callback
-- @tfield druid_event on_double_click (self, params, button_instance, click_amount) On double tap button callback
-- @tfield druid_event on_hold_callback (self, params, button_instance, time) On button hold before long_click callback
--- Component fields
-- @table Fields
@@ -146,8 +146,7 @@ end
-- @tparam function callback Button callback
-- @tparam[opt] table params Button callback params
-- @tparam[opt] node anim_node Button anim node (node, if not provided)
-- @tparam[opt] string event Button react event, const.ACTION_TOUCH by default
function M.init(self, node, callback, params, anim_node, event)
function M.init(self, node, callback, params, anim_node)
self.druid = self:get_druid()
self.node = self:get_node(node)

View File

@@ -74,7 +74,7 @@ end
-- @function progress:init
-- @tparam string|node node Progress bar fill node or node name
-- @tparam string key Progress bar direction: const.SIDE.X or const.SIDE.Y
-- @tparam number init_value Initial value of progress bar
-- @tparam[opt=1] number init_value Initial value of progress bar
function M.init(self, node, key, init_value)
assert(key == const.SIDE.X or const.SIDE.Y, "Progress bar key should be 'x' or 'y'")

View File

@@ -67,7 +67,7 @@ end
--- Component init function
-- @function text:init
-- @tparam node node Gui text node
-- @tparam[opt] string value Initial text
-- @tparam[opt] string value Initial text. Default value is node text from GUI scene.
-- @tparam[opt] bool no_adjust If true, text will be not auto-adjust size
function M.init(self, node, value, no_adjust)
self.node = self:get_node(node)