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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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