Initial commit
This commit is contained in:
17
koptilnya/gui/elements/shape.txt
Normal file
17
koptilnya/gui/elements/shape.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
--@include element.txt
|
||||
--@include ../utils.txt
|
||||
|
||||
require("element.txt")
|
||||
require("../utils.txt")
|
||||
|
||||
EShape = class("EShape", Element)
|
||||
|
||||
accessorFunc(EShape, "_color", "Color", Color(255, 255, 255))
|
||||
|
||||
function EShape:paint()
|
||||
local x, y = self:getAbsolutePos()
|
||||
local w, h = self:getSize()
|
||||
|
||||
render.setColor(self:getColor())
|
||||
render.drawRectFast(x, y, w, h)
|
||||
end
|
||||
Reference in New Issue
Block a user