多媒体模块全体高度封装大型升级
This commit is contained in:
@@ -172,7 +172,7 @@ scene.widgetList={
|
||||
disp=WIDGET.lnk_CUSval("bg"),
|
||||
code=function(i)CUSTOMENV.bg=i BG.set(i)end
|
||||
},
|
||||
WIDGET.newSelector{name="bgm", x=1070, y=230,w=250,color="yellow", list=BGM.list, disp=WIDGET.lnk_CUSval("bgm"), code=function(i)CUSTOMENV.bgm=i BGM.play(i)end},
|
||||
WIDGET.newSelector{name="bgm", x=1070, y=230,w=250,color="yellow", list=BGM.getList(), disp=WIDGET.lnk_CUSval("bgm"), code=function(i)CUSTOMENV.bgm=i BGM.play(i)end},
|
||||
|
||||
--Copy/Paste/Start
|
||||
WIDGET.newButton{name="copy", x=1070, y=310,w=310,h=70,color="lRed", font=25,code=WIDGET.lnk_pressKey("cC")},
|
||||
|
||||
@@ -35,7 +35,7 @@ local function tick_httpREQ_launch(task)
|
||||
end
|
||||
end
|
||||
end
|
||||
function tick_httpREQ_autoLogin(task)
|
||||
local function tick_httpREQ_autoLogin(task)
|
||||
local time=0
|
||||
while true do
|
||||
coroutine.yield()
|
||||
@@ -72,13 +72,13 @@ local scene={}
|
||||
function scene.sceneInit()
|
||||
sceneTemp={
|
||||
time=0,--Animation timer
|
||||
phase=1,--Loading stage
|
||||
cur=1,--Loading timer
|
||||
tar=#VOC.name,--Current Loading bar length
|
||||
phase=0,--Loading stage
|
||||
cur=0,--Loading timer
|
||||
tar=0,--Current Loading bar length
|
||||
list={
|
||||
#VOC.name,
|
||||
#BGM.list,
|
||||
#SFX.list,
|
||||
VOC.getCount(),
|
||||
BGM.getCount(),
|
||||
SFX.getCount(),
|
||||
IMG.getCount(),
|
||||
17,--Fontsize 20~100
|
||||
SKIN.getCount(),
|
||||
@@ -116,14 +116,15 @@ function scene.update()
|
||||
local S=sceneTemp
|
||||
if S.time==400 then return end
|
||||
repeat
|
||||
if S.phase==1 then
|
||||
VOC.loadOne(S.cur)
|
||||
if S.phase==0 then
|
||||
elseif S.phase==1 then
|
||||
VOC.loadOne()
|
||||
elseif S.phase==2 then
|
||||
BGM.loadOne(S.cur)
|
||||
BGM.loadOne()
|
||||
elseif S.phase==3 then
|
||||
SFX.loadOne(S.cur)
|
||||
SFX.loadOne()
|
||||
elseif S.phase==4 then
|
||||
IMG.loadOne(S.cur)
|
||||
IMG.loadOne()
|
||||
elseif S.phase==5 then
|
||||
getFont(15+5*S.cur)
|
||||
elseif S.phase==6 then
|
||||
|
||||
@@ -7,7 +7,7 @@ local scene={}
|
||||
|
||||
function scene.sceneInit()
|
||||
if BGM.nowPlay then
|
||||
for i=1,BGM.len do
|
||||
for i=1,BGM.getCount()do
|
||||
if BGM.list[i]==BGM.nowPlay then
|
||||
sceneTemp=i--Music selected
|
||||
return
|
||||
@@ -24,7 +24,7 @@ end
|
||||
function scene.keyDown(key)
|
||||
local S=sceneTemp
|
||||
if key=="down"then
|
||||
if S<BGM.len then
|
||||
if S<BGM.getCount()then
|
||||
sceneTemp=S+1
|
||||
SFX.play("move",.7)
|
||||
end
|
||||
@@ -52,10 +52,10 @@ function scene.draw()
|
||||
gc.print(BGM.list[sceneTemp],320,355)
|
||||
setFont(35)
|
||||
if sceneTemp>1 then gc.print(BGM.list[sceneTemp-1],320,350-30)end
|
||||
if sceneTemp<BGM.len then gc.print(BGM.list[sceneTemp+1],320,350+65)end
|
||||
if sceneTemp<BGM.getCount()then gc.print(BGM.list[sceneTemp+1],320,350+65)end
|
||||
setFont(20)
|
||||
if sceneTemp>2 then gc.print(BGM.list[sceneTemp-2],320,350-50)end
|
||||
if sceneTemp<BGM.len-1 then gc.print(BGM.list[sceneTemp+2],320,350+110)end
|
||||
if sceneTemp<BGM.getCount()-1 then gc.print(BGM.list[sceneTemp+2],320,350+110)end
|
||||
|
||||
gc.draw(IMG.title,840,220,nil,1.5,nil,206,35)
|
||||
if BGM.nowPlay then
|
||||
@@ -78,7 +78,7 @@ scene.widgetList={
|
||||
WIDGET.newSlider{name="bgm", x=760, y=80,w=400, font=35,disp=WIDGET.lnk_SETval("bgm"),code=function(v)SETTING.bgm=v BGM.freshVolume()end},
|
||||
WIDGET.newButton{name="up", x=200, y=250,w=120, font=55,code=WIDGET.lnk_pressKey("up"),hide=function()return sceneTemp==1 end},
|
||||
WIDGET.newButton{name="play", x=200, y=390,w=120, font=35,code=WIDGET.lnk_pressKey("space")},
|
||||
WIDGET.newButton{name="down", x=200, y=530,w=120, font=55,code=WIDGET.lnk_pressKey("down"),hide=function()return sceneTemp==BGM.len end},
|
||||
WIDGET.newButton{name="down", x=200, y=530,w=120, font=55,code=WIDGET.lnk_pressKey("down"),hide=function()return sceneTemp==BGM.getCount()end},
|
||||
WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80, font=40,code=WIDGET.lnk_BACK},
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ function SKIN.loadOne(_)
|
||||
end
|
||||
function SKIN.loadAll()
|
||||
for i=1,count do
|
||||
SFX.loadOne(i)
|
||||
SKIN.loadOne(i)
|
||||
end
|
||||
end
|
||||
function SKIN.prevSet()--Prev skin_set
|
||||
|
||||
Reference in New Issue
Block a user