function OnCreateContent()
-- creditsScreen
	
	CreateGraphics();
    CreateButtons();
end

function OnFreeContent()
--	loadScreen = nil;
--	questionText = nil;
end

function OnUpdate(dt)
end

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

function CreateGraphics()
	local bg = CreateSprite(); 
	bg:AttachTo(creditsScreen);
	bg:SetSprite('CreditsWindowTexture');
	bg:SetXY(SCREEN_WIDTH/2.0, SCREEN_HEIGHT/2.0);
	bg:SetZ(-0.2);
	bg:SetVisible(true);

	local bUpLayer = CreateSprite(); 
	bUpLayer:AttachTo(bg);
	bUpLayer:SetSprite('CreditsWindowLayerUpTexture');
	bUpLayer:SetXY(-8.0, -128.0);
	bUpLayer:SetZ(0.9);
	bUpLayer:SetVisible(true);

	local bUpLayer = CreateSprite(); 
	bUpLayer:AttachTo(bg);
	bUpLayer:SetSprite('CreditsWindowLayerBottomTexture');
	bUpLayer:SetXY(-8.0, 144.0);
	bUpLayer:SetZ(0.9);
	bUpLayer:SetVisible(true);

	CreateWindowShade(bg);
end

function CreateButtons()
	do
		local button = CreateButton('ButtonUp','ButtonOver','ButtonDown', 'OK', creditsScreen);
		button:AttachTo(creditsScreen);
		button:SetXY(SCREEN_WIDTH/2.0-10.0, 560.0);
		button:SetZ(1);
		button:SetVisible(true);

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