Add force bool to input to force focus on first draw

This commit is contained in:
Angelo Geels 2016-10-23 13:34:31 +02:00
parent 549693dd38
commit 1b67db0487

View file

@ -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)