mirror of
https://github.com/AR2000AR/openComputers_codes.git
synced 2025-09-09 07:01:14 +02:00
[yawl] doc
This commit is contained in:
@@ -153,12 +153,16 @@ function Widget:size(width, height)
|
|||||||
return oldW, oldH
|
return oldW, oldH
|
||||||
end
|
end
|
||||||
|
|
||||||
---@param value? number|boolean
|
---@param value? number|false
|
||||||
---@return number|false
|
---@return number
|
||||||
function Widget:backgroundColor(value)
|
function Widget:backgroundColor(value)
|
||||||
checkArg(1, value, 'number', 'boolean', 'nil')
|
checkArg(1, value, 'number', 'boolean', 'nil')
|
||||||
local oldValue = self._backgroundColor or false
|
local oldValue = self._backgroundColor
|
||||||
if (value ~= nil) then self._backgroundColor = value end
|
if (value == false) then
|
||||||
|
self._backgroundColor = nil
|
||||||
|
elseif (value ~= nil) then
|
||||||
|
self._backgroundColor = value
|
||||||
|
end
|
||||||
return oldValue
|
return oldValue
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user