add better skill hover & select visuals
This commit is contained in:
parent
bc1c6cfd6a
commit
73ba99734c
@ -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
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user