Update docs

This commit is contained in:
Insality
2022-07-17 19:19:25 +03:00
parent 77e56e8747
commit 847bee2e6b
37 changed files with 818 additions and 23 deletions

View File

@@ -29,6 +29,7 @@ local Hotkey = component.create("hotkey")
-- @tparam Hotkey self @{Hotkey}
-- @tparam string[]|string keys The keys to be pressed for trigger callback. Should contains one key and any modificator keys
-- @tparam function callback The callback function
-- @tparam[opt] value callback_argument The argument to pass into the callback function
function Hotkey.init(self, keys, callback, callback_argument)
self.druid = self:get_druid()
@@ -59,7 +60,8 @@ end
--- Add hotkey for component callback
-- @tparam Hotkey self @{Hotkey}
-- @tparam string[]|hash[]|string|hash Keys that have to be pressed before key pressed to activate
-- @tparam string[]|hash[]|string|hash keys that have to be pressed before key pressed to activate
-- @tparam[opt] value callback_argument The argument to pass into the callback function
function Hotkey.add_hotkey(self, keys, callback_argument)
keys = keys or {}
if type(keys) == "string" then

View File

@@ -13,7 +13,7 @@ local helper = require("druid.helper")
local component = require("druid.component")
local Event = require("druid.event")
---@class layout : druid.base_component
local Layout = component.create("layout")

View File

@@ -215,7 +215,7 @@ end
-- @tparam Progress self @{Progress}
-- @tparam vector3 max_size The new node maximum (full) size
-- @treturn Progress @{Progress}
function Progress:set_max_size(max_size)
function Progress.set_max_size(self, max_size)
self.max_size = max_size[self.key]
self:set_to(self.last_value)
return self