From 47af067c031d2c354965d91fca3afc27d97f353e Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Tue, 3 Aug 2021 15:48:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=88=BF=E9=97=B4=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E8=BE=93=E5=AF=86=E7=A0=81=E7=9A=84=E6=97=B6=E5=80=99?= =?UTF-8?q?=E9=83=A8=E5=88=86=E6=8C=89=E9=94=AE=E8=BF=98=E4=BC=9A=E6=9C=89?= =?UTF-8?q?=E5=85=B6=E4=BB=96=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/net_rooms.lua | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/parts/scenes/net_rooms.lua b/parts/scenes/net_rooms.lua index 82c0ff0a..89dd3c72 100644 --- a/parts/scenes/net_rooms.lua +++ b/parts/scenes/net_rooms.lua @@ -59,23 +59,27 @@ function scene.sceneInit() end function scene.keyDown(key) - if key=="r"then - if fetchTimer<=7 then - fetchRoom() - end - elseif key=="s"then - SCN.go('setting_game') - elseif key=="n"then - SCN.go('net_newRoom') - elseif key=="escape"then - SCN.back() - elseif roomList:getLen()>0 and key=="return"then - local R=roomList:getSel() - if NET.getlock('fetchRoom')or not R then return end - if R.roomInfo.version==VERSION.room then - NET.enterRoom(R,passwordBox.value) + if WIDGET.sel~=passwordBox then + if key=="r"then + if fetchTimer<=7 then + fetchRoom() + end + elseif key=="s"then + SCN.go('setting_game') + elseif key=="n"then + SCN.go('net_newRoom') + elseif key=="escape"then + SCN.back() + elseif roomList:getLen()>0 and key=="return"then + local R=roomList:getSel() + if NET.getlock('fetchRoom')or not R then return end + if R.roomInfo.version==VERSION.room then + NET.enterRoom(R,passwordBox.value) + else + MES.new('error',"Version doesn't compatible 版本不兼容") + end else - MES.new('error',"Version doesn't compatible 版本不兼容") + WIDGET.keyPressed(key) end else WIDGET.keyPressed(key)