From 1f8895257d3a491917f37682a9a90d202efacb97 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 3 Apr 2021 00:49:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/net_game.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/parts/scenes/net_game.lua b/parts/scenes/net_game.lua index 35114f30..220ebd04 100644 --- a/parts/scenes/net_game.lua +++ b/parts/scenes/net_game.lua @@ -14,10 +14,6 @@ local PLY_NET=PLY_NET local hideChatBox local textBox=WIDGET.newTextBox{name="texts",x=340,y=80,w=600,h=550,hide=function()return hideChatBox end} -local function switchChat() - hideChatBox=not hideChatBox -end - local playerInitialized local playing @@ -96,7 +92,7 @@ function scene.keyDown(key) LOG.print(text.sureQuit,COLOR.orange) end elseif key=="\\"then - switchChat() + hideChatBox=not hideChatBox elseif playing then if noKey then return end local k=keyMap.keyboard[key] @@ -315,7 +311,7 @@ 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="hideChat",fText="...",x=380,y=35,w=60,font=35,code=switchChat}, + WIDGET.newKey{name="hideChat",fText="...",x=380,y=35,w=60,font=35,code=pressKey"\\"}, WIDGET.newKey{name="quit",fText="X",x=900,y=35,w=60,font=40,code=pressKey"escape"}, }