微调自定义游戏和音乐室ui

整理代码
This commit is contained in:
MrZ626
2021-08-27 22:29:32 +08:00
parent e4803cc89d
commit a7b38335c9
3 changed files with 5 additions and 5 deletions

View File

@@ -586,7 +586,7 @@ 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[,fText][,color][,unit][,smooth][,font=30][,change],disp,code,hide
function WIDGET.newSlider(D)--name,x,y,w[,fText][,color][,unit][,smooth][,font=30][,change],disp[,show],code,hide
local _={
name= D.name or"_",

View File

@@ -245,8 +245,8 @@ scene.widgetList={
WIDGET.newSwitch{name="bone", x=1170,y=930,disp=CUSval("bone"), code=CUSrev("bone")},
--Next & Hold
WIDGET.newSlider{name="nextCount",x=120, y=940,w=200,unit=6, disp=CUSval("nextCount"),code=CUSsto("nextCount")},
WIDGET.newSlider{name="holdCount",x=120, y=1030,w=200,unit=6,disp=CUSval("holdCount"),code=CUSsto("holdCount")},
WIDGET.newSlider{name="nextCount",x=140, y=940,w=180,unit=6, disp=CUSval("nextCount"),code=CUSsto("nextCount")},
WIDGET.newSlider{name="holdCount",x=140, y=1030,w=180,unit=6,disp=CUSval("holdCount"),code=CUSsto("holdCount")},
WIDGET.newSwitch{name="infHold", x=560, y=940, disp=CUSval("infHold"),code=CUSrev("infHold"),hideF=function()return CUSTOMENV.holdCount==0 end},
WIDGET.newSwitch{name="phyHold", x=560, y=1030, disp=CUSval("phyHold"),code=CUSrev("phyHold"),hideF=function()return CUSTOMENV.holdCount==0 end},

View File

@@ -92,7 +92,7 @@ function scene.draw()
gc.setColor(COLOR.Z)
local cur=BGM.playing:tell()
local dur=BGM.playing:getDuration()
gc.print(STRING.time_simp(cur%dur).." / "..STRING.time_simp(dur),500,610)
gc.print(STRING.time_simp(cur%dur).." / "..STRING.time_simp(dur),500,626)
end
end
@@ -102,7 +102,7 @@ scene.widgetList={
WIDGET.newText{name="now", x=700,y=500,font=50,align='R',hideF=function()return not BGM.nowPlay end},
WIDGET.newSlider{name="slide",x=500,y=600,w=400,
disp=function()return BGM.playing:tell()/BGM.playing:getDuration()%1 end,
show='none',
show=false,
code=function(v)BGM.playing:seek(v*BGM.playing:getDuration())end,
hideF=function()return not BGM.nowPlay end
},