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

function OnFreeContent()
end

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

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

--[[
	local textTitle = CreateTextEntity('GUICaptionFont', 'HELP');
	textTitle:SetName('HelpText');
    textTitle:AttachTo(bg);
	textTitle:SetXY(0.0, -195.0);
	textTitle:SetZ(0.1);
	textTitle:SetScale(1.2);
--]]
	CreateWindowShade(bg, -1.0, '0xEEFFFFFF');
end

function CreateButtons()
	local captionColor = '0xFF703030';
	local captionScale = 1.2;
	local captionDY	   = -3.0;
	local captionDX	   = -6.0;

	do
		local button = CreateButton('InGameMenuButtonUp','InGameMenuButtonOver','InGameMenuButtonDown', 'MSG_RESUME', ingameMenuSceen);
		button:AttachTo(ingameMenuSceen);
		button:SetXY(SCREEN_WIDTH/2.0, 290.0);
		button:SetZ(-0.1);
		button:SetVisible(true);

		local caption = CreateTextEntity('GUIFont', 'RESUME');
		caption:SetName('ResumeButtonCaption');
	    caption:AttachTo(button);
		caption:SetColor(captionColor);
		caption:SetScale(captionScale);
		caption:SetXY(captionDX, captionDY);
		caption:SetZ(0.05);
	end
---[[
	do
		local button = CreateButton('InGameMenuButtonUp','InGameMenuButtonOver','InGameMenuButtonDown', 'MSG_OPTIONS', ingameMenuSceen);
		button:AttachTo(ingameMenuSceen);
		button:SetXY(SCREEN_WIDTH/2.0, 370.0);
		button:SetZ(-0.1);
		button:SetVisible(true);

		local caption = CreateTextEntity('GUIFont', 'OPTIONS');
		caption:SetName('OptionsButtonCaption');
	    caption:AttachTo(button);
		caption:SetColor(captionColor);
		caption:SetScale(captionScale);
		caption:SetXY(captionDX, captionDY);
		caption:SetZ(0.05);
	end
	do
		local button = CreateButton('InGameMenuButtonUp','InGameMenuButtonOver','InGameMenuButtonDown', 'MSG_EXIT', ingameMenuSceen);
		button:AttachTo(ingameMenuSceen);
		button:SetXY(SCREEN_WIDTH/2.0, 450.0);
		button:SetZ(-0.1);
		button:SetVisible(true);

		local caption = CreateTextEntity('GUIFont', 'EXIT');
		caption:SetName('ExitButtonCaption');
	    caption:AttachTo(button);
		caption:SetColor(captionColor);
		caption:SetScale(captionScale);
		caption:SetXY(captionDX, captionDY);
		caption:SetZ(0.05);
	end
--]]
end
