<ActorFrame InitCommand="%function(self)
IconName = 'Options'
IconTitle = 'Options'
IconDesc = 'Change various options.'
LineSpacing = 96;
VertHeight = SCREEN_CENTER_Y;
iconChangeFocusSeconds = 0.15; -- was 0.05

local rot = { x = 0, y = 0, z = 0 };

end"><children>

	<Layer Type="ActorFrame"><children>
		<!-- vert lines -->
		<Layer Type="Quad"
		InitCommand="x,-LineSpacing;zoomto,2,VertHeight;fadetop,0.25;fadebottom,0.25;"
		GainFocusCommand="finishtweening;linear,0.2;diffuse,#FFF186"
		LoseFocusCommand="finishtweening;linear,0.2;diffuse,#FFFFFF"
		OffFocusedCommand="accelerate,0.15;zoomx,4;sleep,0.5;decelerate,0.5;diffusealpha,0;"
		OffUnfocusedCommand="accelerate,0.15;zoomy,0;"
		/>

		<Layer Type="Quad"
		InitCommand="x,LineSpacing;zoomto,2,VertHeight;fadetop,0.25;fadebottom,0.25"
		GainFocusCommand="finishtweening;linear,0.2;diffuse,#FFF186"
		LoseFocusCommand="finishtweening;linear,0.2;diffuse,#FFFFFF"
		OffFocusedCommand="accelerate,0.15;zoomx,4;sleep,0.5;decelerate,0.5;diffusealpha,0"
		OffUnfocusedCommand="accelerate,0.15;zoomy,0"
		/>

		<!-- before BG -->
		<Layer Type="ActorFrame" InitCommand="fov,45"
		GainFocusCommand="linear,0.2;diffusealpha,0.5"
		LoseFocusCommand="stoptweening;diffusealpha,0"
		OffCommand="decelerate,2;diffusealpha,0"><children>

		<!-- texcoordvelocity: -1 to the right, 1 to the left. -->
		<!-- center wall 1: top -->
		<Layer File="_tex" 
		InitCommand="y,-4;z,-94;zoomto,164,VertHeight*0.85;texcoordvelocity,0,0.125;cropbottom,0.5"
		/>

		<!-- center wall 2: bottom -->
		<Layer File="_tex" 
		InitCommand="y,-4;z,-94;zoomto,164,VertHeight*0.85;texcoordvelocity,0,-0.125;croptop,0.5"
		/>

		<!-- floor -->
		<Layer File="_tex" 
		InitCommand="z,0;y,100;zoomto,163,VertHeight;texcoordvelocity,0,0.25;rotationx,-90"
		/>

		<!-- floor shadow? -->
		<!-- <Layer File="_tex" 
		InitCommand="z,0;y,100;zoomto,163,VertHeight;rotationx,-90;diffuse,0,0,0,1;diffusealpha,0.75;fadebottom,0.5"
		/> -->

		<!-- left side -->
		<Layer File="_tex" 
		InitCommand="x,-86;y,-1;z,-33;zoomto,244,VertHeight*0.9125;texcoordvelocity,-0.25,0;rotationy,-90"
		/>

		<!-- right side -->
		<Layer File="_tex" 
		InitCommand="x,86;y,-1;z,-33;zoomto,244,VertHeight*0.9125;texcoordvelocity,0.25,0;rotationy,90"
		/>

		<!-- ceiling -->
		<Layer File="_tex" 
		InitCommand="z,0;y,-106;zoomto,164,VertHeight;texcoordvelocity,0,-0.25;rotationx,90"
		/>

		</children></Layer>

		<!-- item background -->
		<Layer Type="Quad"
			InitCommand="%function(self)
			self:zoomto(190,VertHeight);
			self:fadetop(0.25);
			self:diffusecolor( OptionColors[2][1],OptionColors[2][2],OptionColors[2][3],OptionColors[2][4] );
			self:fadebottom(0.25);
			self:blend('WeightedMultiply');
			end"
			GainFocusCommand="%function(self)
			self:stoptweening();
			self:decelerate(0.75);
			self:diffusecolor( OptionColorsFocused[2][1],OptionColorsFocused[2][2],OptionColorsFocused[2][3],OptionColorsFocused[2][4] )
			end"
			LoseFocusCommand="%function(self)
			self:stoptweening();
			self:accelerate(0.3);
			self:diffusecolor( OptionColors[2][1],OptionColors[2][2],OptionColors[2][3],OptionColors[2][4] )
			end"
			OffFocusedCommand="%function(self)
				self:sleep(0.5);
				self:decelerate(0.5);
				self:zoomy(0);
			end"
			OffUnfocusedCommand="accelerate,0.5;zoomy,0;"
			/>

			<!-- item bg shine -->
		<Layer Type="Quad"
			InitCommand="%function(self)
						self:zoomto(190,20);
						self:y(-(VertHeight/2));
						self:vertalign('top');
						self:diffuse( OptionColorsBright[2][1],OptionColorsBright[2][2],OptionColorsBright[2][3],OptionColorsBright[2][4] );
						self:fadetop(0.15);
						self:fadebottom(0.75);
						self:blend('add');
					end"
			GainFocusCommand="diffusealpha,0.5;linear,0.2;addy,VertHeight/2;diffusealpha,0"
			LoseFocusCommand="stoptweening;diffusealpha,0;y,-(VertHeight/2)"
			/>

			<!-- icon base -->
		<Layer File="_icon"
		InitCommand="%function(self)
		self:diffuse( OptionColorsBright[2][1],OptionColorsBright[2][2],OptionColorsBright[2][3],OptionColorsBright[2][4] );
		end"
		GainFocusCommand="spring,iconChangeFocusSeconds;addy,-8"
		LoseFocusCommand="stoptweening;spring,iconChangeFocusSeconds;y,0"
		OffFocusedCommand="decelerate,0.5;zoom,1.25;sleep,0.5;decelerate,0.5;zoom,0;diffusealpha,0"
		OffUnfocusedCommand="spin;accelerate,0.5;zoom,0"
			/>

			<!-- image -->
		<Layer File="@'_title images/'..IconName"
		GainFocusCommand="spring,iconChangeFocusSeconds;diffusealpha,1;addy,-8"
		LoseFocusCommand="stoptweening;spring,iconChangeFocusSeconds;diffusealpha,0.05;y,0"
		OffCommand="decelerate,0.5;zoom,1.25;sleep,0.5;decelerate,0.5;zoom,0;diffusealpha,0"
			/>

			<!-- title -->
		<Layer Font="mentone/_24px" Text="@IconTitle"
		InitCommand="shadowlength,2;"
		GainFocusCommand="linear,iconChangeFocusSeconds;diffuse,#FFFFFF;y,20;glowshift;effectcolor2,1,0.9,0.33,0.25;"
		LoseFocusCommand="stoptweening;linear,iconChangeFocusSeconds;diffuse,#888888;y,0;stopeffect"
		DisabledCommand="diffuse,0.5,0.5,0.5,1"
		OffFocusedCommand="decelerate,0.5;zoom,1.25;sleep,0.5;decelerate,0.5;diffusealpha,0"
		OffUnfocusedCommand="accelerate,0.5;diffusealpha,0"
			/>

			<!-- explanation -->
		<Layer Font="mentone/_24px" Text="@IconDesc"
		InitCommand="shadowlength,1;y,SCREEN_CENTER_Y*0.65;zoom,1.125;wrapwidthpixels,256;diffusebottomedge,#CCCCCC;"
		GainFocusCommand="finishtweening;linear,0.5;diffusealpha,1"
		LoseFocusCommand="finishtweening;linear,0.5;diffusealpha,0"
		OffCommand="accelerate,0.5;diffusealpha,0"
			/>

	</children></Layer>

</children></ActorFrame>

</children></ActorFrame>