From 1b67db04872df7795dcc11a207c92bad6eb02b51 Mon Sep 17 00:00:00 2001 From: Angelo Geels Date: Sun, 23 Oct 2016 13:34:31 +0200 Subject: [PATCH 1/2] 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) From 2830edc52e1c433fff0b9b0a5f45571de2f1a3cd Mon Sep 17 00:00:00 2001 From: Angelo Geels Date: Sun, 23 Oct 2016 13:36:50 +0200 Subject: [PATCH 2/2] Rename to forcefocus --- input.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/input.lua b/input.lua index 209d380..57a4e48 100644 --- a/input.lua +++ b/input.lua @@ -49,9 +49,9 @@ return function(core, input, ...) end -- user interaction - if input.force ~= nil and input.force then + if input.forcefocus ~= nil and input.forcefocus then core.active = opt.id - input.force = false + input.forcefocus = false end opt.state = core:registerHitbox(opt.id, x,y,w,h)