Files
itgmania212121/Themes/default/BGAnimations/ScreenGameplay in/CourseDisplay.lua
T
ListenerJubatus 67099e520c Merge a major revamp of Lambda
Besides a few other minor retouches and additions, the biggest change is
that the theme now has a fixed color scheme of yellow, orange, and dark
magenta, and that many of the glossy graphics have been replaced by
flatter versions with subtle shadows.
2018-02-08 23:35:28 -06:00

37 lines
1.0 KiB
Lua

if not GAMESTATE:IsCourseMode() then return Def.ActorFrame{} end; -- short circuit
local slideTime = 1.1;
local slideWait = 1.25;
local bottomSlide = 0.76;
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=function(self)
self:scale_or_crop_background()
self:addy(SCREEN_HEIGHT):sleep(slideWait):smooth(slideTime):addy(-SCREEN_HEIGHT);
end;
};
-- alternate background
Def.Sprite{
InitCommand=cmd(Center;);
BeginCommand=cmd(LoadFromCurrentSongBackground;scale_or_crop_background;diffusealpha,0);
OnCommand=cmd(playcommand,"Show");
ShowCommand=function(self)
if course:HasBackground() then
self:addy(SCREEN_HEIGHT):sleep(slideWait):smooth(slideTime):addy(-SCREEN_HEIGHT);
end
end;
};
};
return t;