diff --git a/lib/simple_ui/level/skill_row.lua b/lib/simple_ui/level/skill_row.lua index 19d8ab0..65ebda3 100644 --- a/lib/simple_ui/level/skill_row.lua +++ b/lib/simple_ui/level/skill_row.lua @@ -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 --------------------------------------------------------------------------------