local name = Var("GameCommand"):GetName();

local rings = {
	Para = "pink",
	Tech = "blue",
	Tra  = "Yellow",
	OpenPlay = "white",
	FreeStyle = "green",
	Club = "red",
};

local t = Def.ActorFrame {
	Def.ActorFrame {
		LoadActor( rings[name].."spin" )..{
			Name=name.."Ring";
			InitCommand=cmd(effectmagnitude,0,0,90;blend,"BlendMode_Add";);
			OnCommand=cmd(diffusealpha,0;decelerate,0.5;diffusealpha,1;);
			GainFocusCommand=cmd(accelerate,0.15;zoom,0.8;spin;effectmagnitude,0,0,30;);
			LoseFocusCommand=cmd(stoptweening;accelerate,0.15;zoom,0.65;stopeffect;);
			--OffFocusedCommand=cmd(decelerate,0.25;zoom,1;diffusealpha,1;sleep,0;accelerate,0.3;diffusealpha,0;);
			OffFocusedCommand=function(self)
				( cmd(decelerate,0.25;zoom,1;diffusealpha,1;sleep,0;accelerate,0.3;diffusealpha,0;) )(self);
				MESSAGEMAN:Broadcast("DifficultySelected",{Type = name});
			end;
			OffUnfocusedCommand=cmd(accelerate,0.2;diffusealpha,0);
		};
--[[
		LoadActor( "modenonstop" )..{
			Name=name.."Nonstop";
			InitCommand=cmd(effectmagnitude,0,0,90;blend,"BlendMode_Add";);
			OnCommand=cmd(diffusealpha,0;decelerate,0.5;diffusealpha,0;);
			--GainFocusCommand=cmd(accelerate,0.15;diffusealpha,1;zoom,0.6;spin;effectmagnitude,0,0,-30;);
			GainFocusCommand=function(self)
				if mode == "regular" then
					self:diffusealpha(0);
				else
					self:accelerate(0.15);
					self:blend(BlendMode_add);
					self:diffusealpha(1);
					self:zoom(0.6);
					self:spin();
					self:effectmagnitude(0,0,-30);
				end;
			end;
			LoseFocusCommand=cmd(stoptweening;accelerate,0.15;zoom,0.65;stopeffect;diffusealpha,0);
			OffFocusedCommand=cmd(decelerate,0.25;zoom,1;diffusealpha,1;sleep,0;accelerate,0.3;diffusealpha,0;);
			OffUnfocusedCommand=cmd(accelerate,0.2;diffusealpha,0);
		};

		LoadActor( "modeendless" )..{
			Name=name.."Endless";
			InitCommand=cmd(effectmagnitude,0,0,90;blend,"BlendMode_Add";);
			OnCommand=cmd(diffusealpha,0;decelerate,0.5;diffusealpha,0;);
			--GainFocusCommand=cmd(accelerate,0.15;diffusealpha,1;zoom,0.8;spin;effectmagnitude,0,0,-30;);
			GainFocusCommand=function(self)
				if mode == "regular" then
					self:diffusealpha(0);
				else
					self:accelerate(0.15);
					self:diffusealpha(1);
					self:zoom(0.8);
					self:spin();
					self:effectmagnitude(0,0,-30);
				end;
			end;
			LoseFocusCommand=cmd(stoptweening;accelerate,0.15;zoom,0.65;stopeffect;diffusealpha,0);
			OffFocusedCommand=cmd(decelerate,0.25;zoom,1;diffusealpha,1;sleep,0;accelerate,0.3;diffusealpha,0;);
			OffUnfocusedCommand=cmd(accelerate,0.2;diffusealpha,0);
		};
--]]

--[[
		LoadActor( rings[name].."spin" )..{
			Name=name.."RingGlow";
			InitCommand=cmd(effectmagnitude,0,0,90;diffusealpha,0.1;blend,'BlendMode_Add');
			GainFocusCommand=cmd(accelerate,0.15;zoom,0.8;spin;diffusealpha,0.2);
			LoseFocusCommand=cmd(stoptweening;accelerate,0.15;zoom,0.65;stopeffect;diffusealpha,0);
			OffFocusedCommand=cmd(accelerate,0.2;x,SCREEN_CENTER_X;zoom,1;sleep,0.5;accelerate,0.25;zoom,0);
			OffUnfocusedCommand=cmd(accelerate,0.2;diffusealpha,0);
		};

--]]

		LoadActor( "_text "..name )..{
			Name=name.."Text";
			InitCommand=cmd(diffusealpha,0;);
			OnCommand=cmd(decelerate,0.5;diffusealpha,1;);
			GainFocusCommand=cmd(accelerate,0.15;zoom,0.8;glowshift;effectperiod,2;effectcolor1,1,1,1,0.0;effectcolor2,1,1,1,0.5;);
			LoseFocusCommand=cmd(stoptweening;stopeffect;accelerate,0.15;zoom,0.6);
			OffFocusedCommand=cmd(stoptweening;decelerate,0.25;zoom,1.2;diffusealpha,1;sleep,0;accelerate,0.3;diffusealpha,0;);
			OffUnfocusedCommand=cmd(accelerate,0.2;diffusealpha,0);
		};
	};
};



return t;