-- DifficultyList.
-- shows up when SSMusicInfo is set to DifficultyList.

local dl = Def.ActorFrame{
	Name="DifficultyListSection";
	
	Def.ActorFrame{
		Name="Dividers";
		InitCommand=cmd(x,80;diffuse,color("0,0,0,0.25"));
		OffCommand=cmd(diffusealpha,0;linear,0.2;diffusealpha,1);
		OffCommand=cmd(linear,0.2;diffusealpha,0);
		
		Def.Quad{
			Name="Divider1";
			InitCommand=cmd(y,10;zoomto,294,2);
		};
		Def.Quad{
			Name="Divider2";
			InitCommand=cmd(y,30;zoomto,294,2);
		};
		Def.Quad{
			Name="Divider3";
			InitCommand=cmd(y,50;zoomto,294,2);
		};
		Def.Quad{
			Name="Divider4";
			InitCommand=cmd(y,70;zoomto,294,2);
		};
	};
	
	Def.DifficultyList {
		Name="DifficultyList";
		InitCommand=cmd(diffusealpha,0);
		OnCommand=cmd(linear,0.2;diffusealpha,1);
		OffCommand=cmd(linear,0.2;diffusealpha,0);
		
		SetCommand = cmd(setfromgamestate);
		CurrentSongChangedMessageCommand = cmd(playcommand,"Set");
		CurrentCourseChangedMessageCommand = cmd(playcommand,"Set");
		CurrentStepsP1ChangedMessageCommand = cmd(playcommand,"Set");
		CurrentStepsP2ChangedMessageCommand = cmd(playcommand,"Set");
		CurrentTrailP1ChangedMessageCommand = cmd(playcommand,"Set");
		CurrentTrailP2ChangedMessageCommand = cmd(playcommand,"Set");

		CursorP1 = LoadActor("_cursor p1") .. {
			Name="CursorP1";
			InitCommand=cmd(player,PLAYER_1;x,-46;diffusealpha,0);
			OnCommand=cmd(linear,0.2;diffusealpha,1);
			OffCommand=cmd(linear,0.2;diffusealpha,0);
			
			ShowCommand=cmd(linear,0.2;diffusealpha,1);
			HideCommand=cmd(linear,0.2;diffusealpha,0);
			
			MoveCommand=cmd(finishtweening;decelerate,0.15);
		};
		CursorP1Frame = Def.ActorFrame {
			Name="CursorP1Frame";
			MoveCommand=cmd(finishtweening;decelerate,0.15);
		};
		
		CursorP2 = LoadActor("_cursor p2") .. {
			Name="CursorP2";
			InitCommand=cmd(player,PLAYER_2;x,208;diffusealpha,0);
			OnCommand=cmd(linear,0.2;diffusealpha,1);
			OffCommand=cmd(linear,0.2;diffusealpha,0);
			
			ShowCommand=cmd(linear,0.2;diffusealpha,1);
			HideCommand=cmd(linear,0.2;diffusealpha,0);
			
			MoveCommand=cmd(finishtweening;decelerate,0.15);
		};
		
		CursorP2Frame = Def.ActorFrame {
			Name="CursorP2Frame";
			MoveCommand=cmd(finishtweening;decelerate,0.15);
		};
	};
};

return dl;