-- I'm pretty sure this is lifted from _fallback,
-- which might have already been lifted from PIU Pro or something
local Players = GAMESTATE:GetHumanPlayers()

local t = LoadFallbackB()
-- fallback stuff, might delet
t[#t+1] = Def.ActorFrame {
  InitCommand=cmd(xy,_screen.cx,60);
	LoadFont("Common Normal") .. {
		Text="A player has a high score";
		BeginCommand=cmd(visible,SCREENMAN:GetTopScreen():GetAnyEntering());
	};
	LoadFont("Common Normal") .. {
		Text="Nobody has a high score...\nhow did we get here?!";
		BeginCommand=cmd(visible,not SCREENMAN:GetTopScreen():GetAnyEntering());
	};
--[[ 	for pn in ivalues(Players) do
		LoadFont("Common Normal") .. {
			Text=ToEnumShortString(pn);
			InitCommand=cmd(x,128 * tMath[pn];y,32);
		};
	end --]]
};
--
t[#t+1] = Def.Actor {
	MenuTimerExpiredMessageCommand = function(self, param)
		for pn in ivalues(PlayerNumber) do
			SCREENMAN:GetTopScreen():Finish(pn);
		end
	end;
	CodeMessageCommand=function(self,param)
		--if param.Name == "Enter" then
		--	SCREENMAN:GetTopScreen():Finish(param.PlayerNumber);
		--end
	end
};

t[#t+1] = LoadActor("keyboard") .. {
	InitCommand=cmd(Center),
	OnCommand=cmd(visible,GAMESTATE:AnyPlayerHasRankingFeats())
}

for pn in ivalues(PlayerNumber) do
	local P1 = pn == PLAYER_1 and 1 or -1;

	t[#t+1] = LoadFont( "Common Normal" ) .. {
		Name="PlayerText";
		InitCommand=cmd(x,pn == PLAYER_1 and (SCREEN_CENTER_X-238) or (SCREEN_CENTER_X+240);
			halign,.5;
			y,SCREEN_CENTER_Y+115;shadowlength,3;maxwidth,130);
		BeginCommand=cmd(visible,SCREENMAN:GetTopScreen():GetEnteringName(pn));
		OnCommand=cmd(finishtweening;diffusealpha,0;sleep,0.1;linear,0.3;diffusealpha,1);
		OffCommand=cmd(stoptweening;bouncebegin,0.3;zoom,0;addx,-200*P1);
		EntryChangedMessageCommand=function(self,params)
			if params.PlayerNumber ~= pn then
				return;
			end;
			self:settext( params.Text );
		end;
	};
end;
--
return t