require( "scripts/style.lua" );

-- The "Twodemos" game handles its messages in Lua, unlike the "TGame" game
-- which handles them in C++.
function SendGameMessage( msg )
	if msg=="quit" then
		QuitToMainMenu();
	end
end

function TestGameAsk2Map()
	result = DisplayDialog {
		"scripts/yesno.lua",
		body ="gameAsk2Map",
		title = "quittitle"
		};
end

function TestGameAsk2MainMenu()
	result = DisplayDialog {
		"scripts/yesno.lua",
		body ="gameAsk2MainMenu",
		title = "quittitle"
		};
end

function QuitFromGame()
	PostMessage( CreateNamedMessage( kQuitNow, "Quit" ) );
end

MakeDialog
{
	name="MainGame",
	
	MainGame
	{
		x=0,
		y=0,
		w=1024, h=768, 		
		-- posx.  posy,  efftime, waittime
		shadow ="backgrounds/sh1;0,0,1024,768;0.3;0.8",
	},
	
}