mirror of
https://github.com/Insality/druid.git
synced 2025-09-28 02:22:18 +02:00
#69 Fix annotations in button component
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user