local t = Def.ActorFrame {



Def.ActorFrame {

LoadActor("STAGE1.png") .. {
	OnCommand=function(self)
		if GAMESTATE:GetCurrentStage() == "Stage_1st" then	
			self:x(SCREEN_WIDTH/2);
			self:y(30);
		else
			self:diffusealpha(0);
		end;

		-- always visible while playing doubles
		if GAMESTATE:GetCurrentStyle():GetName() == "double" then
			self:x(SCREEN_WIDTH/2+280);
			self:y(30);
			self:visible(1);
		end;

		
	end;
};

LoadActor("STAGE2.png") .. {
	OnCommand=function(self)
		if GAMESTATE:GetCurrentStage() == "Stage_2nd" then	
			self:x(SCREEN_WIDTH/2);
			self:y(30);
		else
			self:diffusealpha(0);
		end;

		-- always visible while playing doubles
		if GAMESTATE:GetCurrentStyle():GetName() == "double" then
			self:x(SCREEN_WIDTH/2+280);
			self:y(30);
			self:visible(1);
		end;

		
	end;
};

LoadActor("STAGE3.png") .. {
	OnCommand=function(self)
		if GAMESTATE:GetCurrentStage() == "Stage_3rd" or GAMESTATE:GetCurrentStage() == "Stage_Final" then	
			self:x(SCREEN_WIDTH/2);
			self:y(30);
		else
			self:diffusealpha(0);
		end;

		-- always visible while playing doubles
		if GAMESTATE:GetCurrentStyle():GetName() == "double" then
			self:x(SCREEN_WIDTH/2+280);
			self:y(30);
			self:visible(1);
		end;

		
	end;
};

LoadActor("STAGE4.png") .. {
	OnCommand=function(self)
		if GAMESTATE:GetCurrentStage() == "Stage_Extra1" or  GAMESTATE:GetCurrentStage() == "Stage_Extra2" then
			self:x(SCREEN_WIDTH/2);
			self:y(30);
		else
			self:diffusealpha(0);
		end;


		-- always visible while playing doubles
		if GAMESTATE:GetCurrentStyle():GetName() == "double" then
			self:x(SCREEN_WIDTH/2+280);
			self:y(30);
			self:visible(1);
		end;
		
	end;
};






		LoadActor("1Pscore.png")..{
			OnCommand=function(self)
			
				if GAMESTATE:IsSideJoined('PlayerNumber_P1') == true then
					self:x(40);
					self:y(20);
				else
					self:diffusealpha(0);					
				end;
			
			end;
		};

		LoadActor("2Pscore.png")..{
			OnCommand=function(self)
			
				if GAMESTATE:IsSideJoined('PlayerNumber_P2') == true then
					self:x(SCREEN_WIDTH/2+130);
					self:y(20);
				else
					self:diffusealpha(0);					
				end;

		-- always hide while playing doubles
		if GAMESTATE:GetCurrentStyle():GetName() == "double" then
			self:visible(0);
		end;

			
			end;
		};
		
		LoadActor("HIDDEN")..{

		Name="vishid";
		OnCommand=cmd(x,SCREEN_WIDTH/2-270;y,SCREEN_HEIGHT/2+180);

		};	

		LoadActor("SUDDEN")..{

		Name="vissud";
		OnCommand=cmd(x,SCREEN_WIDTH/2-270;y,SCREEN_HEIGHT/2+180);

		};	

		LoadActor("BLINK")..{

		Name="visblink";
		OnCommand=cmd(x,SCREEN_WIDTH/2-270;y,SCREEN_HEIGHT/2+180);

		};	

		LoadActor("BLIND")..{

		Name="visblind";
		OnCommand=cmd(x,SCREEN_WIDTH/2-270;y,SCREEN_HEIGHT/2+180);

		};	





		LoadActor("HIDDEN")..{

		Name="vishidp2";
		OnCommand=cmd(x,SCREEN_WIDTH/2+270;y,SCREEN_HEIGHT/2+180);

		};	

		LoadActor("SUDDEN")..{

		Name="vissudp2";
		OnCommand=cmd(x,SCREEN_WIDTH/2+270;y,SCREEN_HEIGHT/2+180);

		};	

		LoadActor("BLINK")..{

		Name="visblinkp2";
		OnCommand=cmd(x,SCREEN_WIDTH/2+270;y,SCREEN_HEIGHT/2+180);

		};	

		LoadActor("BLIND")..{

		Name="visblindp2";
		OnCommand=cmd(x,SCREEN_WIDTH/2+270;y,SCREEN_HEIGHT/2+180);

		};	


		-----------  transform mods -------------------

		LoadActor("Flip")..{

		Name="transflip";
		OnCommand=cmd(x,SCREEN_WIDTH/2-270;y,SCREEN_HEIGHT/2+150);

		};	

		LoadActor("ROTATE-L")..{

		Name="transrotl";
		OnCommand=cmd(x,SCREEN_WIDTH/2-270;y,SCREEN_HEIGHT/2+150);

		};	

		LoadActor("ROTATE-R")..{

		Name="transrotr";
		OnCommand=cmd(x,SCREEN_WIDTH/2-270;y,SCREEN_HEIGHT/2+150);

		};	

		LoadActor("RANDOM")..{

		Name="transrandom";
		OnCommand=cmd(x,SCREEN_WIDTH/2-270;y,SCREEN_HEIGHT/2+150);

		};	


		LoadActor("Flip")..{

		Name="transflipp2";
		OnCommand=cmd(x,SCREEN_WIDTH/2+270;y,SCREEN_HEIGHT/2+150);

		};	

		LoadActor("ROTATE-L")..{

		Name="transrotlp2";
		OnCommand=cmd(x,SCREEN_WIDTH/2+270;y,SCREEN_HEIGHT/2+150);

		};	

		LoadActor("ROTATE-R")..{

		Name="transrotrp2";
		OnCommand=cmd(x,SCREEN_WIDTH/2+270;y,SCREEN_HEIGHT/2+150);

		};	

		LoadActor("RANDOM")..{

		Name="transrandomp2";
		OnCommand=cmd(x,SCREEN_WIDTH/2+270;y,SCREEN_HEIGHT/2+150);

		};	


		-----------  speed mods -------------------
		-- ez2dancers speed mods (2x,4x) roughly equate to ddrs 2x and 4x

		LoadActor("Speed_4")..{

		Name="speed4x";
		OnCommand=cmd(x,SCREEN_WIDTH/2-270;y,SCREEN_HEIGHT/2+120);

		};	

		LoadActor("Speed_2")..{
		Name="speed2x";
		OnCommand=cmd(x,SCREEN_WIDTH/2-270;y,SCREEN_HEIGHT/2+120);

		};	


		LoadActor("Speed_4")..{

		Name="speed4xp2";
		OnCommand=cmd(x,SCREEN_WIDTH/2+270;y,SCREEN_HEIGHT/2+120);

		};	

		LoadActor("Speed_2")..{
		Name="speed2xp2";
		OnCommand=cmd(x,SCREEN_WIDTH/2+270;y,SCREEN_HEIGHT/2+120);

		};	

	 	OnCommand=function(self)
	 	
	
	 	
	 	
			local p1opts = GAMESTATE:GetPlayerState("PlayerNumber_P1"):GetPlayerOptions("ModsLevel_Preferred");
			local speed2 = self:GetChild("speed2x");
			local speed4 = self:GetChild("speed4x");
			
			local transflip = self:GetChild("transflip");
			local transrotl = self:GetChild("transrotl");
			local transrotr = self:GetChild("transrotr");
			local transrandom = self:GetChild("transrandom");
			
			local vishid = self:GetChild("vishid");
			local vissud = self:GetChild("vissud");
			local visblink = self:GetChild("visblink");
			local visblind = self:GetChild("visblind");



			local p2opts = GAMESTATE:GetPlayerState("PlayerNumber_P2"):GetPlayerOptions("ModsLevel_Preferred");
			local speed2p2 = self:GetChild("speed2xp2");
			local speed4p2 = self:GetChild("speed4xp2");
			
			local transflipp2 = self:GetChild("transflipp2");
			local transrotlp2 = self:GetChild("transrotlp2");
			local transrotrp2 = self:GetChild("transrotrp2");
			local transrandomp2 = self:GetChild("transrandomp2");
			
			local vishidp2 = self:GetChild("vishidp2");
			local vissudp2 = self:GetChild("vissudp2");
			local visblinkp2 = self:GetChild("visblinkp2");
			local visblindp2 = self:GetChild("visblindp2");



			speed2p2:visible(0);
			speed4p2:visible(0);
			transrandomp2:visible(0);
			transrotrp2:visible(0);
			transrotlp2:visible(0);
			transflipp2:visible(0);
			visblindp2:visible(0);
			visblinkp2:visible(0);
			vissudp2:visible(0);
			vishidp2:visible(0);

			speed2:visible(0);
			speed4:visible(0);
			transrandom:visible(0);
			transrotr:visible(0);
			transrotl:visible(0);
			transflip:visible(0);
			visblind:visible(0);
			visblink:visible(0);
			vissud:visible(0);
			vishid:visible(0);
			
			if string.find(p1opts,"2x") == 1 then
				speed2:visible(1);
			elseif string.find(p1opts,"4x") == 1 then
				speed4:visible(1);
			end;
	 	
			if string.find(p1opts,".*Mirror.*") == 1 then
				transflip:visible(1);
			elseif string.find(p1opts,".*Left.*") == 1 then
				transrotl:visible(1);
			elseif string.find(p1opts,".*Right.*") == 1 then
				transrotr:visible(1);
			elseif string.find(p1opts,".*Shuffle.*") == 1 then
				transrandom:visible(1);
			end;
		 	
		 	
			if string.find(p1opts,".*Hidden.*") == 1 then
				vishid:visible(1);
			elseif string.find(p1opts,".*Sudden.*") == 1 then
				vissud:visible(1);
			elseif string.find(p1opts,".*Blink.*") == 1 then
				visblink:visible(1);
			elseif string.find(p1opts,".*Stealth.*") == 1 then
				visblind:visible(1);
			end;		 	
		 	




			if string.find(p2opts,"2x") == 1 then
				speed2p2:visible(1);
			elseif string.find(p2opts,"4x") == 1 then
				speed4p2:visible(1);
			end;
	 	
			if string.find(p2opts,".*Mirror.*") == 1 then
				transflipp2:visible(1);
			elseif string.find(p2opts,".*Left.*") == 1 then
				transrotlp2:visible(1);
			elseif string.find(p2opts,".*Right.*") == 1 then
				transrotrp2:visible(1);
			elseif string.find(p2opts,".*Shuffle.*") == 1 then
				transrandomp2:visible(1);
			end;
		 	
		 	
			if string.find(p2opts,".*Hidden.*") == 1 then
				vishidp2:visible(1);
			elseif string.find(p2opts,".*Sudden.*") == 1 then
				vissudp2:visible(1);
			elseif string.find(p2opts,".*Blink.*") == 1 then
				visblinkp2:visible(1);
			elseif string.find(p2opts,".*Stealth.*") == 1 then
				visblindp2:visible(1);
			end;
		 	
		 	
	 	end;

	};

};

return t;