From 1b67db04872df7795dcc11a207c92bad6eb02b51 Mon Sep 17 00:00:00 2001 From: Angelo Geels Date: Sun, 23 Oct 2016 13:34:31 +0200 Subject: [PATCH] Add force bool to input to force focus on first draw --- input.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/input.lua b/input.lua index 5262c2b..209d380 100644 --- a/input.lua +++ b/input.lua @@ -49,6 +49,11 @@ return function(core, input, ...) end -- user interaction + if input.force ~= nil and input.force then + core.active = opt.id + input.force = false + end + opt.state = core:registerHitbox(opt.id, x,y,w,h) opt.hasKeyboardFocus = core:grabKeyboardFocus(opt.id)