整理代码,返回需要二次确认的小程序统一用一个函数

This commit is contained in:
MrZ626
2021-11-29 22:39:20 +08:00
parent a4293624ab
commit e3db564a4b
12 changed files with 43 additions and 31 deletions

View File

@@ -16,7 +16,6 @@ local inputBox=WIDGET.newInputBox{name='input',x=340,y=660,w=600,h=50,limit=256}
local playing
local lastUpstreamTime
local upstreamProgress
local lastBackTime=0
local noTouch,noKey=false,false
local touchMoveLastFrame=false
local newMessageTimer
@@ -36,15 +35,12 @@ local function _gotoSetting()
SCN.go('setting_game')
end
local function _quit()
if TIME()-lastBackTime<1 then
if tryBack()then
NET.signal_quit()
if SCN.stack[#SCN.stack-1]=='net_newRoom'then
SCN.pop()
end
SCN.back()
else
lastBackTime=TIME()
MES.new('info',text.sureQuit)
end
end
local function _switchChat()