#69 Fix annotations in button component

This commit is contained in:
Insality
2020-05-24 22:56:53 +03:00
parent d3a56f717e
commit 474b97469e
3 changed files with 14 additions and 8 deletions

View File

@@ -265,10 +265,13 @@ end
--- Set enabled button component state
-- @function button:set_enabled
-- @tparam bool state Enabled state
-- @treturn druid.button Current button instance
function M.set_enabled(self, state)
self.disabled = not state
self.hover:set_enabled(state)
self.style.on_set_enabled(self, self.node, state)
return self
end
@@ -284,10 +287,11 @@ end
-- no click events outside stencil node
-- @function button:set_click_zone
-- @tparam node zone Gui node
-- @tparam druid.button Self instance to make chain calls
-- @treturn druid.button Current button instance
function M.set_click_zone(self, zone)
self.click_zone = self:get_node(zone)
self.hover:set_click_zone(zone)
return self
end
@@ -295,9 +299,10 @@ end
--- Set key-code to trigger this button
-- @function button:set_key_trigger
-- @tparam hash key The action_id of the key
-- @tparam druid.button Self instance to make chain calls
-- @treturn druid.button Current button instance
function M.set_key_trigger(self, key)
self.key_trigger = hash(key)
return self
end