1
0
mirror of https://github.com/AR2000AR/openComputers_codes.git synced 2025-09-08 22:51:14 +02:00

[yawl] doc

This commit is contained in:
2023-07-29 20:29:15 +02:00
parent 1ee78d210c
commit 44a9ce9718

View File

@@ -153,12 +153,16 @@ function Widget:size(width, height)
return oldW, oldH
end
---@param value? number|boolean
---@return number|false
---@param value? number|false
---@return number
function Widget:backgroundColor(value)
checkArg(1, value, 'number', 'boolean', 'nil')
local oldValue = self._backgroundColor or false
if (value ~= nil) then self._backgroundColor = value end
local oldValue = self._backgroundColor
if (value == false) then
self._backgroundColor = nil
elseif (value ~= nil) then
self._backgroundColor = value
end
return oldValue
end