require( "xsellstyle.lua" );


Game1Graphics = {
	"xsell/game1",
	"xsell/game1_a",
	"xsell/game1_a"
};

Game2Graphics = {
	"xsell/game2",
	"xsell/game2_a",
	"xsell/game2_a"
};

Game3Graphics = {
	"xsell/game3",
	"xsell/game3_a",
	"xsell/game3_a"
};

Game4Graphics = {
	"xsell/game4",
	"xsell/game4_a",
	"xsell/game4_a"
};

Game5Graphics = {
	"xsell/game5",
	"xsell/game5_a",
	"xsell/game5_a"
};

Game6Graphics = {
	"xsell/game6",
	"xsell/game6_a",
	"xsell/game6_a"
};

Game7Graphics = {
	"xsell/game7",
	"xsell/game7_a",
	"xsell/game7_a"
};

SiteGraphics = {
	"xsell/sitebutton",
	"xsell/sitebutton_a",
	"xsell/sitebutton_a"
};

BackButtonGraphics = {
	"xsell/back_button_a",
	"xsell/back_button_b",
	"xsell/back_button_c"
};

DescriptionFont = {
  xsellFontFile,
  xsellSmallFontSize,
  Color(0,0,0,255)
};

CenterFont = {
  xsellFontFile,
  xsellBigFontSize,
  Color(0,0,0,255)
};

xsellBackFont = {
  xsellFontFile,
  xsellBackFontSize,
  Color(0,0,0,255)
};


kWindowWidth = 256;
kWindowHeight = 128;


kDescriptionW = 165;
kDescriptionH = 100;

DescriptionStyle = {
	parent = xsellDescriptionStyle,
	w = kDescriptionW, h = kDescriptionH, 
	flags = kHAlignLeft + kVAlignTop,
	font = DescriptionFont,
};



MakeDialog
{
	name='xselldialog',
	XSellWindow
	{
		x=0,y=0,w=kMax,h=kMax,
		Bitmap
		{
			name="backgroundimage",
			image="xsell/background",
			x=0,y=0,w=kMax,h=kMax,
			
			SetStyle(xsellDefaultStyle);
			
			
			Text
			{
				name="centertext1",
				x=kCenter,y=165,
				w = 200, h = 100,
				flags = kHAlignCenter + kVAlignCenter,
				label="",
				font = CenterFont
			},
			
			Text
			{
				name="centertext2",
				x=kCenter,y=210,
				w = 200, h = 100,
				flags = kHAlignCenter + kVAlignCenter,
				label="",
				font = CenterFont
			},
			
			Bitmap
			{
				image = "xsell/playfirstlogo",
				name = "playfirstlogo",
				x=400,y=320
			},
			
			Bitmap
			{
				image = "xsell/sitelogo",
				name = "sitelogo",
				x=400,y=354
			},
			
			
			
			
				
			Button
			{
				x = 400,
				y = 70,
				name = "xsellbutton1",
				graphics = Game1Graphics,
				command = 
					function()
						LaunchGameLink(1);
					end
			};
			
			
			Button
			{
				x = 180,
				y = 135,
				name = "xsellbutton2",
				graphics = Game2Graphics,
				command = 
					function()
						LaunchGameLink(2);
					end
			};
			
				
			Button
			{
				x = 640,
				y = 145,
				name = "xsellbutton3",
				graphics = Game3Graphics,
				command = 
					function()
						LaunchGameLink(3);
					end
			};
			
				
				
			Button
			{
				x = 155,
				y = 280,
				name = "xsellbutton4",
				graphics = Game4Graphics,
				command = 
					function()
						LaunchGameLink(4);
					end
			};
			
			Button
			{
				x = 660,
				y = 280,
				name = "xsellbutton5",
				graphics = Game5Graphics,
				command = 
					function()
						LaunchGameLink(5);
					end
			};
			
			Button
			{
				x = 180,
				y = 420,
				name = "xsellbutton6",
				graphics = Game6Graphics,
				command = 
					function()
						LaunchGameLink(6);
					end
			};
			
				
			Button
			{
				x = 640,
				y = 420,
				name = "xsellbutton7",
				graphics = Game7Graphics,
				command = 
					function()
						LaunchGameLink(7);
					end
			};
			
			Button
			{
				x = 420,
				y = 524,
				name = "gamesite",
				graphics = SiteGraphics,
				command = 
					function()
						LaunchGameLink(0);
					end
			};
			
			SetStyle(DescriptionStyle);
			
			Text
			{
				name="descrip1",
				label="abcdefg",
				x = 350,
				y = 110,
			};

			Text
			{
				name="descrip2",
				label="abcdefg",
				x = 140,
				y = 175,
			};
			
			Text
			{
				name="descrip3",
				label="abcdefg",
				x = 600,
				y = 175,
			};
			
			Text
			{
				name="descrip4",
				label="abcdefg",
				x = 110,
				y = 325,
			};
			
			Text
			{
				name="descrip5",
				label="abcdefg",
				x = 615,
				y = 320,
			};
			
			Text
			{
				name="descrip6",
				label="abcdefg",
				x = 133,
				y = 460,
			};
			
			Text
			{
				name="descrip7",
				label="abcdefg",
				x = 593,
				y = 465,
			};
			
			SetStyle(xsellDefaultStyle);
			
			

			
			Button
			{
				x=25,
				y=525,
				graphics = BackButtonGraphics,
				name="back",
				type = kPush,
				command=
					function()
						PopModal("xselldialog");
					end,
				SelectLayer( kAllLayers ),
				Text
				{
					label = 'back',
					x = 0, y = 0, w = kMax, h = kMax,
					flags = kHAlignCenter + kVAlignCenter,
					font = xsellBackFont,
					
				};
			},
			
				
		},
	},
	
};

SetupXSell();