Fix #34: Add [is,any][Hit,Active,Hovered]()
This commit is contained in:
parent
1d6626e6f4
commit
c66bbe9065
2 changed files with 26 additions and 2 deletions
7
init.lua
7
init.lua
|
@ -5,6 +5,8 @@ local suit = require(BASE .. "core")
|
|||
|
||||
local instance = suit.new()
|
||||
return setmetatable({
|
||||
_instance = instance,
|
||||
|
||||
new = suit.new,
|
||||
getOptionsAndSize = suit.getOptionsAndSize,
|
||||
|
||||
|
@ -12,7 +14,10 @@ return setmetatable({
|
|||
anyHovered = function(...) return instance:anyHovered(...) end,
|
||||
isHovered = function(...) return instance:isHovered(...) end,
|
||||
wasHovered = function(...) return instance:wasHovered(...) end,
|
||||
anyActive = function(...) return instance:anyActive(...) end,
|
||||
isActive = function(...) return instance:isActive(...) end,
|
||||
anyHit = function(...) return instance:anyHit(...) end,
|
||||
isHit = function(...) return instance:isHit(...) end,
|
||||
|
||||
mouseInRect = function(...) return instance:mouseInRect(...) end,
|
||||
registerHitbox = function(...) return instance:registerHitbox(...) end,
|
||||
|
@ -49,7 +54,7 @@ return setmetatable({
|
|||
if k == "theme" then
|
||||
instance.theme = v
|
||||
else
|
||||
rawset(t, k, v)
|
||||
rawset(instance, k, v)
|
||||
end
|
||||
end,
|
||||
__index = function(t, k)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue