From 2b2639e19fb6722edb333dd426839200174f1730 Mon Sep 17 00:00:00 2001 From: qfx Date: Sun, 16 Feb 2020 18:02:20 +0200 Subject: [PATCH] Improvements --- core/input.lua | 1 + init.lua | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/core/input.lua b/core/input.lua index b0074cc..8d0bc1f 100755 --- a/core/input.lua +++ b/core/input.lua @@ -211,6 +211,7 @@ end input.subscribe = subscription.create +input.__call = subscription.create function input.eventHandlers.mousereleased(x, y, btn) local captured = false diff --git a/init.lua b/init.lua index 65c56ac..08b0c7e 100755 --- a/init.lua +++ b/init.lua @@ -12,6 +12,12 @@ helium.input = require(path..".core.input") helium.loader = require(path..".loader") helium.elementBuffer = {} +helium.__call = function(chunk) + return function(param,w,h) + return helium.element(chunk,nil,w,h,param) + end +end + function helium.render() --We don't want any side effects affecting internal rendering love.graphics.reset()