-- [v1.4] darken the BG a bit more for SMO so the text is more readable
local screen = SCREENMAN:GetTopScreen();
local callingScreen;
if screen then
	callingScreen = screen:GetName();
end;

local diffuse = 0.5;
if callingScreen and callingScreen == "ScreenSMOnlineSelectMusic" then
	diffuse = 0.75;
end

local t = Def.ActorFrame{
	Def.ActorFrame{
		Name="PageBG";
		OnCommand=cmd(playcommandonchildren,"TopDown");
		OffCommand=cmd(playcommandonchildren,"BottomUp");
		
		TopDownCommand=cmd(finishtweening;fadebottom,1;cropbottom,1;decelerate,0.25;fadebottom,0;cropbottom,0);
		BottomUpCommand=cmd(finishtweening;fadebottom,0;cropbottom,0;decelerate,0.5;fadebottom,1;cropbottom,1);
		
		-- border
		Def.Quad{
			InitCommand=cmd(diffuse,0,0,0,diffuse;diffusetopedge,0.8,0.8,0.8,diffuse;zoomto,SCREEN_WIDTH*0.9+8,SCREEN_CENTER_Y+96+8);
		};
		-- background
		LoadActor("background")..{
			InitCommand=cmd(diffusealpha,0.2;zoomto,SCREEN_WIDTH*0.9,SCREEN_CENTER_Y+96);
		};
		-- main
		Def.Quad{
			InitCommand=cmd(diffuse,0.5,0.5,0.5,diffuse;diffusebottomedge,0,0,0,diffuse;zoomto,SCREEN_WIDTH*0.9,SCREEN_CENTER_Y+96);
		};
	};
	
	-- fridge
	LoadActor( THEME:GetPathB("","_frame 3x3"), "_rounded normal", SCREEN_WIDTH*0.873, 24)..{
		InitCommand=cmd(y,204;diffusealpha,0);
		OnCommand=cmd(linear,0.2;diffusealpha,1;zoomx,1);
		OffCommand=cmd(linear,0.2;zoomx,0);
	};
};

return t;