From 974f2b823ccaf3a419f19f9caf0dee153e9325e2 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Thu, 11 Mar 2021 18:33:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81=EF=BC=8C?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E5=A4=A7=E9=87=8F=E5=B0=8F=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E7=9A=84=E6=8C=89=E9=94=AE=E8=87=AA=E5=8A=A8=E9=87=8D=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/app_2048.lua | 4 ++++ parts/scenes/app_cannon.lua | 4 ++++ parts/scenes/app_cubefield.lua | 4 ++++ parts/scenes/app_dropper.lua | 6 +++++- parts/scenes/app_dtw.lua | 4 ++++ parts/scenes/app_reflect.lua | 4 ++++ parts/scenes/app_tap.lua | 2 +- parts/scenes/net_game.lua | 2 +- parts/scenes/net_rooms.lua | 2 +- 9 files changed, 28 insertions(+), 4 deletions(-) diff --git a/parts/scenes/app_2048.lua b/parts/scenes/app_2048.lua index 0d63e760..dd5109da 100644 --- a/parts/scenes/app_2048.lua +++ b/parts/scenes/app_2048.lua @@ -231,6 +231,10 @@ function scene.sceneInit() tapControl=false startTime=0 reset() + love.keyboard.setKeyRepeat(false) +end +function scene.sceneBack() + love.keyboard.setKeyRepeat(true) end function scene.mouseDown(x,y,k) diff --git a/parts/scenes/app_cannon.lua b/parts/scenes/app_cannon.lua index 6b197be8..1294adb8 100644 --- a/parts/scenes/app_cannon.lua +++ b/parts/scenes/app_cannon.lua @@ -18,6 +18,10 @@ function scene.sceneInit() ex,ey=626,260 BG.set("matrix") BGM.play("way") + love.keyboard.setKeyRepeat(false) +end +function scene.sceneBack() + love.keyboard.setKeyRepeat(true) end function scene.keyDown(key) diff --git a/parts/scenes/app_cubefield.lua b/parts/scenes/app_cubefield.lua index 84f48f77..3b29d8e3 100644 --- a/parts/scenes/app_cubefield.lua +++ b/parts/scenes/app_cubefield.lua @@ -64,6 +64,10 @@ function scene.sceneInit() gc.setLineJoin("bevel") BGM.play("push") BG.set("none") + love.keyboard.setKeyRepeat(false) +end +function scene.sceneBack() + love.keyboard.setKeyRepeat(true) end function scene.touchDown(x) diff --git a/parts/scenes/app_dropper.lua b/parts/scenes/app_dropper.lua index 21821841..65e6b32a 100644 --- a/parts/scenes/app_dropper.lua +++ b/parts/scenes/app_dropper.lua @@ -34,6 +34,10 @@ function scene.sceneInit() state="menu" BGM.play("new era") BG.set("space") + love.keyboard.setKeyRepeat(false) +end +function scene.sceneBack() + love.keyboard.setKeyRepeat(true) end function scene.keyDown(key) @@ -239,7 +243,7 @@ function scene.draw() end scene.widgetList={ - WIDGET.newButton{name="back",x=1140,y=60,w=170,h=80,font=40,code=pressKey("escape")}, + WIDGET.newButton{name="back",x=1140,y=60,w=170,h=80,font=40,code=pressKey"escape"}, } return scene \ No newline at end of file diff --git a/parts/scenes/app_dtw.lua b/parts/scenes/app_dtw.lua index 6b37eeaf..de3776c2 100644 --- a/parts/scenes/app_dtw.lua +++ b/parts/scenes/app_dtw.lua @@ -87,6 +87,10 @@ function scene.sceneInit() reset() BG.set("grey") BGM.play("way") + love.keyboard.setKeyRepeat(false) +end +function scene.sceneBack() + love.keyboard.setKeyRepeat(true) end local function touch(n) diff --git a/parts/scenes/app_reflect.lua b/parts/scenes/app_reflect.lua index 70c7eeca..2fd0dc22 100644 --- a/parts/scenes/app_reflect.lua +++ b/parts/scenes/app_reflect.lua @@ -17,6 +17,10 @@ end function scene.sceneInit() reset() BG.set("none") + love.keyboard.setKeyRepeat(false) +end +function scene.sceneBack() + love.keyboard.setKeyRepeat(true) end function scene.keyDown(key) diff --git a/parts/scenes/app_tap.lua b/parts/scenes/app_tap.lua index 0f9b5521..a0d3fe34 100644 --- a/parts/scenes/app_tap.lua +++ b/parts/scenes/app_tap.lua @@ -13,9 +13,9 @@ function scene.sceneInit() lastKey=nil speed=0 keyTime={}for i=1,40 do keyTime[i]=-1e99 end - love.keyboard.setKeyRepeat(false) BG.set("grey") BGM.play("push") + love.keyboard.setKeyRepeat(false) end function scene.sceneBack() love.keyboard.setKeyRepeat(true) diff --git a/parts/scenes/net_game.lua b/parts/scenes/net_game.lua index 161420eb..90a25793 100644 --- a/parts/scenes/net_game.lua +++ b/parts/scenes/net_game.lua @@ -323,7 +323,7 @@ function scene.draw() end scene.widgetList={ textBox, - WIDGET.newKey{name="ready",x=640,y=440,w=200,h=80,color="yellow",font=40,code=pressKey("space"),hide=function()return playing or not hideChatBox or PLAYERS[1].ready end}, + WIDGET.newKey{name="ready",x=640,y=440,w=200,h=80,color="yellow",font=40,code=pressKey"space",hide=function()return playing or not hideChatBox or PLAYERS[1].ready end}, WIDGET.newKey{name="hideChat",fText="...",x=380,y=35,w=60,font=35,code=switchChat}, WIDGET.newKey{name="quit",fText="X",x=900,y=35,w=60,font=40,code=pressKey"escape"}, } diff --git a/parts/scenes/net_rooms.lua b/parts/scenes/net_rooms.lua index 9b5ef713..2d7e86a7 100644 --- a/parts/scenes/net_rooms.lua +++ b/parts/scenes/net_rooms.lua @@ -126,7 +126,7 @@ end scene.widgetList={ WIDGET.newKey{name="fresh", x=240,y=620,w=140,h=140,font=40,code=fresh,hide=function()return TIME()-lastfreshTime<1.26 end}, - WIDGET.newKey{name="new", x=440,y=620,w=140,h=140,font=25,code=pressKey("n")}, + WIDGET.newKey{name="new", x=440,y=620,w=140,h=140,font=25,code=pressKey"n"}, WIDGET.newKey{name="join", x=640,y=620,w=140,h=140,font=40,code=pressKey"return",hide=function()return not rooms end}, WIDGET.newKey{name="up", x=840,y=585,w=140,h=70,font=40,code=pressKey"up",hide=function()return not rooms end}, WIDGET.newKey{name="down", x=840,y=655,w=140,h=70,font=40,code=pressKey"down",hide=function()return not rooms end},