local gc = Var("GameCommand")

--local useArrow = GAMESTATE:GetCurrentGame():GetName() ~= "para" or (gc:GetName() == "Freestyle" or gc:GetName() == "Parapara")
local useArrow = true
local useRightArrow = gc:GetName() == "Freestyle" or gc:GetName() == "Nonstop"

return Def.ActorFrame {
	EnabledCommand=cmd(diffusealpha,1),
	DisabledCommand=cmd(diffusealpha,0.4),
	GainFocusCommand=function(self)
		MESSAGEMAN:Broadcast("ModeFocus", {Velocity = useRightArrow and -0.1 or 0.1})
	end,
	Def.ActorFrame {
		Condition = useArrow,
		--hacky
		OnCommand=cmd(rotationz,useRightArrow and 180 or 0),
		LoadActor("base"),
		LoadActor("base") .. {
			OnCommand=cmd(blend,Blend.Add),
			GainFocusCommand=cmd(stoptweening;linear,0.01;glowshift;effectcolor1,LocalBlueColor(0.2);effectcolor2,LocalBlueColor(0)),
			LoseFocusCommand=cmd(stoptweening;linear,0.01;stopeffect;glow,Color.Stealth)
		},
		LoadActor("glow") .. {
			OnCommand=cmd(diffuse,GameModeToColor(gc:GetName()))
		},
		LoadActor("lining") .. {
			GainFocusCommand=cmd(stoptweening;linear,0.01;diffuseshift;effectcolor1,Color.White;effectcolor2,ColorBlend(Color.White, GameModeToColor(gc:GetName()))),
			LoseFocusCommand=cmd(stoptweening;linear,0.01;stopeffect;diffuse,GameModeToColor(gc:GetName()))
		},
	},
	LoadFont("Common BEEG") .. {
		Text=string.upper(gc:GetText()),
		OnCommand=cmd(zoom,0.7),
		GainFocusCommand=cmd(stoptweening;linear,0.01;diffuse,Color.White;strokecolor,GameModeToColor(gc:GetName())),
		LoseFocusCommand=cmd(stoptweening;linear,0.01;diffuse,GameModeToColor(gc:GetName());strokecolor,Color.Stealth)
	}
}