diff --git a/core/input.lua b/core/input.lua index fc054f1..11b9a19 100755 --- a/core/input.lua +++ b/core/input.lua @@ -6,6 +6,7 @@ local input={ subscriptions = {}, activeEvents = {} } +input.__index = input local dummyfunc = function() end ---@class subscription @@ -212,7 +213,7 @@ end input.subscribe = subscription.create --Since the introduction of the relative subscriptions, there is more utility in ommiting coordinates by default -input.__call = function(eventType,callback,cbOff,x,y,w,h) +input.__call = function(s, eventType, callback, cbOff, x, y, w, h) x = x or 0 y = y or 0 w = w or 1 diff --git a/init.lua b/init.lua index 08b0c7e..e49be66 100755 --- a/init.lua +++ b/init.lua @@ -11,8 +11,8 @@ helium.element = require(path..".core.element") helium.input = require(path..".core.input") helium.loader = require(path..".loader") helium.elementBuffer = {} - -helium.__call = function(chunk) +helium.__index = helium +helium.__call = function(s,chunk) return function(param,w,h) return helium.element(chunk,nil,w,h,param) end