暂停时显示所选mod

This commit is contained in:
MrZ626
2020-11-23 01:38:23 +08:00
parent 467c8f44d6
commit 7649d23ac4
4 changed files with 52 additions and 27 deletions

View File

@@ -1,6 +1,9 @@
local gc=love.graphics
local ins,rem=table.insert,table.remove
local function modComp(a,b)
return a.no<b.no
end
local function remMod(M)
for i=1,#GAME.mod do
if GAME.mod[i]==M then
@@ -12,6 +15,7 @@ end
local function toggleMod(M)
if M.sel==0 then
ins(GAME.mod,M)
table.sort(GAME.mod,modComp)
end
if M.list then
M.sel=(M.sel+1)%(#M.list+1)