local index = Var("GameCommand"):GetIndex();
local japanese = (THEME:GetCurLanguage() == "ja")

local t = Def.ActorFrame{
	AutoText( "frutiger" ) ..{
		Name="Choice"..index;
		Text=THEME:GetString( 'ScreenTitleMenu', Var("GameCommand"):GetText() );
		InitCommand=cmd(zoom,japanese and 0.75 or 0.85;y,japanese and -6 or -1;shadowlength,0;diffuse,color("#000000");halign,1;diffusetopedge,color("0.25,0.25,0.25,1");NoStroke;);
		DisabledCommand=cmd( diffuse,color("0.45,0,0,1") );
		GainFocusCommand=cmd(stoptweening;accelerate,0.15;diffuse,color("#000000");glow,color("1,1,1,0.5");decelerate,0.05;glow,color("1,1,1,0.0"));
		LoseFocusCommand=cmd(stoptweening;accelerate,0.2;diffuse,color("#888888");glow,color("1,1,1,0.0"));
	};

	-- main
	LoadActor( THEME:GetPathG("","_selector") )..{
		Name="Selector";
		InitCommand=cmd(x,40;zoomx,256;skewx,-0.005;diffusealpha,0.75;fadeleft,0.35;faderight,0.15;horizalign,right);
		GainFocusCommand=cmd(finishtweening;accelerate,0.2;cropleft,0;glow,color("1,1,1,0.5");decelerate,0.5;glow,color("1,1,1,0.0"););
		LoseFocusCommand=cmd(stoptweening;accelerate,0.125;cropleft,1);
	};

	Def.Actor{
		Name="HackController";
		OffFocusedCommand=function(self)
			if index == 4 then -- index starts at 0, remember?
				GAMESTATE:Env()['TitleOut'] = "Goodbye";
			else
				GAMESTATE:Env()['TitleOut'] = "Normal";
			end;
		end;
	};
};

if japanese then
	t[#t+1] = AutoText( "frutiger" ) ..{
		Name="ChoiceSub"..index;
		Text=THEME:GetString('ScreenTitleMenu', Var("GameCommand"):GetText().."-Sub");
		InitCommand=cmd(zoom,0.4;x,0;y,7;shadowlength,0;diffuse,color("#000000");halign,1;NoStroke;);
		DisabledCommand=cmd( diffuse,color("0.45,0,0,1") );
		GainFocusCommand=cmd(stoptweening;accelerate,0.2;diffuse,color("#000000FF"););
		LoseFocusCommand=cmd(stoptweening;accelerate,0.125;diffuse,color("#88888800"););
	};
end

return t;