This commit is contained in:
qfx 2020-02-16 19:13:19 +02:00
parent f2770c8ac0
commit 4e021c80b8
2 changed files with 4 additions and 4 deletions

View File

@ -213,14 +213,14 @@ end
input.subscribe = subscription.create input.subscribe = subscription.create
--Since the introduction of the relative subscriptions, there is more utility in ommiting coordinates by default --Since the introduction of the relative subscriptions, there is more utility in ommiting coordinates by default
input.sub = function(eventType, callback, cbOff, x, y, w, h) setmetatable(input, {__call = function(eventType, callback, cbOff, x, y, w, h)
x = x or 0 x = x or 0
y = y or 0 y = y or 0
w = w or 1 w = w or 1
h = h or 1 h = h or 1
subscription.create(x,y,w,h,eventType,callback,cbOff) subscription.create(x,y,w,h,eventType,callback,cbOff)
end end})
function input.eventHandlers.mousereleased(x, y, btn) function input.eventHandlers.mousereleased(x, y, btn)
local captured = false local captured = false

View File

@ -12,11 +12,11 @@ helium.input = require(path..".core.input")
helium.loader = require(path..".loader") helium.loader = require(path..".loader")
helium.elementBuffer = {} helium.elementBuffer = {}
helium.__index = helium helium.__index = helium
helium.__call = function(s,chunk) setmetatable(helium, {__call = function(s,chunk)
return function(param,w,h) return function(param,w,h)
return helium.element(chunk,nil,w,h,param) return helium.element(chunk,nil,w,h,param)
end end
end end})
function helium.render() function helium.render()
--We don't want any side effects affecting internal rendering --We don't want any side effects affecting internal rendering