49 lines
1.5 KiB
Plaintext
49 lines
1.5 KiB
Plaintext
--@include /koptilnya/libs/utils.txt
|
|
|
|
require("/koptilnya/libs/utils.txt")
|
|
|
|
local MIXIN = {}
|
|
|
|
accessorFunc(MIXIN, "_radius", "Radius", 0)
|
|
|
|
function MIXIN:included(target)
|
|
self._roundTopLeftCorner = false
|
|
self._roundTopRightCorner = false
|
|
self._roundBottomLeftCorner = false
|
|
self._roundBottomRightCorner = false
|
|
end
|
|
|
|
function MIXIN:setRoundedCorners(c1, c2, c3, c4)
|
|
if c1 ~= nil and c2 ~= nil and c3 ~= nil and c4 ~= nil then
|
|
self._roundTopLeftCorner = c1
|
|
self._roundTopRightCorner = c2
|
|
self._roundBottomRightCorner = c3
|
|
self._roundBottomLeftCorner = c4
|
|
elseif c1 ~= nil and c2 ~= nil and c3 ~= nil then
|
|
self._roundTopLeftCorner = c1
|
|
self._roundTopRightCorner = c2
|
|
self._roundBottomRightCorner = c3
|
|
self._roundBottomLeftCorner = c2
|
|
elseif c1 ~= nil and c2 ~= nil then
|
|
self._roundTopLeftCorner = c1
|
|
self._roundTopRightCorner = c2
|
|
self._roundBottomRightCorner = c1
|
|
self._roundBottomLeftCorner = c2
|
|
elseif c1 ~= nil then
|
|
self._roundTopLeftCorner = c1
|
|
self._roundTopRightCorner = c1
|
|
self._roundBottomRightCorner = c1
|
|
self._roundBottomLeftCorner = c1
|
|
else
|
|
self._roundTopLeftCorner = false
|
|
self._roundTopRightCorner = false
|
|
self._roundBottomRightCorner = false
|
|
self._roundBottomLeftCorner = false
|
|
end
|
|
end
|
|
|
|
function MIXIN:getRoundedCorners()
|
|
return self._roundTopLeftCorner, self._roundTopRightCorner, self._roundBottomRightCorner, self._roundBottomLeftCorner
|
|
end
|
|
|
|
return MIXIN |