From 5814d46468b1d92961762f0862316bb60810affb Mon Sep 17 00:00:00 2001 From: qfx Date: Sun, 16 Feb 2020 18:10:20 +0200 Subject: [PATCH] new interface --- core/input.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/core/input.lua b/core/input.lua index 8d0bc1f..fc054f1 100755 --- a/core/input.lua +++ b/core/input.lua @@ -211,7 +211,15 @@ end input.subscribe = subscription.create -input.__call = 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) + x = x or 0 + y = y or 0 + w = w or 1 + h = h or 1 + + subscription.create(x,y,w,h,eventType,callback,cbOff) +end function input.eventHandlers.mousereleased(x, y, btn) local captured = false