From cabf890a2f5b4d5128054568fb443e1e6ce98745 Mon Sep 17 00:00:00 2001 From: Wolfgang Schreurs Date: Thu, 13 May 2021 06:18:51 +0700 Subject: [PATCH] Fix assignments for active and hovered states --- core.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core.lua b/core.lua index 716aa6c..dff62dc 100644 --- a/core.lua +++ b/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()