require( "scripts/style.lua" );
DebugOut("ChooseLanguage");

NameFont = {
  standardFont,
  24,
  BlackColor
};

HeaderFont = {
  standardFont,
  48,
  BlackColor
};

ButtonX = kCenter;
ButtonY = 90;
ButtonYSpace = 30;

MakeDialog
{
	-- Name the modal dialog
	name="chooselanguage",
	Bitmap
	{ 
		image="backgrounds/largedialog",
		x=kCenter,
		y=kCenter,
		
		ChooseLanguage
		{
			x = 0, y = 0, w=kMax, h=kMax,
			
			Text
			{
				font = HeaderFont,
				name = "selectalanguage",
				x=0,y=40,w=kMax,h=kMax,
				flags = kHAlignCenter + kVAlignTop,
				label = "selectalanguage"
			};
			
			SetStyle(ButtonStyle);
			Button
			{
				x=110,
				y=200,
				name="englishOK",
				label="english",
				type = kPush,
				command = 
					function()
					  SetLanguage("en");
						PopModal("chooselanguage");
					end
			};
      Button
			{
				x=110,
				y=250,
				name="frenchOK",
				label="french",
				type = kPush,
				command = 
					function()
					  SetLanguage("fr");
						PopModal("chooselanguage");
					end
			};

		}
	}
}