add better skill hover & select visuals

This commit is contained in:
PeaAshMeter 2025-12-07 02:04:08 +03:00
parent bc1c6cfd6a
commit 73ba99734c

View File

@ -39,14 +39,6 @@ function skillButton:draw()
return
end
if self.selected then
love.graphics.setColor(0.3, 1, 0.3)
elseif self.hovered then
love.graphics.setColor(0.7, 1, 0.7)
else
love.graphics.setColor(1, 1, 1)
end
local quad = icons:pickQuad(self.icon)
love.graphics.push()
love.graphics.translate(self.bounds.x, self.bounds.y)
@ -55,6 +47,15 @@ function skillButton:draw()
love.graphics.pop()
self:drawBorder("inner")
if self.selected then
love.graphics.setColor(0.3, 1, 0.3, 0.5)
love.graphics.rectangle("fill", self.bounds.x, self.bounds.y, self.bounds.width, self.bounds.height)
elseif self.hovered then
love.graphics.setColor(0.7, 1, 0.7, 0.5)
love.graphics.rectangle("fill", self.bounds.x, self.bounds.y, self.bounds.width, self.bounds.height)
end
love.graphics.setColor(1, 1, 1)
end
--------------------------------------------------------------------------------