local iIndex = Var("GameCommand"):GetIndex();
local sName = Var("GameCommand"):GetName();
local sGameName = GAMESTATE:GetCurrentGame():GetName();

local t = Def.ActorFrame{
	Name="Item"..iIndex;
	InitCommand=cmd(fov,90);
	
	OffFocusedCommand=cmd(linear,0.2;y,SCREEN_CENTER_Y);
	OffUnfocusedCommand=cmd(runcommandsonleaves,cmd(linear,0.2;diffusealpha,0));
	
	LoadActor( THEME:GetPathB("","_frame 3x3"), "_rounded blackinset normal", SCREEN_WIDTH*0.625, 64)..{
		Name="BGFrame";
		GainFocusCommand=cmd(finishtweening;linear,0.2;diffuse,color("1,1,1,1"));
		LoseFocusCommand=cmd(linear,0.2;diffuse,color("0.5,0.5,0.5,1"););
	};
	
	LoadActor("_preview "..sName)..{
		InitCommand=cmd(x,-160);
		GainFocusCommand=cmd(finishtweening;linear,0.2;diffuse,1,1,1,1;);
		LoseFocusCommand=cmd(linear,0.2;diffuse,0.5,0.5,0.5,1;);
	};
	
	LoadFont("_frutiger lt std 55 roman 24px")..{
		Name="ModeName"..iIndex;
		Text=THEME:GetString(Var 'LoadingScreen',sName);
		InitCommand=cmd(x,-100;y,-10;horizalign,left;shadowlength,0);
		GainFocusCommand=cmd(finishtweening;linear,0.2;diffuse,1,1,1,1;);
		LoseFocusCommand=cmd(linear,0.2;diffuse,0.5,0.5,0.5,1;);
	};
	LoadFont("_frutiger lt std 55 roman 24px")..{
		Name="ModeDesc"..iIndex;
		Text=THEME:GetString(Var 'LoadingScreen',sName.."Desc");
		InitCommand=cmd(x,-100;y,10;horizalign,left;shadowlength,0;zoom,0.8);
		GainFocusCommand=cmd(finishtweening;linear,0.2;diffuse,1,1,1,1;);
		LoseFocusCommand=cmd(linear,0.2;diffuse,0.5,0.5,0.5,1;);
	};
};

return t;