修复使用过tas后mod菜单会显示unranked close #371

优化mod菜单unrank刷新时机计算
This commit is contained in:
MrZ626
2021-10-12 19:16:17 +08:00
parent 88bd9216d0
commit 7ba0d0d3a0
2 changed files with 9 additions and 6 deletions

View File

@@ -254,7 +254,7 @@ function scoreValid()--Check if any unranked mods are activated
return false
end
end
if GAME.tasUsed then
if GAME.playing and GAME.tasUsed then
return false
end
return true

View File

@@ -2,6 +2,10 @@ local gc=love.graphics
local kb=love.keyboard
local ins,rem=table.insert,table.remove
local scene={}
local selected--Mod selected
local function _modComp(a,b)
return a.no<b.no
end
@@ -35,14 +39,12 @@ local function _toggleMod(M,back)
SFX.play('move')
SFX.play('lock',.6)
end
scene.widgetList.unranked.hide=scoreValid()
end
local scene={}
local selected--Mod selected
function scene.sceneInit()
selected=false
scene.widgetList.unranked.hide=scoreValid()
BG.set('tunnel')
end
@@ -76,6 +78,7 @@ function scene.keyDown(key)
while GAME.mod[1]do
rem(GAME.mod).sel=0
end
scene.widgetList.unranked.hide=scoreValid()
SFX.play('hold')
end
elseif #key==1 then
@@ -153,7 +156,7 @@ end
scene.widgetList={
WIDGET.newText{name="title", x=80,y=50,font=70,align='L'},
WIDGET.newText{name="unranked",x=1200,y=60,color='Y',font=50,align='R',hideF=function()return scoreValid()end},
WIDGET.newText{name="unranked",x=1200,y=60,color='Y',font=50,align='R'},
WIDGET.newButton{name="reset", x=1140,y=540,w=170,h=80,font=25,code=pressKey"tab"},
WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene},
}