local pn = ...
assert(pn);

local ret = Def.ActorFrame{
	AutoText("frutiger",true)..{
		InitCommand=cmd(NoStroke;diffuse,color("#000000");shadowlength,0;zoom,0.65);
		SetCommand=function(self)
			local text;
			if GAMESTATE:IsCourseMode() then
				text = "";
			else
				local song = GAMESTATE:GetCurrentSong();
				if song then
					local autogen = false;
					if GAMESTATE:GetCurrentSteps(pn) then
						autogen = GAMESTATE:GetCurrentSteps(pn):IsAutogen();
					end;
					if autogen then text = "Autogen"
					else text = "";
					end;
				else
					text = "";
				end;
			end;
			self:settext(text);
		end;
		-- song and course changes
		CurrentSongChangedMessageCommand=cmd(playcommand,"Set");
		CurrentCourseChangedMessageCommand=cmd(playcommand,"Set");
		-- steps and trail changes
		CurrentStepsP1ChangedMessageCommand=function(self)
			if pn == PLAYER_1 then self:playcommand("Set"); end;
		end;
		CurrentStepsP2ChangedMessageCommand=function(self)
			if pn == PLAYER_2 then self:playcommand("Set"); end;
		end;

		CurrentTrailP1ChangedMessageCommand=function(self)
			if pn == PLAYER_1 then self:playcommand("Set"); end;
		end;
		CurrentTrailP2ChangedMessageCommand=function(self)
			if pn == PLAYER_2 then self:playcommand("Set"); end;
		end;
	};
};
return ret;
