-- todo: NO NO NO NO NO! this needs MAD CHANGES for MAD MONEY ZIG CRAMER
return Def.CourseContentsList {
	MaxSongs = 8;
	InitCommand=cmd(zbuffer,true;ztest,true;z,150);
    NumItemsToDraw = 8;
	SecondsPerItem = 0.45;
	SetCommand=function(self)
		self:finishtweening();
		self:SetFromGameState();
		self:SetCurrentAndDestinationItem(0);
		self:SetLoop(false);
		self:SetMask(270,40);
		--self:scrollwithpadding(2,-1.45);
		self:scrollthroughallitems();
	end;
	CurrentCourseChangedMessageCommand=cmd(playcommand,"Set");
	CurrentTrailP1ChangedMessageCommand=cmd(playcommand,"Set");
	CurrentTrailP2ChangedMessageCommand=cmd(playcommand,"Set");

	Display = Def.ActorFrame { 
		InitCommand=cmd(setsize,270,40);
		-- it pretty much looks like the old default TextBanner, actually

		LoadActor(THEME:GetPathG("CourseEntryDisplay","bar")) .. {
			SetSongCommand=function(self, params)
				(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);
			end;
		};

		Def.TextBanner {
			InitCommand=cmd(x,-96;Load,"TextBannerCourse";SetFromString,"", "", "", "", "", "");
			SetSongCommand=function(self, params)
				if params.Song then
					self:SetFromSong( params.Song );
					self:diffuse( SONGMAN:GetSongColor(params.Song) );
				else
					self:SetFromString( "??????????", "??????????", "", "", "", "" );
					self:diffuse( color("#FFFFFF") );
				end

				(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);
			end;
		};

		LoadFont("CourseEntryDisplay","number") .. {
			InitCommand=cmd(x,-115;shadowlength,1);
			SetSongCommand=function(self, params) 
				self:settext(params.Number);
			end;
		};
		-- replacement for foot
		LoadActor( THEME:GetPathG("DifficultyDisplay","Bar") )..{
			InitCommand=cmd(x,118;y,5;animate,false);
			SetSongCommand=function(self, params)
				local difficultyToFrame = {
					Difficulty_Beginner = 0,
					Difficulty_Easy = 1,
					Difficulty_Medium = 2,
					Difficulty_Hard = 3,
					Difficulty_Challenge = 4,
					Difficulty_Edit = 5,
				};
				if params.Difficulty then
					self:setstate(difficultyToFrame[params.Difficulty]);
				end;
			end;
		};
 		LoadFont("CourseEntryDisplay","difficulty") .. {
			Text="0";
			InitCommand=cmd(x,124;y,-12;shadowlength,0;zoom,0.75;halign,1);
			SetSongCommand=function(self, params)
				if params.PlayerNumber ~= GAMESTATE:GetMasterPlayerNumber() then return end
				self:settext( params.Meter );
				if params.Difficulty then
					self:diffuse( CustomDifficultyToColor(params.Difficulty) );
				end;
			end;
		};
--[[ 		LoadFont("Common","normal") .. {
			OnCommand=cmd(x,0;y,-8;zoom,0.7;shadowlength,0);
			DifficultyChangedCommand=function(self, params)
				if params.PlayerNumber ~= GAMESTATE:GetMasterPlayerNumber() then return end
				self:settext( params.Meter );
				self:diffuse( CourseDifficultyColors[params.Difficulty] );
			end;
		}; --]]

--[[ 		LoadFont("Common","normal") .. {
			OnCommand=cmd(x,SCREEN_CENTER_X-192;y,SCREEN_CENTER_Y-230;horizalign,right;shadowlength,0);
			SetSongCommand=function(self, params) self:settext(params.Modifiers); end;
		}; --]]

	};
};