diff --git a/Themes/default/BGAnimations/ScreenStageInformation underlay/CourseDisplay.lua b/Themes/default/BGAnimations/ScreenStageInformation underlay/CourseDisplay.lua new file mode 100644 index 0000000000..c3794cf418 --- /dev/null +++ b/Themes/default/BGAnimations/ScreenStageInformation underlay/CourseDisplay.lua @@ -0,0 +1,32 @@ +if not GAMESTATE:IsCourseMode() then return Def.ActorFrame{} end; -- short circuit +local course = GAMESTATE:GetCurrentCourse() + +local t = Def.ActorFrame{ + -- background + Def.Sprite{ + InitCommand=cmd(Center); + BeginCommand=function(self) + if course:GetBackgroundPath() then + self:Load( course:GetBackgroundPath() ) + else + -- default to the BG of the first song in the course + self:LoadFromCurrentSongBackground() + end + end; + OnCommand=cmd(diffusealpha,0;scaletoclipped,SCREEN_WIDTH,SCREEN_HEIGHT;sleep,0.5;linear,0.50;diffusealpha,1;sleep,3); + }; + -- alternate background + Def.Sprite{ + InitCommand=cmd(Center;); + BeginCommand=cmd(LoadFromCurrentSongBackground;scaletoclipped,SCREEN_WIDTH,SCREEN_HEIGHT;diffusealpha,0); + OnCommand=cmd(sleep,4;playcommand,"Show"); + ShowCommand=function(self) + if course:HasBackground() then + self:accelerate(0.25) + self:diffusealpha(1) + end + end; + }; +}; + +return t; \ No newline at end of file diff --git a/Themes/default/BGAnimations/ScreenStageInformation underlay/default.lua b/Themes/default/BGAnimations/ScreenStageInformation underlay/default.lua index 8eb5003af7..9a37087def 100644 --- a/Themes/default/BGAnimations/ScreenStageInformation underlay/default.lua +++ b/Themes/default/BGAnimations/ScreenStageInformation underlay/default.lua @@ -22,11 +22,15 @@ local t = Def.ActorFrame {}; t[#t+1] = Def.Quad { InitCommand=cmd(Center;zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;diffuse,Color("Black")); }; -t[#t+1] = Def.Sprite { - InitCommand=cmd(Center); - BeginCommand=cmd(LoadFromCurrentSongBackground); - OnCommand=cmd(diffusealpha,0;scaletoclipped,SCREEN_WIDTH,SCREEN_HEIGHT;sleep,0.5;linear,0.50;diffusealpha,1;sleep,3); -}; +if GAMESTATE:IsCourseMode() then + t[#t+1] = LoadActor("CourseDisplay"); +else + t[#t+1] = Def.Sprite { + InitCommand=cmd(Center); + BeginCommand=cmd(LoadFromCurrentSongBackground); + OnCommand=cmd(diffusealpha,0;scaletoclipped,SCREEN_WIDTH,SCREEN_HEIGHT;sleep,0.5;linear,0.50;diffusealpha,1;sleep,3); + }; +end t[#t+1] = Def.ActorFrame { InitCommand=cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y);