BGM模块新增setChange方法可以设置切换BGM的时候会触发的事件
切换BGM时弹出BGM名称
This commit is contained in:
@@ -29,19 +29,19 @@ local mesIcon={
|
||||
{'fRect',2,4,36,26,3},
|
||||
{'fPoly',2,27,2,37,14,25},
|
||||
{'setCL',.5,.5,.5},
|
||||
{'fRect',6,11,4,4},{'fRect',14,11,19,4},
|
||||
{'fRect',6,19,4,4},{'fRect',14,19,19,4},
|
||||
{'fRect',6,11,4,4,1},{'fRect',14,11,19,4,1},
|
||||
{'fRect',6,19,4,4,1},{'fRect',14,19,19,4,1},
|
||||
},
|
||||
warn=GC.DO{40,40,
|
||||
{'setCL',.95,.83,.4},
|
||||
{'fPoly',20.5,1,0,38,40,38},
|
||||
{'setCL',0,0,0},
|
||||
{'dPoly',20.5,1,0,38,40,38},
|
||||
{'fRect',17,10,7,18},
|
||||
{'fRect',17,29,7,7},
|
||||
{'fRect',17,10,7,18,2},
|
||||
{'fRect',17,29,7,7,2},
|
||||
{'setCL',1,1,1},
|
||||
{'fRect',18,11,5,16},
|
||||
{'fRect',18,30,5,5},
|
||||
{'fRect',18,11,5,16,2},
|
||||
{'fRect',18,30,5,5,2},
|
||||
},
|
||||
error=GC.DO{40,40,
|
||||
{'setCL',.95,.3,.3},
|
||||
@@ -56,22 +56,27 @@ local mesIcon={
|
||||
{'line',11,11,29,29},
|
||||
{'line',11,29,29,11},
|
||||
},
|
||||
music=GC.DO{40,40,
|
||||
{'setLW',2},
|
||||
{'dRect',1,3,38,34,3},
|
||||
{'setLW',4},
|
||||
{'line',21,26,21,10,28,10},
|
||||
{'fElps',17,26,6,5},
|
||||
},
|
||||
}
|
||||
|
||||
local MES={}
|
||||
|
||||
local backColors={
|
||||
check={.3,.6,.3,.7},
|
||||
broadcast={.3,.3,.6,.8},
|
||||
warn={.4,.4,.2,.9},
|
||||
error={.4,.2,.2,.9},
|
||||
music={.2,.4,.4,.9},
|
||||
}
|
||||
function MES.new(icon,str,time)
|
||||
local backColor={.5,.5,.5,.7}
|
||||
if type(icon)=='string'then
|
||||
if icon=='check'then
|
||||
backColor={.3,.6,.3,.7}
|
||||
elseif icon=='broadcast'then
|
||||
backColor={.3,.3,.6,.8}
|
||||
elseif icon=='warn'then
|
||||
backColor={.4,.4,.2,.9}
|
||||
elseif icon=='error'then
|
||||
backColor={.4,.2,.2,.9}
|
||||
end
|
||||
backColor=backColors[icon]or backColor
|
||||
icon=mesIcon[icon]
|
||||
end
|
||||
local t=gc.newText(getFont(30),str)
|
||||
|
||||
Reference in New Issue
Block a user