Merge pull request #47 from codecat/force-focus-input
Add a force focus input option to text inputs
This commit is contained in:
commit
727c925f1b
1 changed files with 5 additions and 0 deletions
|
@ -49,6 +49,11 @@ return function(core, input, ...)
|
|||
end
|
||||
|
||||
-- user interaction
|
||||
if input.forcefocus ~= nil and input.forcefocus then
|
||||
core.active = opt.id
|
||||
input.forcefocus = false
|
||||
end
|
||||
|
||||
opt.state = core:registerHitbox(opt.id, x,y,w,h)
|
||||
opt.hasKeyboardFocus = core:grabKeyboardFocus(opt.id)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue