function OnCreateContent()
-- profilesScreen
	
	CreateGraphics();
    CreateButtons();
	PlaySound('L99S01');
end

function OnFreeContent()
end

------------------------------------------------------------------------------
--// auxiliary functions

function CreateGraphics()
	local bg = CreateSprite(); 
	bg:SetName('CreditsWindow');
	bg:AttachTo(profilesScreen);
	bg:SetSprite('CreditsWindowTexture');
	bg:SetXY(SCREEN_WIDTH/2.0, SCREEN_HEIGHT/2.0);
	bg:SetZ(-0.2);
--bg:SetColor('0x20FFFFFF');
	bg:SetVisible(true);

	local textTitle = CreateTextEntity('GUICaptionFont', 'PLAYERS');
	textTitle:SetName('PlayersText');
    textTitle:AttachTo(bg);
	textTitle:SetXY(0.0, -115.0);
	textTitle:SetZ(0.1);
	textTitle:SetScale(1.2);

	CreateWindowShade(bg);
end

function CreateButtons()
	do
		local button = CreateButton('ButtonUp','ButtonOver','ButtonDown', 'MSG_NEW_PLAYER', profilesScreen);
		button:AttachTo(profilesScreen);
		button:SetXY(SCREEN_WIDTH/2.0 - 167.0, 570.0);
		button:SetZ(-0.1);
		button:SetVisible(true);

		local caption = CreateTextEntity('GUICaptionFont', 'NP');
		caption:SetName('NewPlayerButtonCaption');
	    caption:AttachTo(button);
		caption:SetXY(0,0);
		caption:SetZ(0.05);
	end
	do
		local button = CreateButton('ButtonUp','ButtonOver','ButtonDown', 'MSG_DELETE_PLAYER', profilesScreen);
		button:AttachTo(profilesScreen);
		button:SetXY(SCREEN_WIDTH/2.0, 570.0);
		button:SetZ(-0.1);
		button:SetVisible(true);

		local caption = CreateTextEntity('GUICaptionFont', 'DL');
		caption:SetName('DeletePlayerButtonCaption');
	    caption:AttachTo(button);
		caption:SetXY(0,0);
		caption:SetZ(0.05);
	end
	do
		local button = CreateButton('ButtonUp','ButtonOver','ButtonDown', 'MSG_OK', profilesScreen);
		button:AttachTo(profilesScreen);
		button:SetXY(SCREEN_WIDTH/2.0 + 167.0, 570.0);
		button:SetZ(-0.1);
		button:SetVisible(true);

		local caption = CreateTextEntity('GUICaptionFont', 'OK');
		caption:SetName('OkButtonCaption');
	    caption:AttachTo(button);
		caption:SetXY(0,0);
		caption:SetZ(0.05);
	end
end
