From b07c4dc53a566958210d6089cf165350ed4badcb Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 26 Dec 2021 02:38:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=BB=91=E6=9D=A1=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E5=92=8C=E5=88=97=E8=A1=A8=E6=A1=86=E6=8E=A7=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/widget.lua | 62 +++++++++++++++++----------- main.lua | 1 + parts/gameTables.lua | 2 +- parts/scenes/app_schulteG.lua | 6 +-- parts/scenes/customGame.lua | 8 ++-- parts/scenes/net_newRoom.lua | 8 ++-- parts/scenes/setting_control.lua | 18 ++++---- parts/scenes/setting_game.lua | 22 +++++----- parts/scenes/setting_sound.lua | 16 +++---- parts/scenes/setting_touch.lua | 2 +- parts/scenes/setting_touchSwitch.lua | 20 ++++----- parts/scenes/setting_video.lua | 24 +++++------ 12 files changed, 102 insertions(+), 87 deletions(-) diff --git a/Zframework/widget.lua b/Zframework/widget.lua index 0de18a14..a22b5d25 100644 --- a/Zframework/widget.lua +++ b/Zframework/widget.lua @@ -529,7 +529,7 @@ function slider:isAbove(x,y) return x>self.x-10 and xself.y-25 and yself.w and self.unit or x/self.w*self.unit - if not self.smooth then - P=int(P+.5) + local newPos=MATH.interval(x/self.w,0,1) + local newVal + if not self.unit then + newVal=(1-newPos)*self.rangeL+newPos*self.rangeR + else + newVal=newPos*(self.rangeR-self.rangeL) + newVal=self.rangeL+newVal-newVal%self.unit end - if p~=P then - self.code(P) + if newVal~=self.disp()then + self.code(newVal) end if self.change and timer()-self.lastTime>.5 then self.lastTime=timer() @@ -621,8 +624,8 @@ function slider:release(x) end function slider:scroll(n) local p=self.disp() - local u=self.smooth and .01 or 1 - local P=n==-1 and max(p-u,0)or min(p+u,self.unit) + local u=self.unit or .01 + local P=MATH.interval(p+u*n,self.rangeL,self.rangeR) if p==P or not P then return end self.code(P) if self.change and timer()-self.lastTime>.18 then @@ -633,7 +636,13 @@ end function slider:arrowKey(k) self:scroll((k=='left'or k=='up')and -1 or 1) end -function WIDGET.newSlider(D)--name,x,y,w[,lim][,fText][,color][,unit][,smooth][,font=30][,fType][,change],disp[,show][,code],hide +function WIDGET.newSlider(D)--name,x,y,w[,lim][,fText][,color][,axis][,smooth][,font=30][,fType][,change],disp[,show][,code],hide + if not D.axis then + D.axis={0,1,false} + D.smooth=true + elseif not D.axis[3]then + D.smooth=true + end local _={ name= D.name or"_", @@ -652,8 +661,10 @@ function WIDGET.newSlider(D)--name,x,y,w[,lim][,fText][,color][,unit][,smooth][, fText= D.fText, color= D.color and(COLOR[D.color]or D.color)or COLOR.Z, - unit= D.unit or 1, - smooth=false, + rangeL=D.axis[1], + rangeR=D.axis[2], + unit= D.axis[3], + smooth=D.smooth, font= D.font or 30, fType= D.fType, change=D.change, @@ -663,22 +674,17 @@ function WIDGET.newSlider(D)--name,x,y,w[,lim][,fText][,color][,unit][,smooth][, hide= D.hide, show= false, } - if D.smooth~=nil then - _.smooth=D.smooth - else - _.smooth=_.unit<=1 - end if D.show then if type(D.show)=='function'then _.show=D.show else _.show=sliderShowFunc[D.show] end - elseif D.show~=false then - if _.unit<=1 then - _.show=sliderShowFunc.percent - else + elseif D.show~=false then--Use default if nil + if _.unit and _.unit%1==0 then _.show=sliderShowFunc.int + else + _.show=sliderShowFunc.percent end end for k,v in next,slider do _[k]=v end @@ -1227,6 +1233,14 @@ function listBox:arrowKey(dir) end end end +function listBox:select(i) + self.selected=i + if self.selectedint(self.scrollPos/self.lineH)+self.capacity-1 then + self:drag(nil,nil,nil,-1e99) + end +end function listBox:draw() local x,y,w,h=self.x,self.y,self.w,self.h local list=self.list diff --git a/main.lua b/main.lua index e84c69ff..55e905eb 100644 --- a/main.lua +++ b/main.lua @@ -543,6 +543,7 @@ do if SETTING.cv then SETTING.vocPack,SETTING.cv=SETTING.cv end if type(SETTING.bg)~='string'then SETTING.bg='on'end if SETTING.skin[18]==10 then SETTING.skin[18]=4 end + if SETTING.reTime>3 or SETTING.reTime<.5 then SETTING.reTime=2 end if RANKS.infinite then RANKS.infinite=0 end if RANKS.infinite_dig then RANKS.infinite_dig=0 end if not RANKS.sprint_10l then RANKS.sprint_10l=0 end diff --git a/parts/gameTables.lua b/parts/gameTables.lua index 1b9ab1ec..97af692b 100644 --- a/parts/gameTables.lua +++ b/parts/gameTables.lua @@ -594,7 +594,7 @@ do--Userdata tables FTLock=true, --System - reTime=4, + reTime=2, allowTAS=false, autoPause=true, menuPos='middle', diff --git a/parts/scenes/app_schulteG.lua b/parts/scenes/app_schulteG.lua index 4f08d043..fc381263 100644 --- a/parts/scenes/app_schulteG.lua +++ b/parts/scenes/app_schulteG.lua @@ -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}, } diff --git a/parts/scenes/customGame.lua b/parts/scenes/customGame.lua index 17035f0d..c7280e08 100644 --- a/parts/scenes/customGame.lua +++ b/parts/scenes/customGame.lua @@ -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}, diff --git a/parts/scenes/net_newRoom.lua b/parts/scenes/net_newRoom.lua index 69160f77..10b72e39 100644 --- a/parts/scenes/net_newRoom.lua +++ b/parts/scenes/net_newRoom.lua @@ -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 diff --git a/parts/scenes/setting_control.lua b/parts/scenes/setting_control.lua index 6285ee6e..acc02373 100644 --- a/parts/scenes/setting_control.lua +++ b/parts/scenes/setting_control.lua @@ -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 diff --git a/parts/scenes/setting_game.lua b/parts/scenes/setting_game.lua index 2c5b6f71..e3dcecde 100644 --- a/parts/scenes/setting_game.lua +++ b/parts/scenes/setting_game.lua @@ -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=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'), + 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 diff --git a/parts/scenes/setting_sound.lua b/parts/scenes/setting_sound.lua index 916c6365..1f27310f 100644 --- a/parts/scenes/setting_sound.lua +++ b/parts/scenes/setting_sound.lua @@ -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('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'),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}, diff --git a/parts/scenes/setting_touch.lua b/parts/scenes/setting_touch.lua index 35230b62..3b38af15 100644 --- a/parts/scenes/setting_touch.lua +++ b/parts/scenes/setting_touch.lua @@ -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, diff --git a/parts/scenes/setting_touchSwitch.lua b/parts/scenes/setting_touchSwitch.lua index 74edbb7a..9aa1e540 100644 --- a/parts/scenes/setting_touchSwitch.lua +++ b/parts/scenes/setting_touchSwitch.lua @@ -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}, } diff --git a/parts/scenes/setting_video.lua b/parts/scenes/setting_video.lua index defeab2e..8d58c8e6 100644 --- a/parts/scenes/setting_video.lua +++ b/parts/scenes/setting_video.lua @@ -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')}, @@ -97,7 +97,7 @@ scene.widgetList={ 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 },