2014-08-25 20:40:03 -07:00
|
|
|
local transform = function(self,offsetFromCenter,itemIndex,numitems)
|
|
|
|
|
self:y( offsetFromCenter * 44 );
|
|
|
|
|
end
|
2011-03-17 01:47:30 -04:00
|
|
|
return Def.CourseContentsList {
|
2014-08-25 20:40:03 -07:00
|
|
|
MaxSongs = 10;
|
2014-08-16 20:55:57 -07:00
|
|
|
NumItemsToDraw = 8;
|
2013-07-18 18:02:01 -04:00
|
|
|
ShowCommand=cmd(bouncebegin,0.3;zoomy,1);
|
|
|
|
|
HideCommand=cmd(linear,0.3;zoomy,0);
|
2011-03-17 01:47:30 -04:00
|
|
|
SetCommand=function(self)
|
|
|
|
|
self:SetFromGameState();
|
|
|
|
|
self:SetCurrentAndDestinationItem(0);
|
2014-08-25 20:40:03 -07:00
|
|
|
self:SetPauseCountdownSeconds(1);
|
|
|
|
|
self:SetSecondsPauseBetweenItems( 0.25 );
|
|
|
|
|
self:SetTransformFromFunction(transform);
|
2014-08-16 20:55:57 -07:00
|
|
|
--
|
2014-08-25 20:40:03 -07:00
|
|
|
self:SetDestinationItem( math.max(0,self:GetNumItems() - 4) );
|
2011-03-17 01:47:30 -04:00
|
|
|
self:SetLoop(false);
|
2014-08-25 20:40:03 -07:00
|
|
|
self:SetMask(0,0);
|
2011-03-17 01:47:30 -04:00
|
|
|
end;
|
2013-07-18 18:02:01 -04:00
|
|
|
CurrentTrailP1ChangedMessageCommand=cmd(playcommand,"Set");
|
|
|
|
|
CurrentTrailP2ChangedMessageCommand=cmd(playcommand,"Set");
|
2011-03-17 01:47:30 -04:00
|
|
|
|
|
|
|
|
Display = Def.ActorFrame {
|
2013-07-18 18:02:01 -04:00
|
|
|
InitCommand=cmd(setsize,270,44);
|
2011-03-17 01:47:30 -04:00
|
|
|
|
|
|
|
|
LoadActor(THEME:GetPathG("CourseEntryDisplay","bar")) .. {
|
|
|
|
|
SetSongCommand=function(self, params)
|
|
|
|
|
if params.Difficulty then
|
|
|
|
|
self:diffuse( CustomDifficultyToColor(params.Difficulty) );
|
|
|
|
|
else
|
|
|
|
|
self:diffuse( color("#FFFFFF") );
|
|
|
|
|
end
|
|
|
|
|
|
2013-07-18 18:02:01 -04:00
|
|
|
(cmd(finishtweening;diffusealpha,0;sleep,0.125*params.Number;linear,0.125;diffusealpha,1;linear,0.05;glow,color("1,1,1,0.5");decelerate,0.1;glow,color("1,1,1,0")))(self);
|
2011-03-17 01:47:30 -04:00
|
|
|
end;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Def.TextBanner {
|
2013-07-18 18:02:01 -04:00
|
|
|
InitCommand=cmd(x,-128;y,1;Load,"TextBanner";SetFromString,"", "", "", "", "", "");
|
2011-03-17 01:47:30 -04:00
|
|
|
SetSongCommand=function(self, params)
|
|
|
|
|
if params.Song then
|
|
|
|
|
if GAMESTATE:GetCurrentCourse():GetDisplayFullTitle() == "Abomination" then
|
|
|
|
|
-- abomination hack
|
|
|
|
|
if PREFSMAN:GetPreference("EasterEggs") then
|
|
|
|
|
if params.Number % 2 ~= 0 then
|
|
|
|
|
-- turkey march
|
|
|
|
|
local artist = params.Song:GetDisplayArtist();
|
|
|
|
|
self:SetFromString( "Turkey", "", "", "", artist, "" );
|
|
|
|
|
else
|
|
|
|
|
self:SetFromSong( params.Song );
|
|
|
|
|
end;
|
|
|
|
|
else
|
|
|
|
|
self:SetFromSong( params.Song );
|
|
|
|
|
end;
|
|
|
|
|
else
|
|
|
|
|
self:SetFromSong( params.Song );
|
|
|
|
|
end;
|
|
|
|
|
self:diffuse( CustomDifficultyToColor(params.Difficulty) );
|
2013-07-18 18:02:01 -04:00
|
|
|
-- self:glow("1,1,1,0.5");
|
2011-03-17 01:47:30 -04:00
|
|
|
else
|
|
|
|
|
self:SetFromString( "??????????", "??????????", "", "", "", "" );
|
|
|
|
|
self:diffuse( color("#FFFFFF") );
|
2013-07-18 18:02:01 -04:00
|
|
|
-- self:glow("1,1,1,0");
|
2011-03-17 01:47:30 -04:00
|
|
|
end
|
|
|
|
|
|
2013-07-18 18:02:01 -04:00
|
|
|
(cmd(finishtweening;zoomy,0;sleep,0.125*params.Number;linear,0.125;zoomy,1.1;linear,0.05;zoomx,1.1;decelerate,0.1;zoom,1))(self);
|
2011-03-17 01:47:30 -04:00
|
|
|
end;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
LoadFont("CourseEntryDisplay","difficulty") .. {
|
|
|
|
|
Text="0";
|
2013-07-18 18:02:01 -04:00
|
|
|
InitCommand=cmd(x,114;y,0;zoom,0.75;shadowlength,1);
|
2011-03-17 01:47:30 -04:00
|
|
|
SetSongCommand=function(self, params)
|
|
|
|
|
if params.PlayerNumber ~= GAMESTATE:GetMasterPlayerNumber() then return end
|
|
|
|
|
self:settext( params.Meter );
|
|
|
|
|
self:diffuse( CustomDifficultyToColor(params.Difficulty) );
|
2013-07-18 18:02:01 -04:00
|
|
|
(cmd(finishtweening;zoomy,0;sleep,0.125*params.Number;linear,0.125;zoomy,1.1;linear,0.05;zoomx,1.1;decelerate,0.1;zoom,1))(self);
|
2011-03-17 01:47:30 -04:00
|
|
|
end;
|
|
|
|
|
};
|
|
|
|
|
};
|
2010-01-26 21:00:30 -06:00
|
|
|
};
|