2021-01-14 12:48:30 +06:00

15 lines
457 B
Plaintext

--@include element.txt
--@include /koptilnya/libs/utils.txt
require("element.txt")
require("/koptilnya/libs/utils.txt")
EShape = class("EShape", Element)
accessorFunc(EShape, "_color", "Color", Color(255, 255, 255))
accessorFunc(EShape, "_hoveredColor", "HoveredColor", Color(150, 150, 150))
function EShape:paint(x, y, w, h)
render.setColor(self:isHovered() and self:getHoveredColor() or self:getColor())
render.drawRectFast(x, y, w, h)
end