Fix assignments for active and hovered states
This commit is contained in:
parent
1767782603
commit
cabf890a2f
1 changed files with 6 additions and 2 deletions
8
core.lua
8
core.lua
|
@ -38,7 +38,9 @@ end
|
|||
|
||||
-- gui state
|
||||
function suit:setHovered(id)
|
||||
return self.hovered ~= id
|
||||
local ischanged = self.hovered ~= id
|
||||
self.hovered = id
|
||||
return ischanged
|
||||
end
|
||||
|
||||
function suit:anyHovered()
|
||||
|
@ -54,7 +56,9 @@ function suit:wasHovered(id)
|
|||
end
|
||||
|
||||
function suit:setActive(id)
|
||||
return self.active ~= nil
|
||||
local ischanged = self.active ~= id
|
||||
self.active = id
|
||||
return ischanged
|
||||
end
|
||||
|
||||
function suit:anyActive()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue