调试模式下键盘功能制不完全失效
This commit is contained in:
@@ -876,19 +876,7 @@ function love.touchreleased(id,x,y)
|
|||||||
end
|
end
|
||||||
function love.keypressed(i)
|
function love.keypressed(i)
|
||||||
mouseShow=false
|
mouseShow=false
|
||||||
if not devMode then
|
if devMode then
|
||||||
if i~="f8"then
|
|
||||||
if SCN.swapping then return end
|
|
||||||
|
|
||||||
if keyDown[SCN.cur]then keyDown[SCN.cur](i)
|
|
||||||
elseif i=="escape"then SCN.back()
|
|
||||||
else WIDGET.keyPressed(i)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
devMode=1
|
|
||||||
TEXT.show("DEBUG ON",640,360,80,"fly",.8)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
if i=="f5"then
|
if i=="f5"then
|
||||||
DBP("DEBUG:")
|
DBP("DEBUG:")
|
||||||
elseif i=="f8"then devMode=nil TEXT.show("DEBUG OFF",640,360,80,"fly",.8)
|
elseif i=="f8"then devMode=nil TEXT.show("DEBUG OFF",640,360,80,"fly",.8)
|
||||||
@@ -928,8 +916,22 @@ function love.keypressed(i)
|
|||||||
elseif i=="]"then W.font=W.font+1
|
elseif i=="]"then W.font=W.font+1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
goto NORMAL
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
::NORMAL::
|
||||||
|
if i~="f8"then
|
||||||
|
if SCN.swapping then return end
|
||||||
|
|
||||||
|
if keyDown[SCN.cur]then keyDown[SCN.cur](i)
|
||||||
|
elseif i=="escape"then SCN.back()
|
||||||
|
else WIDGET.keyPressed(i)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
devMode=1
|
||||||
|
TEXT.show("DEBUG ON",640,360,80,"fly",.8)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
function love.keyreleased(i)
|
function love.keyreleased(i)
|
||||||
if SCN.swapping then return end
|
if SCN.swapping then return end
|
||||||
|
|||||||
Reference in New Issue
Block a user