diff --git a/lib/simple_ui/element.lua b/lib/simple_ui/element.lua index ba0f4e3..b2433c0 100644 --- a/lib/simple_ui/element.lua +++ b/lib/simple_ui/element.lua @@ -11,8 +11,6 @@ function uiElement:update(dt) end function uiElement:draw() end function uiElement:hitTest(screenX, screenY) - local r, g, b, a = love.graphics.getColor() - if a == 0 then return false end local lx, ly = self.transform:inverseTransformPoint(screenX, screenY) return self.bounds:hasPoint(lx, ly) end diff --git a/lib/simple_ui/level/skill_row.lua b/lib/simple_ui/level/skill_row.lua index d8219f2..ab9a9c9 100644 --- a/lib/simple_ui/level/skill_row.lua +++ b/lib/simple_ui/level/skill_row.lua @@ -71,6 +71,7 @@ function skillRow.new(characterId) for i, spell in ipairs(behavior.spellbook) do local skb = skillButton:new { icon = spell.tag } skb.onClick = function() + if t.state ~= "idle" then return end skb.selected = not skb.selected if t.selected then t.selected.selected = false end t.selected = skb