local x = Def.ActorFrame{
	Def.Quad{
		InitCommand=cmd(Center;zoomto,SCREEN_WIDTH,48;diffuse,color("#FFFFFF"));
		OnCommand=cmd(fadebottom,0.15;fadetop,0.15);
		OffCommand=cmd(accelerate,0.15;zoomy,0);
	};

	AutoText("frutiger")..{
		Text=THEME:GetString("ScreenProfileLoad","Loading Profiles...");
		InitCommand=cmd(Center;diffuse,color("#000000");shadowlength,0);
		OffCommand=cmd(linear,0.15;diffusealpha,0);
	};
};

x[#x+1] = Def.Actor {
	BeginCommand=function(self)
		if SCREENMAN:GetTopScreen():HaveProfileToLoad() then self:sleep(0.15); end;
		self:queuecommand("Load");
	end;
	LoadCommand=function() SCREENMAN:GetTopScreen():Continue(); end;
};

--[[  tricky section ]]
-- apply AutoText in places where it normally can't by modifying redirs instead.
-- this requires Scripts/FileUtils.lua in order to work.
local TextBannerFont; -- frutiger; reused a ton
local TimerFont;

if IsHighDefinition() then
	TextBannerFont = fontAliases['frutiger'].Hires;
	TimerFont = fontAliases['blaster_shiny'].Hires;
else
	TextBannerFont = fontAliases['frutiger'].Lores;
	TimerFont = fontAliases['blaster_shiny'].Lores;
end;

-- frutiger
File.Write("Themes/moonlight/Fonts/TextBanner text.redir",TextBannerFont);
File.Write("Themes/moonlight/Fonts/MusicWheelItem course.redir",TextBannerFont);
File.Write("Themes/moonlight/Fonts/MusicWheelItem SectionCollapsed.redir",TextBannerFont);
File.Write("Themes/moonlight/Fonts/MusicWheelItem SectionExpanded.redir",TextBannerFont);
File.Write("Themes/moonlight/Fonts/MusicWheelItem sort.redir",TextBannerFont);
File.Write("Themes/moonlight/Fonts/ScreenTextEntry question.redir",TextBannerFont);
File.Write("Themes/moonlight/Fonts/ScreenGameplay song options.redir",TextBannerFont);
File.Write("Themes/moonlight/Fonts/ScreenEditMenu explanation.redir",TextBannerFont);
File.Write("Themes/moonlight/Fonts/ScreenEvaluation JudgmentLineNumber.redir",TextBannerFont);
-- these two might not be good
File.Write("Themes/moonlight/Fonts/EditMenu title.redir",TextBannerFont);
File.Write("Themes/moonlight/Fonts/EditMenu value.redir",TextBannerFont);
-- menu
File.Write("Themes/moonlight/Fonts/MenuTimer numbers.redir",TimerFont);
--[[ /tricky section ]]

return x;