local gc = Var("GameCommand");
local s = THEME:GetString( 'ScreenTitleMenu', gc:GetText() );
local children;
-- underline variables
local underlineWidth = 0;
local underlineHeight = 2;
local underlineOffset = 12;

local t = Def.ActorFrame {
	InitCommand=function(self)
		children = self:GetChildren();
	end;
--[[
	LoadActor( THEME:GetPathG("","_common/bluespin") )..{
		InitCommand=cmd(zoom,0.5);
		GainFocusCommand=cmd(stoptweening;glowshift;effectcolor1,1,1,1,0.2;effectcolor2,1,1,1,0;linear,0.2;diffusealpha,1;);
		LoseFocusCommand=cmd(stoptweening;stopeffect;linear,0.2;diffusealpha,0);
	};
--]]

	LoadFont("_venacti bold 24px") ..{
		Name="Choice"..gc:GetIndex();
		InitCommand=cmd(uppercase,true;settext,s;horizalign,center;shadowlengthx,0;shadowlengthy,2;strokecolor,color("#00000044"););
		GainFocusCommand=cmd(stoptweening;linear,0.2;diffusealpha,1);
		LoseFocusCommand=cmd(stoptweening;linear,0.2;diffusealpha,0);
		DisabledCommand=cmd(diffuse,0.5,0.5,0.5,1);
		OffFocusedCommand=cmd(accelerate,0.3;diffusealpha,0);
	};

	--[[
	Def.Quad{
		Name="ItemUnderline";
		InitCommand=cmd(y,underlineOffset);
		BeginCommand=function(self)
			local idx = gc:GetIndex();
			local item = children["Choice"..idx];
			underlineWidth = item:GetZoomedWidth();
			self:zoomto(underlineWidth,underlineHeight);
		end;
		GainFocusCommand=cmd(stoptweening;sleep,0.0625;accelerate,0.125;zoomto,underlineWidth,underlineHeight);
		LoseFocusCommand=cmd(stoptweening;decelerate,0.125;zoomto,0,underlineHeight);
		OffFocusedCommand=cmd(accelerate,0.3;zoomto,SCREEN_WIDTH*2,0;diffusealpha,0);
	};
	--]]
};

return t;
