Add gui.core.(disable|clear)KeyFocus
This commit is contained in:
parent
370c10c787
commit
465aaf1885
2 changed files with 32 additions and 21 deletions
|
@ -17,6 +17,11 @@ Quickie is an [immediate mode gui][IMGUI] library for [LÖVE][LOVE]
|
|||
-- checkboxes have only a `checked' status
|
||||
local checkbox = {checked = false}
|
||||
|
||||
function love.load()
|
||||
-- disable tabbing through the widgets
|
||||
gui.core.disableKeyFocus()
|
||||
end
|
||||
|
||||
function love.update(dt)
|
||||
-- widgets are defined by simply calling them. usually a widget returns true if
|
||||
-- if its value changed or if it was activated (click on button, ...)
|
||||
|
@ -37,8 +42,8 @@ Quickie is an [immediate mode gui][IMGUI] library for [LÖVE][LOVE]
|
|||
end
|
||||
|
||||
function love.keypressed(key,code)
|
||||
-- forward keyboard events to the gui. If you don't want widget tabbing and
|
||||
-- input widgets, skip this line
|
||||
-- forward keyboard events to the gui. If you don't want keyboard support
|
||||
-- skip this line
|
||||
gui.core.keyboard.pressed(key, code)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue