mirror of
https://github.com/AR2000AR/openComputers_codes.git
synced 2025-09-09 07:01:14 +02:00
[yawl] Border comments and constants for borderSet
This commit is contained in:
@@ -5,7 +5,8 @@ local gpu = require("component").gpu
|
|||||||
---@class Border:Frame
|
---@class Border:Frame
|
||||||
---@field parent Frame
|
---@field parent Frame
|
||||||
---@operator call:Border
|
---@operator call:Border
|
||||||
---@overload fun(parent:Frame,x:number,y:number)
|
---@overload fun(parent:Frame,x:number,y:number,borderset:string):Border
|
||||||
|
---@overload fun(parent:Frame,x:number,y:number):Border
|
||||||
local Border = class(Frame)
|
local Border = class(Frame)
|
||||||
|
|
||||||
---Comment
|
---Comment
|
||||||
@@ -39,6 +40,9 @@ function Border:borderSet(value)
|
|||||||
return oldValue
|
return oldValue
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---The borderSet characters color
|
||||||
|
---@param value number
|
||||||
|
---@return number
|
||||||
function Border:foregroundColor(value)
|
function Border:foregroundColor(value)
|
||||||
checkArg(1, value, 'number', 'nil')
|
checkArg(1, value, 'number', 'nil')
|
||||||
local oldValue = self._foregroundColor
|
local oldValue = self._foregroundColor
|
||||||
@@ -136,4 +140,8 @@ function Border:draw()
|
|||||||
self:_restoreBuffer(defaultBuffer, newBuffer)
|
self:_restoreBuffer(defaultBuffer, newBuffer)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Border.DOUBLE_LINE = "╔╗╚╝═║"
|
||||||
|
Border.SIMPLE_LINE = "┌┐└┘─│"
|
||||||
|
Border.BOLD_SIMPLE_LINE = "┏┓┗┛━┃"
|
||||||
|
|
||||||
return Border
|
return Border
|
||||||
|
Reference in New Issue
Block a user