mirror of
https://github.com/Insality/druid.git
synced 2025-09-27 10:02:18 +02:00
Update tests
This commit is contained in:
@@ -243,15 +243,15 @@ end
|
||||
|
||||
|
||||
---Get button enabled state.
|
||||
---By default all Buttons is enabled on creating.
|
||||
---@return boolean is_enabled True, if button is enabled now, False overwise
|
||||
---By default all Buttons are enabled on creating.
|
||||
---@return boolean is_enabled True, if button is enabled now, False otherwise
|
||||
function M:is_enabled()
|
||||
return not self.disabled
|
||||
end
|
||||
|
||||
|
||||
---Set additional button click area.
|
||||
---Useful to restrict click outside out stencil node or scrollable content.
|
||||
---Useful to restrict click outside of stencil node or scrollable content.
|
||||
---If button node placed inside stencil node, it will be automatically set to this stencil node.
|
||||
---@param zone node|string|nil Gui node
|
||||
---@return druid.button self The current button instance
|
||||
@@ -284,9 +284,9 @@ function M:get_key_trigger()
|
||||
end
|
||||
|
||||
|
||||
---Set function for additional check for button click availability
|
||||
---Set function for additional check for button click availability.
|
||||
---@param check_function function|nil Should return true or false. If true - button can be pressed.
|
||||
---@param failure_callback function|nil Function will be called on button click, if check function return false
|
||||
---@param failure_callback function|nil Function will be called on button click, if check function returns false
|
||||
---@return druid.button self The current button instance
|
||||
function M:set_check_function(check_function, failure_callback)
|
||||
self._check_function = check_function
|
||||
@@ -299,7 +299,7 @@ end
|
||||
---Set Button mode to work inside user HTML5 interaction event.
|
||||
---
|
||||
---It's required to make protected things like copy & paste text, show mobile keyboard, etc
|
||||
---The HTML5 button's doesn't call any events except on_click event.
|
||||
---The HTML5 button doesn't call any events except on_click event.
|
||||
---
|
||||
---If the game is not HTML, html mode will be not enabled
|
||||
---@param is_web_mode boolean|nil If true - button will be called inside html5 callback
|
||||
|
Reference in New Issue
Block a user