取消软件锁功能,调整设置界面布局

This commit is contained in:
MrZ626
2021-05-05 14:39:02 +08:00
parent 9af190529c
commit 5afba67c1d
10 changed files with 27 additions and 55 deletions

View File

@@ -263,7 +263,6 @@ do
if STAT.version<1400 then if STAT.version<1400 then
fs.remove("conf/user") fs.remove("conf/user")
fs.remove("conf/key") fs.remove("conf/key")
SETTING.appLock=false
needSave=true needSave=true
autoRestart=true autoRestart=true
end end
@@ -271,6 +270,7 @@ do
fs.remove("conf/user") fs.remove("conf/user")
autoRestart=true autoRestart=true
end end
SETTING.appLock=nil
for _,v in next,VK_org do for _,v in next,VK_org do
if not v.color then if not v.color then

View File

@@ -246,7 +246,6 @@ SETTING={--Settings
reTime=4, reTime=4,
autoPause=true, autoPause=true,
fine=false, fine=false,
appLock=false,
simpMode=false, simpMode=false,
lang=1, lang=1,
skinSet=1, skinSet=1,

View File

@@ -277,11 +277,10 @@ return{
reTime="Start Delay", reTime="Start Delay",
RS="Rotation System", RS="Rotation System",
layout="Layout", layout="Layout",
dataSaving="Data saving",
autoPause="Pause while unfocused", autoPause="Pause while unfocused",
swap="Key Combination (Change Atk. Mode)", swap="Key Combination (Change Atk. Mode)",
fine="Finesse Error SFX", fine="Finesse Error SFX",
appLock="App Lock (Password: 6+26)", dataSaving="Data saving",
simpMode="Simplistic Style", simpMode="Simplistic Style",
}, },
setting_video={ setting_video={

View File

@@ -249,11 +249,10 @@ return{
reTime="Délai de démarrage", reTime="Délai de démarrage",
RS="Système de rotation", RS="Système de rotation",
layout="Disposition", layout="Disposition",
-- dataSaving="Data saving",
autoPause="Mettre en pause en cas de perte de focus", autoPause="Mettre en pause en cas de perte de focus",
swap="Combinaison de touches (changer le mode d'attaque)", swap="Combinaison de touches (changer le mode d'attaque)",
fine="Son d'erreur de Finesse", fine="Son d'erreur de Finesse",
appLock="Verrouillage d'appli (MDP : 6+26)", -- dataSaving="Data saving",
-- simpMode="Simple mode", -- simpMode="Simple mode",
}, },
setting_video={ setting_video={

View File

@@ -278,11 +278,10 @@ return{
reTime="Demora iniciação", reTime="Demora iniciação",
RS="Sistema de rotação", RS="Sistema de rotação",
layout="Layout", layout="Layout",
-- dataSaving="Data saving",
autoPause="Pausar quando foco for perco", autoPause="Pausar quando foco for perco",
swap="Combinação de tecla(Mudar modo de atk)", swap="Combinação de tecla(Mudar modo de atk)",
fine="Som Falha de destreza", fine="Som Falha de destreza",
appLock="App Lock (Senha: 6+26)", -- dataSaving="Data saving",
-- simpMode="Simple mode", -- simpMode="Simple mode",
}, },
setting_video={ setting_video={

View File

@@ -255,11 +255,10 @@ return{
reTime="Retraso de Inicio", reTime="Retraso de Inicio",
RS="Sistema de Rotación", RS="Sistema de Rotación",
layout="Diseño", layout="Diseño",
-- dataSaving="Data saving",
autoPause="Pausar cuando la ventana no está enfocada", autoPause="Pausar cuando la ventana no está enfocada",
swap="Combinación de Teclas (Cambiar Modo de Ataque)", swap="Combinación de Teclas (Cambiar Modo de Ataque)",
fine="Sonido de Error de Finesse", fine="Sonido de Error de Finesse",
appLock="Bloqueo de App (Contraseña: 6+26)", -- dataSaving="Data saving",
simpMode="Modo Sencillo", simpMode="Modo Sencillo",
}, },
setting_video={ setting_video={

View File

@@ -134,11 +134,10 @@ return{
reTime="3-2-1", reTime="3-2-1",
RS="''?", RS="''?",
layout="=-=-=", layout="=-=-=",
dataSaving="XX.",
autoPause="A||", autoPause="A||",
swap="=+=+=", swap="=+=+=",
fine="12 X 21", fine="12 X 21",
appLock="?XX(=6+26)", dataSaving="XX.",
simpMode=".", simpMode=".",
}, },
setting_video={ setting_video={

View File

@@ -277,11 +277,10 @@ return{
reTime="开局等待时间", reTime="开局等待时间",
RS="旋转系统", RS="旋转系统",
layout="外观", layout="外观",
dataSaving="省流模式",
autoPause="失去焦点自动暂停", autoPause="失去焦点自动暂停",
swap="组合键切换攻击模式", swap="组合键切换攻击模式",
fine="极简操作提示音", fine="极简操作提示音",
appLock="软件锁(密码6+26)", dataSaving="省流模式",
simpMode="简洁模式", simpMode="简洁模式",
}, },
setting_video={ setting_video={

View File

@@ -10,7 +10,7 @@ local shadePhase1,shadePhase2
local progress=0 local progress=0
local studioLogo--Studio logo text object local studioLogo--Studio logo text object
local logoColor1,logoColor2 local logoColor1,logoColor2
local skip,locked local skip
local light={} local light={}
for i=0,26 do for i=0,26 do
@@ -21,13 +21,6 @@ end
for _=1,3 do for _=1,3 do
light[math.random(7,25)*3]=true light[math.random(7,25)*3]=true
end end
local function switchLight(i)
light[3*i]=not light[3*i]
if light[6*3]and light[26*3]then
locked=false
skip=0
end
end
local function upFloor() local function upFloor()
progress=progress+1 progress=progress+1
@@ -212,9 +205,8 @@ function scene.sceneInit()
shadePhase1=6.26*math.random() shadePhase1=6.26*math.random()
shadePhase2=6.26*math.random() shadePhase2=6.26*math.random()
skip=0--Skip time skip=0--Skip time
locked=SETTING.appLock
consoleLaunchKey=0 consoleLaunchKey=0
if not locked then light[6*3],light[26*3]=true,true end light[6*3],light[26*3]=true,true
kb.setKeyRepeat(false) kb.setKeyRepeat(false)
end end
function scene.sceneBack() function scene.sceneBack()
@@ -226,21 +218,11 @@ function scene.keyDown(key)
SCN.back() SCN.back()
elseif key=="s"then elseif key=="s"then
skip=999 skip=999
elseif locked and #key==1 and key:byte()>=97 and key:byte()<=122 then
switchLight(key:byte()-96)
else else
skip=skip+1 skip=skip+1
end end
end end
function scene.mouseDown(x,y) function scene.mouseDown()
if locked then
for i=1,27 do
if(x-light[3*i-2])^2+(y-light[3*i-1])^2<=626 then
switchLight(i)
return
end
end
end
scene.keyDown("mouse") scene.keyDown("mouse")
end end
scene.touchDown=scene.mouseDown scene.touchDown=scene.mouseDown
@@ -251,23 +233,21 @@ function scene.update(dt)
if blackTime>0 then if blackTime>0 then
blackTime=blackTime-dt blackTime=blackTime-dt
end end
if not locked then if progress<25 then
if progress<25 then local p=progress
local p=progress repeat
repeat loadingThread()
loadingThread() until LOADED or skip<=0 or progress~=p
until LOADED or skip<=0 or progress~=p if skip>0 then skip=skip-1 end
if skip>0 then skip=skip-1 end else
else openTime=openTime+dt
openTime=openTime+dt if skip>0 then
if skip>0 then openTime=openTime+.26
openTime=openTime+.26 skip=skip-1
skip=skip-1 end
end if openTime>=3.26 and not SCN.swapping then
if openTime>=3.26 and not SCN.swapping then SCN.swapTo('intro')
SCN.swapTo('intro') love.keyboard.setKeyRepeat(true)
love.keyboard.setKeyRepeat(true)
end
end end
end end
end end
@@ -345,7 +325,7 @@ function scene.draw()
gc.setColor(1,1,1) gc.setColor(1,1,1)
gc.draw(TEXTURE.pixelNum[d2],1040,40,nil,8) gc.draw(TEXTURE.pixelNum[d2],1040,40,nil,8)
gc.draw(TEXTURE.pixelNum[d1],1100,40,nil,8) gc.draw(TEXTURE.pixelNum[d1],1100,40,nil,8)
if not locked and progress~=25 then if progress~=25 then
setFont(40) setFont(40)
gc.setColor(1,.9,.8) gc.setColor(1,.9,.8)
gc.print("",1150,26) gc.print("",1150,26)

View File

@@ -30,11 +30,10 @@ scene.widgetList={
WIDGET.newSlider{name="reTime", x=350, y=340, w=300,unit=10,disp=SETval("reTime"),code=SETsto("reTime"),show=function(S)return(.5+S.disp()*.25).."s"end}, WIDGET.newSlider{name="reTime", x=350, y=340, w=300,unit=10,disp=SETval("reTime"),code=SETsto("reTime"),show=function(S)return(.5+S.disp()*.25).."s"end},
WIDGET.newSelector{name="RS", x=500, y=420, w=300,color='S',list={'TRS','SRS','C2','C2sym','Classic','None'},disp=SETval("RS"),code=SETsto("RS")}, WIDGET.newSelector{name="RS", x=500, y=420, w=300,color='S',list={'TRS','SRS','C2','C2sym','Classic','None'},disp=SETval("RS"),code=SETsto("RS")},
WIDGET.newButton{name="layout", x=250, y=540, w=200,h=70,font=35, code=goScene"setting_skin"}, WIDGET.newButton{name="layout", x=250, y=540, w=200,h=70,font=35, code=goScene"setting_skin"},
WIDGET.newSwitch{name="dataSaving", x=750, y=550, font=20,disp=SETval("dataSaving"), code=function()SETTING.dataSaving=not SETTING.dataSaving if not SETTING.dataSaving then USERS.forceFreshAvatar()end end},
WIDGET.newSwitch{name="autoPause", x=1060, y=310, font=20,disp=SETval("autoPause"), code=SETrev("autoPause")}, WIDGET.newSwitch{name="autoPause", x=1060, y=310, font=20,disp=SETval("autoPause"), code=SETrev("autoPause")},
WIDGET.newSwitch{name="swap", x=1060, y=370, font=20,disp=SETval("swap"), code=SETrev("swap")}, WIDGET.newSwitch{name="swap", x=1060, y=370, font=20,disp=SETval("swap"), code=SETrev("swap")},
WIDGET.newSwitch{name="fine", x=1060, y=430, font=20,disp=SETval("fine"), code=function()SETTING.fine=not SETTING.fine if SETTING.fine then SFX.play('finesseError',.6)end end}, WIDGET.newSwitch{name="fine", x=1060, y=430, font=20,disp=SETval("fine"), code=function()SETTING.fine=not SETTING.fine if SETTING.fine then SFX.play('finesseError',.6)end end},
WIDGET.newSwitch{name="appLock", x=1060, y=490, font=20,disp=SETval("appLock"), code=SETrev("appLock")}, WIDGET.newSwitch{name="dataSaving", x=1060, y=490, font=20,disp=SETval("dataSaving"), code=function()SETTING.dataSaving=not SETTING.dataSaving if not SETTING.dataSaving then USERS.forceFreshAvatar()end end},
WIDGET.newSwitch{name="simpMode", x=1060, y=550, font=25,disp=SETval("simpMode"), WIDGET.newSwitch{name="simpMode", x=1060, y=550, font=25,disp=SETval("simpMode"),
code=function() code=function()
SETTING.simpMode=not SETTING.simpMode SETTING.simpMode=not SETTING.simpMode