New elements; Fixes
This commit is contained in:
@@ -7,11 +7,9 @@ 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()
|
||||
local x, y = self:getAbsolutePos()
|
||||
local w, h = self:getSize()
|
||||
|
||||
render.setColor(self:getColor())
|
||||
function EShape:paint(x, y, w, h)
|
||||
render.setColor(self:isHovered() and self:getHoveredColor() or self:getColor())
|
||||
render.drawRectFast(x, y, w, h)
|
||||
end
|
||||
Reference in New Issue
Block a user