Merge commit 'f8f115de10b4ef7818cf58bc03c9d75700e425b0' into test-new-mode-system

This commit is contained in:
MrZ626
2021-12-27 14:26:32 +08:00
62 changed files with 953 additions and 655 deletions

View File

@@ -232,7 +232,7 @@ local commands={}do
commands.mv={
code=function(arg)
--Check arguments
arg=STRING.split(arg," ")
arg=arg:split(" ")
if #arg>2 then
log{C.lY,"Warning: file names must have no spaces"}
return
@@ -647,6 +647,11 @@ local commands={}do
scene='app_triple',
description="A Match-3 Game. Original idea from Sanlitun / Triple Town"
},
{
code="sw",
scene='app_stopwatch',
description="A stopwatch"
},
{
code="spin",
scene='app_spin',
@@ -862,7 +867,7 @@ local commands={}do
--Network
commands.switchhost={
code=function(arg)
arg=STRING.split(arg," ")
arg=arg:split(" ")
if arg[1]and #arg<=3 then
WS.switchHost(unpack(arg))
log{C.Y,"Host switched"}

View File

@@ -174,7 +174,7 @@ function scene.update(dt)
end
end
life1=life1*.7+life*.3
life1=MATH.expApproach(life1,life,dt*16)
if play then
if inv>0 then

View File

@@ -280,13 +280,13 @@ function scene.touchDown(x)
end
end
function scene.update()
function scene.update(dt)
if state==1 then
local t=TIME()
time=t-startTime
local v=0
for i=2,20 do v=v+i*(i-1)*.3/(t-keyTime[i])end
speed=speed*.99+v*.01
speed=MATH.expApproach(speed,v,dt)
if speed>maxSpeed then maxSpeed=speed end
if arcade then

View File

@@ -171,10 +171,10 @@ end
scene.widgetList={
WIDGET.newButton{name='reset', x=160,y=100,w=180,h=100,color='lG',font=50,fText=CHAR.icon.retry_spin,code=pressKey'space',hideF=function()return state==0 end},
WIDGET.newSlider{name='rank', x=130,y=250,lim=105,w=150,unit=3,show=false,font=40,disp=function()return rank-3 end,code=function(v)rank=v+3 end,hideF=function()return state>0 end},
WIDGET.newSwitch{name='invis', x=240,y=330,lim=200,font=40,disp=function()return invis end, code=pressKey'q',hideF=function()return state==1 end},
WIDGET.newSlider{name='rank', x=130,y=250,lim=105,w=150,axis={3,6,1},show=false,font=40,disp=function()return rank end,code=function(v)rank=v end,hideF=function()return state>0 end},
WIDGET.newSwitch{name='invis', x=240,y=330,lim=200,font=40,disp=function()return invis end,code=pressKey'q',hideF=function()return state==1 end},
WIDGET.newSwitch{name='disappear',x=240,y=420,lim=200,font=40,disp=function()return disappear end,code=pressKey'w',hideF=function()return state==1 end},
WIDGET.newSwitch{name='tapFX', x=240,y=510,lim=200,font=40,disp=function()return tapFX end, code=pressKey'e',hideF=function()return state==1 end},
WIDGET.newSwitch{name='tapFX', x=240,y=510,lim=200,font=40,disp=function()return tapFX end,code=pressKey'e',hideF=function()return state==1 end},
WIDGET.newButton{name='back', x=1140,y=640,w=170,h=80,sound='back',font=60,fText=CHAR.icon.back,code=backScene},
}

View File

@@ -0,0 +1,70 @@
local state
local pressTime
local releaseTime
local time1,time2
local function press()
if state==0 then
state=1
pressTime=TIME()
releaseTime=false
time2=STRING.time(0)
elseif state==2 then
state=0
end
end
local function release()
if state==1 then
state=2
releaseTime=TIME()
end
end
local scene={}
function scene.sceneInit()
state=0
time1=STRING.time(0)
time2=STRING.time(0)
end
function scene.mouseDown()
press()
end
function scene.mouseUp()
release()
end
function scene.keyDown(key,isRep)
if isRep then return end
if key=='escape'then
SCN.back()
else
press()
end
end
function scene.keyUp()
release()
end
function scene.update()
if state~=0 then
time1=STRING.time(TIME()-pressTime)
if releaseTime then
time2=STRING.time(TIME()-releaseTime)
end
end
end
function scene.draw()
FONT.set(60)
mStr(CHAR.icon.import,340,230)
mStr(CHAR.icon.export,940,230)
mStr(time1,340,300)
mStr(time2,940,300)
end
scene.widgetList={
WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,font=60,fText=CHAR.icon.back,code=backScene},
}
return scene

View File

@@ -31,11 +31,11 @@ function scene.keyDown(key,isRep)
end
end
function scene.update()
function scene.update(dt)
local t=TIME()
local v=0
for i=2,40 do v=v+i*(i-1)*.075/(t-keyTime[i])end
speed=speed*.99+v*.01
speed=MATH.expApproach(speed,v,dt)
if speed>maxSpeed then
maxSpeed=speed
end

View File

@@ -103,7 +103,7 @@ function scene.keyDown(key,isRep)
MES.new('check',text.exportSuccess)
elseif key=='v'and kb.isDown('lctrl','rctrl')or key=='cV'then
local str=sys.getClipboardText()
local args=STRING.split(str:sub((str:find(":")or 0)+1),"!")
local args=str:sub((str:find(":")or 0)+1):split("!")
if #args<4 then goto THROW_fail end
if not(
DATA.pasteQuestArgs(args[1])and
@@ -226,10 +226,10 @@ scene.widgetList={
--Next & Hold
WIDGET.newSelector{name='holdMode', x=310, y=890, w=300,color='lY',list=sList.holdMode,disp=CUSval('holdMode'),code=CUSsto('holdMode'),hideF=function()return CUSTOMENV.holdCount==0 end},
WIDGET.newSlider{name='nextCount', x=140, y=960, lim=130,w=180,unit=6,disp=CUSval('nextCount'),code=CUSsto('nextCount')},
WIDGET.newSlider{name='holdCount', x=140, y=1030,lim=130,w=180,unit=6,disp=CUSval('holdCount'),code=CUSsto('holdCount')},
WIDGET.newSwitch{name='infHold', x=560, y=960, lim=200, disp=CUSval('infHold'),code=CUSrev('infHold'),hideF=function()return CUSTOMENV.holdCount==0 end},
WIDGET.newSwitch{name='phyHold', x=560, y=1030,lim=200, disp=CUSval('phyHold'),code=CUSrev('phyHold'),hideF=function()return CUSTOMENV.holdCount==0 end},
WIDGET.newSlider{name='nextCount', x=140, y=960, lim=130,w=180,axis={0,6,1},disp=CUSval('nextCount'),code=CUSsto('nextCount')},
WIDGET.newSlider{name='holdCount', x=140, y=1030,lim=130,w=180,axis={0,6,1},disp=CUSval('holdCount'),code=CUSsto('holdCount')},
WIDGET.newSwitch{name='infHold', x=560, y=960, lim=200, disp=CUSval('infHold'),code=CUSrev('infHold'),hideF=function()return CUSTOMENV.holdCount==0 end},
WIDGET.newSwitch{name='phyHold', x=560, y=1030,lim=200, disp=CUSval('phyHold'),code=CUSrev('phyHold'),hideF=function()return CUSTOMENV.holdCount==0 end},
--BG & BGM
WIDGET.newSelector{name='bg', x=840, y=1090,w=250,color='Y',list=BG.getList(),disp=CUSval('bg'),code=function(i)CUSTOMENV.bg=i BG.set(i)end},

View File

@@ -9,9 +9,9 @@ local scene={}
function scene.sceneInit()
BGcolor=rnd()>.026 and{.3,.5,.9}or{.62,.3,.926}
sysAndScn=SYSTEM.."-"..VERSION.string.." scene:"..Z.errData[#Z.errData].scene
sysAndScn=SYSTEM.."-"..VERSION.string.." scene:"..Z.getErr('#').scene
errorText=LOADED and text.errorMsg or"An error has occurred while the game was loading.\nAn error log has been created so you can send it to the author."
errorShot,errorInfo=Z.errData[#Z.errData].shot,Z.errData[#Z.errData].mes
errorShot,errorInfo=Z.getErr('#').shot,Z.getErr('#').mes
NET.wsclose_app()
NET.wsclose_user()
NET.wsclose_play()

View File

@@ -298,7 +298,7 @@ local function _update_common(dt)
end
--Warning check
checkWarning()
checkWarning(dt)
end
function scene.update(dt)
trigGameRate=trigGameRate+gameRate

View File

@@ -2,7 +2,7 @@ local scene={}
function scene.sceneInit()
BG.set('cubes')
WIDGET.active.texts:setTexts(STRING.split(require"parts.updateLog","\n"))
WIDGET.active.texts:setTexts(require"parts.updateLog":split("\n"))
end
function scene.wheelMoved(_,y)

View File

@@ -42,7 +42,7 @@ end
local function _setLang(lid)
SETTING.locale=lid
applyLanguage()
applySettings()
TEXT.clear()
TEXT.show(langList[lid],640,360,100,'appear',.626)
collectgarbage()

View File

@@ -3,7 +3,7 @@ function scene.sceneInit()
BG.set('cubes')
local fileData=love.filesystem.read("legals.md")
if fileData then
WIDGET.active.texts:setTexts(STRING.split(fileData,'\n'))
WIDGET.active.texts:setTexts(fileData:split('\n'))
else
WIDGET.active.texts:setTexts{"[legals.md not found]"}
end

View File

@@ -134,7 +134,7 @@ function scene.update(dt)
end
local L=scene.widgetList
for i=1,8 do
L[i].x=L[i].x*.9+(widgetX0[i]-400+(WIDGET.isFocus(L[i])and(i<5 and 100 or -100)or 0))*.1
L[i].x=MATH.expApproach(L[i].x,(widgetX0[i]-400+(WIDGET.isFocus(L[i])and(i<5 and 100 or -100)or 0)),dt*12)
end
end

View File

@@ -4,7 +4,7 @@ function scene.sceneInit()
BG.set('cubes')
local fileData=love.filesystem.read('parts/language/manual_'..(SETTING.locale:find'zh'and'zh'or'en')..'.txt')
if fileData then
WIDGET.active.texts:setTexts(STRING.split(fileData,'\n'))
WIDGET.active.texts:setTexts(fileData:split('\n'))
else
WIDGET.active.texts:setTexts{"[manual file not found]"}
end

View File

@@ -33,7 +33,7 @@ local function _toggleMod(M,back)
_remMod(M)
end
if M.unranked then
SFX.play('move',.6)
SFX.play('touch',.6)
SFX.play('lock')
else
SFX.play('touch')

View File

@@ -24,6 +24,7 @@ local author={
sakura="ZUN & C₂₉H₂₅N₃O₅",
["1980s"]="C₂₉H₂₅N₃O₅",
malate="ZUN & C₂₉H₂₅N₃O₅",
lounge="Hailey (cudsys) & MrZ",
}
local scene={}
@@ -44,12 +45,12 @@ function scene.keyDown(key,isRep)
if key=='down'then
if S<#bgmList then
selected=S+1
SFX.play('move',.7)
SFX.play('touch',.7)
end
elseif key=='up'then
if S>1 then
selected=S-1
SFX.play('move',.7)
SFX.play('touch',.7)
end
elseif not isRep then
if key=='return'or key=='space'then

View File

@@ -246,7 +246,7 @@ function scene.update(dt)
for p=1,#PLAYERS do PLAYERS[p]:update(dt)end
--Warning check
checkWarning()
checkWarning(dt)
--Upload stream
if not NET.spectate and P1.frameRun-lastUpstreamTime>8 then
@@ -265,7 +265,7 @@ function scene.update(dt)
lastUpstreamTime=PLAYERS[1].alive and P1.frameRun or 1e99
end
else
NETPLY.update()
NETPLY.update(dt)
end
if newMessageTimer>0 then
newMessageTimer=newMessageTimer-1

View File

@@ -102,10 +102,10 @@ scene.widgetList={
--Next & Hold
WIDGET.newSelector{name='holdMode', x=310, y=890, w=300,color='lY',list=sList.holdMode,disp=ROOMval('holdMode'),code=ROOMval('holdMode'),hideF=function()return CUSTOMENV.holdCount==0 end},
WIDGET.newSlider{name='nextCount', x=140, y=960, lim=130,w=200,unit=6,disp=ROOMval('nextCount'),code=ROOMsto('nextCount')},
WIDGET.newSlider{name='holdCount', x=140, y=1030,lim=130,w=200,unit=6,disp=ROOMval('holdCount'),code=ROOMsto('holdCount')},
WIDGET.newSwitch{name='infHold', x=560, y=960, lim=200, disp=ROOMval('infHold'),code=ROOMrev('infHold'),hideF=function()return ROOMENV.holdCount==0 end},
WIDGET.newSwitch{name='phyHold', x=560, y=1030,lim=200, disp=ROOMval('phyHold'),code=ROOMrev('phyHold'),hideF=function()return ROOMENV.holdCount==0 end},
WIDGET.newSlider{name='nextCount', x=140, y=960, lim=130,w=200,axis={0,6,1},disp=ROOMval('nextCount'),code=ROOMsto('nextCount')},
WIDGET.newSlider{name='holdCount', x=140, y=1030,lim=130,w=200,axis={0,6,1},disp=ROOMval('holdCount'),code=ROOMsto('holdCount')},
WIDGET.newSwitch{name='infHold', x=560, y=960, lim=200, disp=ROOMval('infHold'),code=ROOMrev('infHold'),hideF=function()return ROOMENV.holdCount==0 end},
WIDGET.newSwitch{name='phyHold', x=560, y=1030,lim=200, disp=ROOMval('phyHold'),code=ROOMrev('phyHold'),hideF=function()return ROOMENV.holdCount==0 end},
}
return scene

View File

@@ -47,7 +47,7 @@ function scene.sceneInit()
(S.atk+S.dig)/S.time*60,--ADPM
S.atk/S.time*60, --AtkPM
S.send/S.time*60, --SendPM
S.piece/S.time*24, --LinePM
S.piece/S.time*24, --Line'PM
S.dig/S.time*60, --DigPM
}
val={1/80,1/80,1/80,1/60,1/100,1/40}

View File

@@ -10,8 +10,8 @@ function scene.sceneInit()
end
else
MES.update(1e99)
SETTING.powerInfo=false
SETTING.tapFX=false
Z.setPowerInfo(false)
Z.setClickFX(false)
VERSION.string=""
MES.new('error',"Please swipe up or press Home button to quit Techmino on iOS",1e99)
end

View File

@@ -139,8 +139,8 @@ end
scene.widgetList={
listBox,
WIDGET.newButton{name='export',x=180,y=640,w=140,h=80,color='lG',code=pressKey'cC',font=50,fText=CHAR.icon.export},
WIDGET.newButton{name='import',x=350,y=640,w=140,h=80,color='lN',code=pressKey'cV',font=50,fText=CHAR.icon.import},
WIDGET.newButton{name='import',x=180,y=640,w=140,h=80,color='lB',code=pressKey'cV',font=50,fText=CHAR.icon.import},
WIDGET.newButton{name='export',x=350,y=640,w=140,h=80,color='lR',code=pressKey'cC',font=50,fText=CHAR.icon.export},
WIDGET.newButton{name='play', x=700,y=640,w=170,h=80,color='lY',code=pressKey'return',font=65,fText=CHAR.icon.play},
WIDGET.newButton{name='delete',x=850,y=640,w=80,h=80,color='lR',code=pressKey'delete',font=50,fText=CHAR.icon.trash},
WIDGET.newButton{name='back', x=1140,y=640,w=170,h=80,sound='back',font=60,fText=CHAR.icon.back,code=backScene},

View File

@@ -59,7 +59,7 @@ scene.widgetList={
local D=_parseCB()
if D then
TABLE.update(D,SETTING)
applyAllSettings()
applySettings()
saveSettings()
MES.new('check',text.importSuccess)
else

View File

@@ -89,15 +89,15 @@ scene.widgetList={
WIDGET.newText{name='title', x=100, y=50,lim=500,font=70,align='L'},
WIDGET.newText{name='preview', x=520, y=610,font=40,align='R'},
WIDGET.newSlider{name='das', x=250, y=190,lim=230,w=600,unit=20,disp=SETval('das'), show=_sliderShow,code=SETsto('das')},
WIDGET.newSlider{name='arr', x=250, y=260,lim=230,w=525,unit=15,disp=SETval('arr'), show=_sliderShow,code=SETsto('arr')},
WIDGET.newSlider{name='sddas', x=250, y=330,lim=230,w=350,unit=10,disp=SETval('sddas'), show=_sliderShow,code=SETsto('sddas')},
WIDGET.newSlider{name='sdarr', x=250, y=400,lim=230,w=140,unit=4, disp=SETval('sdarr'), show=_sliderShow,code=SETsto('sdarr')},
WIDGET.newSlider{name='dascut', x=250, y=470,lim=230,w=600,unit=20,disp=SETval('dascut'), show=_sliderShow,code=SETsto('dascut')},
WIDGET.newSlider{name='dropcut',x=250, y=540,lim=230,w=300,unit=10,disp=SETval('dropcut'),show=_sliderShow,code=SETsto('dropcut')},
WIDGET.newSwitch{name='ihs', x=1100, y=260,lim=300, disp=SETval('ihs'), code=SETrev('ihs')},
WIDGET.newSwitch{name='irs', x=1100, y=330,lim=300, disp=SETval('irs'), code=SETrev('irs')},
WIDGET.newSwitch{name='ims', x=1100, y=400,lim=300, disp=SETval('ims'), code=SETrev('ims')},
WIDGET.newSlider{name='das', x=250, y=190,lim=230,w=600,axis={0,20,1},disp=SETval('das'), show=_sliderShow,code=SETsto('das')},
WIDGET.newSlider{name='arr', x=250, y=260,lim=230,w=525,axis={0,15,1},disp=SETval('arr'), show=_sliderShow,code=SETsto('arr')},
WIDGET.newSlider{name='sddas', x=250, y=330,lim=230,w=350,axis={0,10,1},disp=SETval('sddas'), show=_sliderShow,code=SETsto('sddas')},
WIDGET.newSlider{name='sdarr', x=250, y=400,lim=230,w=140,axis={0,4,1}, disp=SETval('sdarr'), show=_sliderShow,code=SETsto('sdarr')},
WIDGET.newSlider{name='dascut', x=250, y=470,lim=230,w=600,axis={0,20,1},disp=SETval('dascut'), show=_sliderShow,code=SETsto('dascut')},
WIDGET.newSlider{name='dropcut',x=250, y=540,lim=230,w=300,axis={0,10,1},disp=SETval('dropcut'),show=_sliderShow,code=SETsto('dropcut')},
WIDGET.newSwitch{name='ihs', x=1100, y=260,lim=300, disp=SETval('ihs'), code=SETrev('ihs')},
WIDGET.newSwitch{name='irs', x=1100, y=330,lim=300, disp=SETval('irs'), code=SETrev('irs')},
WIDGET.newSwitch{name='ims', x=1100, y=400,lim=300, disp=SETval('ims'), code=SETrev('ims')},
WIDGET.newButton{name='reset', x=160, y=640,w=200,h=100,color='lR',font=40,
code=function()
local _=SETTING

View File

@@ -39,17 +39,17 @@ scene.widgetList={
WIDGET.newButton{name='style', x=250, y=540, w=200,h=70,font=35,code=goScene'setting_skin'},
WIDGET.newButton{name='ctrl', x=290, y=220, w=320,h=80,font=35,code=goScene'setting_control'},
WIDGET.newButton{name='key', x=640, y=220, w=320,h=80,color=MOBILE and'dH',font=35, code=goScene'setting_key'},
WIDGET.newButton{name='touch', x=990, y=220, w=320,h=80,color=not MOBILE and'dH',font=35, code=goScene'setting_touch',hideF=function()return not SETTING.VKSwitch end},
WIDGET.newSwitch{name='showVK', x=1100, y=150, lim=400, disp=SETval('VKSwitch'), code=SETrev('VKSwitch')},
WIDGET.newSlider{name='reTime', x=330, y=320, w=300,lim=180,unit=10,disp=SETval('reTime'), code=SETsto('reTime'),show=function(S)return(.5+S.disp()*.25).."s"end},
WIDGET.newSelector{name='RS', x=300, y=420, w=300,color='S', disp=SETval('RS'), code=SETsto('RS'),list={'TRS','SRS','SRS_plus','SRS_X','BiRS','ARS_Z','DRS_weak','ASC','ASC_plus','C2','C2_sym','Classic','Classic_plus','None','None_plus'}},
WIDGET.newSelector{name='menuPos',x=980, y=320, w=300,color='O', disp=SETval('menuPos'), code=SETsto('menuPos'),list={'left','middle','right'}},
WIDGET.newSwitch{name='sysCursor',x=1060, y=390, lim=580, disp=SETval('sysCursor'),code=function()SETTING.sysCursor=not SETTING.sysCursor applyCursor()end},
WIDGET.newSwitch{name='autoPause',x=1060, y=450, lim=580, disp=SETval('autoPause'),code=SETrev('autoPause')},
WIDGET.newSwitch{name='autoSave', x=1060, y=500, lim=580, disp=SETval('autoSave'), code=SETrev('autoSave')},
WIDGET.newSwitch{name='autoLogin',x=960, y=580, lim=480, disp=SETval('autoLogin'),code=SETrev('autoLogin')},
WIDGET.newSwitch{name='simpMode', x=960, y=640, lim=480, disp=SETval('simpMode'),
WIDGET.newButton{name='key', x=640, y=220, w=320,h=80,color=MOBILE and'dH',font=35, code=goScene'setting_key'},
WIDGET.newButton{name='touch', x=990, y=220, w=320,h=80,color=not MOBILE and'dH',font=35, code=goScene'setting_touch',hideF=function()return not SETTING.VKSwitch end},
WIDGET.newSwitch{name='showVK', x=1100, y=150, lim=400, disp=SETval('VKSwitch'), code=SETrev('VKSwitch')},
WIDGET.newSlider{name='reTime', x=330, y=320, w=300,lim=180,axis={.5,3,.25},disp=SETval('reTime'), code=SETsto('reTime'),show=SETval('reTime')},
WIDGET.newSelector{name='RS', x=300, y=420, w=300,color='S', disp=SETval('RS'), code=SETsto('RS'),list={'TRS','SRS','SRS_plus','SRS_X','BiRS','ARS_Z','DRS_weak','ASC','ASC_plus','C2','C2_sym','Classic','Classic_plus','None','None_plus'}},
WIDGET.newSelector{name='menuPos',x=980, y=320, w=300,color='O', disp=SETval('menuPos'), code=SETsto('menuPos'),list={'left','middle','right'}},
WIDGET.newSwitch{name='sysCursor',x=1060, y=400, lim=580, disp=SETval('sysCursor'),code=function()SETTING.sysCursor=not SETTING.sysCursor applySettings()end},
WIDGET.newSwitch{name='autoPause',x=1060, y=470, lim=580, disp=SETval('autoPause'),code=SETrev('autoPause')},
WIDGET.newSwitch{name='autoSave', x=1060, y=540, lim=580, disp=SETval('autoSave'), code=SETrev('autoSave')},
WIDGET.newSwitch{name='autoLogin',x=960, y=610, lim=480, disp=SETval('autoLogin'),code=SETrev('autoLogin')},
WIDGET.newSwitch{name='simpMode', x=960, y=670, lim=480, disp=SETval('simpMode'),
code=function()
SETTING.simpMode=not SETTING.simpMode
for i=1,#SCN.stack,2 do

View File

@@ -22,9 +22,9 @@ function scene.sceneInit()
end
end
function scene.update()
function scene.update(dt)
for i=1,7 do
minoRot[i]=minoRot[i]*.8+minoRot0[i]*.2
minoRot[i]=MATH.expApproach(minoRot[i],minoRot0[i],dt*12)
end
end
function scene.draw()

View File

@@ -84,14 +84,14 @@ scene.widgetList={
WIDGET.newButton{name='game', x=200, y=80,w=240,h=80,color='lC',font=35,code=swapScene('setting_game','swipeR')},
WIDGET.newButton{name='graphic', x=1080,y=80,w=240,h=80,color='lC',font=35,code=swapScene('setting_video','swipeL')},
WIDGET.newSlider{name='mainVol', x=300, y=170,w=420,lim=220,color='lG',disp=SETval('mainVol'), code=function(v)SETTING.mainVol=v love.audio.setVolume(SETTING.mainVol)end},
WIDGET.newSlider{name='bgm', x=300, y=240,w=420,lim=220,color='lG',disp=SETval('bgm'), code=function(v)SETTING.bgm=v BGM.setVol(SETTING.bgm)end},
WIDGET.newSlider{name='sfx', x=300, y=310,w=420,lim=220,color='lC',disp=SETval('sfx'), code=function(v)SETTING.sfx=v SFX.setVol(SETTING.sfx)end, change=function()SFX.play('warn_1')end},
WIDGET.newSlider{name='stereo', x=300, y=380,w=420,lim=220,color='lC',disp=SETval('stereo'), code=function(v)SETTING.stereo=v SFX.setStereo(SETTING.stereo)end,change=function()SFX.play('move',1,-1)SFX.play('lock',1,1)end,hideF=function()return SETTING.sfx==0 end},
WIDGET.newSlider{name='spawn', x=300, y=450,w=420,lim=220,color='lC',disp=SETval('sfx_spawn'), code=function(v)SETTING.sfx_spawn=v end, change=function()SFX.fplay('spawn_'..math.random(7),SETTING.sfx_spawn)end,},
WIDGET.newSlider{name='warn', x=300, y=520,w=420,lim=220,color='lC',disp=SETval('sfx_warn'), code=function(v)SETTING.sfx_warn=v end, change=function()SFX.fplay('warn_beep',SETTING.sfx_warn)end},
WIDGET.newSlider{name='vib', x=300, y=590,w=420,lim=220,color='lN',disp=SETval('vib'),unit=10,code=function(v)SETTING.vib=v end, change=function()if SETTING.vib>0 then VIB(SETTING.vib+2)end end},
WIDGET.newSlider{name='voc', x=300, y=660,w=420,lim=220,color='lN',disp=SETval('voc'), code=function(v)SETTING.voc=v VOC.setVol(SETTING.voc)end, change=function()VOC.play('test')end},
WIDGET.newSlider{name='mainVol', x=300, y=170,w=420,lim=220,color='lG',disp=SETval('mainVol'), code=function(v)SETTING.mainVol=v love.audio.setVolume(SETTING.mainVol)end},
WIDGET.newSlider{name='bgm', x=300, y=240,w=420,lim=220,color='lG',disp=SETval('bgm'), code=function(v)SETTING.bgm=v BGM.setVol(SETTING.bgm)end},
WIDGET.newSlider{name='sfx', x=300, y=310,w=420,lim=220,color='lC',disp=SETval('sfx'), code=function(v)SETTING.sfx=v SFX.setVol(SETTING.sfx)end, change=function()SFX.play('warn_1')end},
WIDGET.newSlider{name='stereo', x=300, y=380,w=420,lim=220,color='lC',disp=SETval('stereo'), code=function(v)SETTING.stereo=v SFX.setStereo(SETTING.stereo)end,change=function()SFX.play('touch',1,-1)SFX.play('lock',1,1)end,hideF=function()return SETTING.sfx==0 end},
WIDGET.newSlider{name='spawn', x=300, y=450,w=420,lim=220,color='lC',disp=SETval('sfx_spawn'), code=function(v)SETTING.sfx_spawn=v end, change=function()SFX.fplay('spawn_'..math.random(7),SETTING.sfx_spawn)end,},
WIDGET.newSlider{name='warn', x=300, y=520,w=420,lim=220,color='lC',disp=SETval('sfx_warn'), code=function(v)SETTING.sfx_warn=v end, change=function()SFX.fplay('warn_beep',SETTING.sfx_warn)end},
WIDGET.newSlider{name='vib', x=300, y=590,w=420,lim=220,color='lN',disp=SETval('vib'),axis={0,10,1},code=function(v)SETTING.vib=v end, change=function()if SETTING.vib>0 then VIB(SETTING.vib+2)end end},
WIDGET.newSlider{name='voc', x=300, y=660,w=420,lim=220,color='lN',disp=SETval('voc'), code=function(v)SETTING.voc=v VOC.setVol(SETTING.voc)end, change=function()VOC.play('test')end},
WIDGET.newSwitch{name='autoMute', x=1150,y=180,lim=380,disp=SETval('autoMute'),code=SETrev('autoMute')},
WIDGET.newSwitch{name='fine', x=1150,y=250,lim=380,disp=SETval('fine'),code=function()SETTING.fine=not SETTING.fine if SETTING.fine then SFX.play('finesseError',.6)end end},

View File

@@ -120,7 +120,7 @@ scene.widgetList={
WIDGET.newKey{name='load1', x=585,y=290,w=90,h=70,code=_load1,font=45,fText=CHAR.icon.loadOne},
WIDGET.newKey{name='save2', x=695,y=290,w=90,h=70,code=_save2,font=45,fText=CHAR.icon.saveTwo},
WIDGET.newKey{name='load2', x=805,y=290,w=90,h=70,code=_load2,font=45,fText=CHAR.icon.loadTwo},
WIDGET.newSlider{name='size', x=440,y=370,w=460,unit=19,font=40,show="vkSize",
WIDGET.newSlider{name='size', x=440,y=370,w=460,axis={0,19,1},font=40,show="vkSize",
disp=function()
return VK_ORG[selected].r/10-1
end,

View File

@@ -50,17 +50,17 @@ scene.widgetList={
WIDGET.newSwitch{name='b19', x=580, y=560, lim=230,disp=_VKAdisp(19),code=_VKAcode(19)},
WIDGET.newSwitch{name='b20', x=580, y=620, lim=230,disp=_VKAdisp(20),code=_VKAcode(20)},
WIDGET.newButton{name='norm', x=840, y=80, w=240,h=80, font=35,code=function()for i=1,20 do VK_ORG[i].ava=i<11 end end},
WIDGET.newButton{name='pro', x=1120, y=80, w=240,h=80, font=35,code=function()for i=1,20 do VK_ORG[i].ava=true end end},
WIDGET.newSwitch{name='icon', x=1150, y=240, lim=400, font=35,disp=SETval('VKIcon'),code=SETrev('VKIcon')},
WIDGET.newSlider{name='sfx', x=830, y=320, lim=160,w=400, font=35,change=function()SFX.play('virtualKey',SETTING.VKSFX)end,disp=SETval('VKSFX'),code=SETsto('VKSFX')},
WIDGET.newSlider{name='vib', x=830, y=390, lim=160,w=400,unit=6, font=35,change=function()if SETTING.vib>0 then VIB(SETTING.vib+SETTING.VKVIB)end end,disp=SETval('VKVIB'),code=SETsto('VKVIB')},
WIDGET.newSlider{name='alpha', x=830, y=460, lim=160,w=400, font=35,disp=SETval('VKAlpha'),code=SETsto('VKAlpha')},
WIDGET.newButton{name='norm', x=840, y=80, w=240,h=80, font=35,code=function()for i=1,20 do VK_ORG[i].ava=i<11 end end},
WIDGET.newButton{name='pro', x=1120, y=80, w=240,h=80, font=35,code=function()for i=1,20 do VK_ORG[i].ava=true end end},
WIDGET.newSwitch{name='icon', x=1150, y=240, lim=400, font=35,disp=SETval('VKIcon'),code=SETrev('VKIcon')},
WIDGET.newSlider{name='sfx', x=830, y=320, lim=160,w=400, font=35,change=function()SFX.play('virtualKey',SETTING.VKSFX)end,disp=SETval('VKSFX'),code=SETsto('VKSFX')},
WIDGET.newSlider{name='vib', x=830, y=390, lim=160,w=400,axis={0,6,1},font=35,change=function()if SETTING.vib>0 then VIB(SETTING.vib+SETTING.VKVIB)end end,disp=SETval('VKVIB'),code=SETsto('VKVIB')},
WIDGET.newSlider{name='alpha', x=830, y=460, lim=160,w=400, font=35,disp=SETval('VKAlpha'),code=SETsto('VKAlpha')},
WIDGET.newSwitch{name='track', x=360, y=720, lim=250, font=35,disp=SETval('VKTrack'),code=SETrev('VKTrack')},
WIDGET.newSwitch{name='dodge', x=800, y=720, lim=250, font=35,disp=SETval('VKDodge'),code=SETrev('VKDodge'),hideF=_notTrack},
WIDGET.newSlider{name='tchW', x=140, y=860, w=1000, font=35,disp=SETval('VKTchW'),code=function(i)SETTING.VKTchW=i SETTING.VKCurW=math.max(SETTING.VKCurW,i)end,hideF=_notTrack},
WIDGET.newSlider{name='curW', x=140, y=930, w=1000, font=35,disp=SETval('VKCurW'),code=function(i)SETTING.VKCurW=i SETTING.VKTchW=math.min(SETTING.VKTchW,i)end,hideF=_notTrack},
WIDGET.newSwitch{name='track', x=360, y=720, lim=250, font=35,disp=SETval('VKTrack'),code=SETrev('VKTrack')},
WIDGET.newSwitch{name='dodge', x=800, y=720, lim=250, font=35,disp=SETval('VKDodge'),code=SETrev('VKDodge'),hideF=_notTrack},
WIDGET.newSlider{name='tchW', x=140, y=860, w=1000, font=35,disp=SETval('VKTchW'),code=function(i)SETTING.VKTchW=i SETTING.VKCurW=math.max(SETTING.VKCurW,i)end,hideF=_notTrack},
WIDGET.newSlider{name='curW', x=140, y=930, w=1000, font=35,disp=SETval('VKCurW'),code=function(i)SETTING.VKCurW=i SETTING.VKTchW=math.min(SETTING.VKTchW,i)end,hideF=_notTrack},
WIDGET.newButton{name='back', x=1140, y=640, w=170,h=80,sound='back',font=60,fText=CHAR.icon.back,code=backScene},
}

View File

@@ -11,7 +11,7 @@ function scene.fileDropped(file)
if pcall(gc.newImage,file)then
love.filesystem.write('conf/customBG',file:read('data'))
SETTING.bg='custom'
applyBG()
applySettings()
else
MES.new('error',text.customBGloadFailed)
end
@@ -55,18 +55,18 @@ scene.widgetList={
WIDGET.newSwitch{name='bagLine', x=380,y=390,lim=300,disp=SETval('bagLine'),code=SETrev('bagLine')},
WIDGET.newSelector{name='ghostType', x=915,y=180, w=350,list={'color','gray','colorCell','grayCell','colorLine','grayLine'},disp=SETval('ghostType'),code=SETsto('ghostType')},
WIDGET.newSlider{name='ghost', x=740,y=240,lim=280,w=350,unit=1,disp=SETval('ghost'), show="percent",code=SETsto('ghost')},
WIDGET.newSlider{name='center', x=740,y=300,lim=280,w=350,unit=1,disp=SETval('center'), show="percent",code=SETsto('center')},
WIDGET.newSlider{name='grid', x=740,y=360,lim=280,w=350,unit=.4,disp=SETval('grid'), show="percent",code=SETsto('grid')},
WIDGET.newSlider{name='lineNum', x=740,y=420,lim=280,w=350,unit=1,disp=SETval('lineNum'), show="percent",code=SETsto('lineNum')},
WIDGET.newSlider{name='ghost', x=740,y=240,lim=280,w=350,axis={0,1},disp=SETval('ghost'), show="percent",code=SETsto('ghost')},
WIDGET.newSlider{name='center', x=740,y=300,lim=280,w=350,axis={0,1},disp=SETval('center'), show="percent",code=SETsto('center')},
WIDGET.newSlider{name='grid', x=740,y=360,lim=280,w=350,axis={0,.4},disp=SETval('grid'), show="percent",code=SETsto('grid')},
WIDGET.newSlider{name='lineNum', x=740,y=420,lim=280,w=350,axis={0,1},disp=SETval('lineNum'), show="percent",code=SETsto('lineNum')},
WIDGET.newSlider{name='lockFX', x=330,y=460,lim=280,w=540,unit=5,disp=SETval('lockFX'), code=SETsto('lockFX')},
WIDGET.newSlider{name='dropFX', x=330,y=520,lim=280,w=540,unit=5,disp=SETval('dropFX'), code=SETsto('dropFX')},
WIDGET.newSlider{name='moveFX', x=330,y=580,lim=280,w=540,unit=5,disp=SETval('moveFX'), code=SETsto('moveFX')},
WIDGET.newSlider{name='clearFX', x=330,y=640,lim=280,w=540,unit=5,disp=SETval('clearFX'), code=SETsto('clearFX')},
WIDGET.newSlider{name='splashFX', x=330,y=700,lim=280,w=540,unit=5,disp=SETval('splashFX'), code=SETsto('splashFX')},
WIDGET.newSlider{name='shakeFX', x=330,y=760,lim=280,w=540,unit=5,disp=SETval('shakeFX'), code=SETsto('shakeFX')},
WIDGET.newSlider{name='atkFX', x=330,y=820,lim=280,w=540,unit=5,disp=SETval('atkFX'), code=SETsto('atkFX')},
WIDGET.newSlider{name='lockFX', x=330,y=460,lim=280,w=540,axis={0,5,1},disp=SETval('lockFX'), code=SETsto('lockFX')},
WIDGET.newSlider{name='dropFX', x=330,y=520,lim=280,w=540,axis={0,5,1},disp=SETval('dropFX'), code=SETsto('dropFX')},
WIDGET.newSlider{name='moveFX', x=330,y=580,lim=280,w=540,axis={0,5,1},disp=SETval('moveFX'), code=SETsto('moveFX')},
WIDGET.newSlider{name='clearFX', x=330,y=640,lim=280,w=540,axis={0,5,1},disp=SETval('clearFX'), code=SETsto('clearFX')},
WIDGET.newSlider{name='splashFX', x=330,y=700,lim=280,w=540,axis={0,5,1},disp=SETval('splashFX'),code=SETsto('splashFX')},
WIDGET.newSlider{name='shakeFX', x=330,y=760,lim=280,w=540,axis={0,5,1},disp=SETval('shakeFX'), code=SETsto('shakeFX')},
WIDGET.newSlider{name='atkFX', x=330,y=820,lim=280,w=540,axis={0,5,1},disp=SETval('atkFX'), code=SETsto('atkFX')},
WIDGET.newSelector{name='frame', x=400,y=890,lim=280,w=460,list={8,10,13,17,22,29,37,47,62,80,100},disp=SETval('frameMul'),code=function(v)SETTING.frameMul=v;Z.setFrameMul(SETTING.frameMul)end},
WIDGET.newSwitch{name='FTlock', x=950,y=890,lim=290,disp=SETval('FTLock'), code=SETrev('FTLock')},
@@ -79,25 +79,25 @@ scene.widgetList={
WIDGET.newSwitch{name='highCam', x=450,y=1270,lim=360,disp=SETval('highCam'), code=SETrev('highCam')},
WIDGET.newSwitch{name='warn', x=450,y=1340,lim=360,disp=SETval('warn'), code=SETrev('warn')},
WIDGET.newSwitch{name='clickFX', x=950,y=980,lim=360,disp=SETval('clickFX'), code=SETrev('clickFX')},
WIDGET.newSwitch{name='power', x=950,y=1070,lim=360,disp=SETval('powerInfo'), code=function()SETTING.powerInfo=not SETTING.powerInfo Z.setPowerInfo(SETTING.powerInfo)end},
WIDGET.newSwitch{name='clean', x=950,y=1160,lim=360,disp=SETval('cleanCanvas'), code=function()SETTING.cleanCanvas=not SETTING.cleanCanvas Z.setCleanCanvas(SETTING.cleanCanvas)end},
WIDGET.newSwitch{name='fullscreen', x=950,y=1250,lim=360,disp=SETval('fullscreen'), code=function()SETTING.fullscreen=not SETTING.fullscreen applyFullscreen()end},
WIDGET.newSwitch{name='clickFX', x=950,y=980,lim=360,disp=SETval('clickFX'), code=function()SETTING.clickFX=not SETTING.clickFX applySettings()end},
WIDGET.newSwitch{name='power', x=950,y=1070,lim=360,disp=SETval('powerInfo'), code=function()SETTING.powerInfo=not SETTING.powerInfo applySettings()end},
WIDGET.newSwitch{name='clean', x=950,y=1160,lim=360,disp=SETval('cleanCanvas'), code=function()SETTING.cleanCanvas=not SETTING.cleanCanvas applySettings()end},
WIDGET.newSwitch{name='fullscreen', x=950,y=1250,lim=360,disp=SETval('fullscreen'), code=function()SETTING.fullscreen=not SETTING.fullscreen applySettings()end},
WIDGET.newKey{name='bg_on', x=680,y=1340,w=200,h=80,code=function()SETTING.bg='on'applyBG()end},
WIDGET.newKey{name='bg_off', x=900,y=1340,w=200,h=80,code=function()SETTING.bg='off'applyBG()end},
WIDGET.newKey{name='bg_on', x=680,y=1340,w=200,h=80,code=function()SETTING.bg='on'applySettings()end},
WIDGET.newKey{name='bg_off', x=900,y=1340,w=200,h=80,code=function()SETTING.bg='off'applySettings()end},
WIDGET.newKey{name='bg_custom', x=1120,y=1340,w=200,h=80,
code=function()
if love.filesystem.getInfo('conf/customBG')then
SETTING.bg='custom'
applyBG()
applySettings()
else
MES.new('info',text.customBGhelp)
end
end
},
WIDGET.newSlider{name='bgAlpha', x=1020,y=1430,w=200,
unit=.8,disp=SETval('bgAlpha'),
axis={0,.8},disp=SETval('bgAlpha'),
code=function(v)SETTING.bgAlpha=v BG.send(v)end,
hideF=function()return SETTING.bg=='on'end
},
@@ -105,12 +105,12 @@ scene.widgetList={
WIDGET.newSelector{name='blockSatur', x=800,y=1440,w=300,color='lN',
list={'normal','soft','gray','light','color'},
disp=SETval('blockSatur'),
code=function(v)SETTING.blockSatur=v;applyBlockSatur(SETTING.blockSatur)end
code=function(v)SETTING.blockSatur=v;applySettings(SETTING.blockSatur)end
},
WIDGET.newSelector{name='fieldSatur', x=800,y=1540,w=300,color='lN',
list={'normal','soft','gray','light','color'},
disp=SETval('fieldSatur'),
code=function(v)SETTING.fieldSatur=v;applyFieldSatur(SETTING.fieldSatur)end
code=function(v)SETTING.fieldSatur=v;applySettings(SETTING.fieldSatur)end
},
WIDGET.newButton{name='back', x=1140,y=640,w=170,h=80,sound='back',font=60,fText=CHAR.icon.back,code=backScene},