新增文本框控件,空间框架略微修改适配文本输入
This commit is contained in:
@@ -171,7 +171,9 @@ function love.touchreleased(id,x,y)
|
||||
WIDGET.press(x,y)
|
||||
WIDGET.release(x,y)
|
||||
touching=nil
|
||||
WIDGET.sel=nil
|
||||
if WIDGET.sel and not WIDGET.sel.keepFocus then
|
||||
WIDGET.sel=nil
|
||||
end
|
||||
end
|
||||
if touchUp[SCN.cur]then
|
||||
touchUp[SCN.cur](id,x,y)
|
||||
@@ -253,6 +255,11 @@ function love.keyreleased(i)
|
||||
if SCN.swapping then return end
|
||||
if keyUp[SCN.cur]then keyUp[SCN.cur](i)end
|
||||
end
|
||||
function love.textinput(text)
|
||||
if WIDGET.sel and WIDGET.sel.type=="textBox"then
|
||||
WIDGET.sel.value=WIDGET.sel.value..text
|
||||
end
|
||||
end
|
||||
|
||||
function love.joystickadded(JS)
|
||||
joysticks[#joysticks+1]=JS
|
||||
|
||||
Reference in New Issue
Block a user