-- this is so important it has its own file.

local textMaxWidth = 212;
local dColor = color("1,1,1,0.8");

function TextBannerSet(self,param)
	local Title = self:GetChild("Title");
	local Subtitle = self:GetChild("Subtitle");
	local Artist = self:GetChild("Artist");
	
	-- no subtitle
	if Subtitle:GetText() == "" then
		( cmd( horizalign,left;maxwidth,textMaxWidth;y,-10;diffuse,dColor ) )(Title);
		( cmd( visible,false ) )(Subtitle);
		( cmd( horizalign,left;maxwidth,textMaxWidth;y,10;diffuse,dColor ) )(Artist);
	
	-- yes subtitle
	else
		( cmd( horizalign,left;maxwidth,textMaxWidth;y,-20;diffuse,dColor ) )(Title);
		( cmd( horizalign,left;maxwidth,textMaxWidth;visible,true;diffuse,dColor ) )(Subtitle);
		( cmd( horizalign,left;maxwidth,textMaxWidth;y,20;diffuse,dColor ) )(Artist);
	end
end