require( "scripts/style.lua" );


LevelHeaderFont = {
  proportionalFont,
  18,
  BorderColor
};

LevelValFont = {
  proportionalFont,
  18,
  WhiteColor
};

LevelFont = {
  proportionalFont,
  14,
  WhiteColor
};

UpgradeButtonFont = {
  standardFont,
  24,
  WhiteColor
};

DecorButtonFont = {
  standardFont,
  30,
  BlackColor
};





GoalFont = {
  proportionalFont,
  12,
  WhiteColor
};

OpenFont = {
  proportionalFont,
  13,
  GreenColor
};

ExpertFont = {
  proportionalFont,
  14,
  WhiteColor
};

ScoreFont = {
  proportionalFont,
  29,
  BlackColor
};

CashFont = {
  proportionalFont,
  29,
  GreenColor
};

UpgradeNameFont = {
  standardFont,
  26,
  RedColor
};


UpgradeDescripFont = {
  standardFont,
  18,
  BorderColor
};

UpgradeButtonGraphics = {
	"buttons/upgrade_up",
	"buttons/upgrade_down",
	"buttons/upgrade_over"
};


Phone1ButtonGraphics = {
	"ui/phone_busser_a",
	"ui/phone_busser_b",
	"ui/phone_busser_b"
};

DecorButtonGraphics = {
	"buttons/decor-ui_a",
	"buttons/decor-ui_b",
	"buttons/decor-ui_c"
};


MakeDialog
{
		
		GameWindow
		{ 
			name="maingamewindow",
			x=0,
			y=0,
			w=800,
			h=600,
			
			
			
			
			
			
			Bitmap
			{
				name="livesicon_0",
				image="ui/lives_icon",
				x = 260,
				y = 5
			},
			
			Bitmap
			{
				name="livesicon_1",
				image="ui/lives_icon",
				x = 310,
				y = 5
			},
			
			Bitmap
			{
				name="livesicon_2",
				image="ui/lives_icon",
				x = 360,
				y = 5
			},
			
			Bitmap
			{
				name="livesicon_3",
				image="ui/lives_icon",
				x = 410,
				y = 5
			},
			
			Bitmap
			{
				name="livesicon_4",
				image="ui/lives_icon",
				x = 460,
				y = 5
			},
			
			
			

			Bitmap
			{
				name="upgradeanim",
				image="ui/upgradeanim",
				x = 10,
				y = 0
			},
			
			
			Button
			{
				x=35,
				y=5,
				graphics = UpgradeButtonGraphics,
				name="upgrade",
				Text
				{
					font=UpgradeButtonFont,
					name="label",
					x = 0, y = 4, w = kMax, h=kMax,
					flags = kHAlignCenter + kVAlignCenter,
					label="upgrades",
				};
				xoffset = 0,
				type = kPush,
				command=
					function()
						PauseGame(true);
						DoModal("scripts/upgrade.lua");
					end
			},
				
			
			
			
			
			
			Bitmap
			{
				x = 700,
				y = 250,
				name = "phonebox2",
				image = "ui/icon_backdrop_a",
				
				Button
				{
					x=kCenter,
					y=7,
					graphics = Phone1ButtonGraphics,
					name="phone1",
					type = kPush,
					xoffset = 0,
					command=
						function()
							PhoneButton(0);
						end
				},
				
				Button
				{
					x=kCenter,
					y=70,
					graphics = Phone1ButtonGraphics,
					name="phone2",
					type = kPush,
					xoffset = 0,
					command=
						function()
							PhoneButton(1);
						end
				},
			},
			
			Bitmap
			{
				x = 700,
				y = 180,
				name = "phonebox3",
				image = "ui/icon_backdrop_b",
				
				Button
				{
					x=kCenter,
					y=7,
					graphics = Phone1ButtonGraphics,
					name="phone1",
					type = kPush,
					xoffset = 0,
					command=
						function()
							PhoneButton(0);
						end
				},
				
				Button
				{
					x=kCenter,
					y=70,
					graphics = Phone1ButtonGraphics,
					name="phone2",
					type = kPush,
					xoffset = 0,
					command=
						function()
							PhoneButton(1);
						end
				},
				
				Button
				{
					x=kCenter,
					y=133,
					graphics = Phone1ButtonGraphics,
					name="phone3",
					type = kPush,
					xoffset = 0,
					command=
						function()
							PhoneButton(2);
						end
				},
			},
			
			Bitmap
			{
				x = 700,
				y = 120,
				name = "phonebox4",
				image = "ui/icon_backdrop_c",
				
				Button
				{
					x=kCenter,
					y=7,
					graphics = Phone1ButtonGraphics,
					name="phone1",
					type = kPush,
					xoffset = 0,
					command=
						function()
							PhoneButton(0);
						end
				},
				
				Button
				{
					x=kCenter,
					y=70,
					graphics = Phone1ButtonGraphics,
					name="phone2",
					type = kPush,
					xoffset = 0,
					command=
						function()
							PhoneButton(1);
						end
				},
				
				Button
				{
					x=kCenter,
					y=133,
					graphics = Phone1ButtonGraphics,
					name="phone3",
					type = kPush,
					xoffset = 0,
					command=
						function()
							PhoneButton(2);
						end
				},
				
				Button
				{
					x=kCenter,
					y=196,
					graphics = Phone1ButtonGraphics,
					name="phone4",
					type = kPush,
					xoffset = 0,
					command=
						function()
							PhoneButton(3);
						end
				},
			},
			
			
			
			GameUILayer
			{
				x=0,
				y=0,
				w=0,
				h=0,
				name = "UILevel"
			},
			
			Bitmap
			{
				name="scorebackground",
				image="ui/ui_base",
				x=490,
				y=0,
				
				GameTimer
				{
					x=0,
					y=0,
					w=kMax,
					h=kMax,
				},
				
				CoinJar
				{
					x=0,
					y=0,
					w=kMax,
					h=kMax,
					name="coinjar"
				},
				

				Text
				{
					font = OpenFont,
					name = "openclosed",
					x=238,y=87,w=67,h=20,
					flags = kHAlignCenter + kVAlignCenter,
					label = "open",
					padding = -1
				};
				
				
				Text
				{
					font = GoalFont,
					name = "goal",
					x=133,y=65,w=76,h=50,
					flags = kHAlignCenter + kVAlignCenter,
					label = "goal",
					padding = -1
				};
				
				Text
				{
					font = ExpertFont,
					name = "expert",
					x=133,y=65,w=76,h=50,
					flags = kHAlignCenter + kVAlignCenter,
					label = "expert",
					padding = -1
				};
				
				Text
				{
					font = ScoreFont,
					name = "scoreval",
					x=123,y=25,w=96,h=32,
					flags = kHAlignCenter + kVAlignCenter,
					label = "scoreval"
				};
				
				Text
				{
					font = LevelFont,
					name = "level",
					x=125,y=7,w=54,h=30,
					flags = kHAlignRight + kVAlignTop,
					label = "level"
				};
				
				Text
				{
					font = LevelFont,
					name = "levelval",
					x=190,y=7,w=100,h=30,
					flags = kHAlignLeft + kVAlignTop,
					label = "1"
				};
				
				--[[
				Text
				{
					font = CashFont,
					name = "cashval",
					x=95,y=100,w=96,h=32,
					flags = kHAlignCenter + kVAlignCenter,
					label = ""
				};
				]]--
			},
			
			
			GamePostUILayer
			{
				x=0,
				y=0,
				w=0,
				h=0,
				name = "PostUILevel"
			},
			
			SetStyle(SolidButtonStyle);
			
			Button
			{
				x=650,
				y=550,
				name="pause",
				label="pause",
				command=
					function()
						PauseGame(true);
						DoModal("scripts/pause.lua");
					end
			},
			
			Button
			{
				x=650,
				y=500,
				name="skiptutorial",
				label="skiptutorial",
				command=
					function()
						PauseGame(true);
						result = DisplayDialog { 
							"scripts/yesno.lua", 
							body ="tutorialconfirm",
							title = "" 
						};
						if (result=='yes') then
							DoSkipTutorial();
						end
						PauseGame(false);
					end
			},
			SetStyle(DefaultStyle);
			
			Window
			{
				name="upgradewindow",
				x=0,y=0,h=kMax,w=kMax,
				
				Bitmap
				{
					x = 156, y = 398,
					image="ui/decor-ui_base",
					name="decorupgradeui",
					
					Text
					{
						font = UpgradeNameFont,
						name = "upgradename",
						x=kCenter,y=122,w=kMax,h=40,
						flags = kHAlignCenter + kVAlignTop,
						label = "name"
					};
					
					Text
					{
						font = UpgradeDescripFont,
						name = "upgradedescrip",
						x=kCenter,y=152,w=200,h=kMax,
						flags = kHAlignCenter + kVAlignTop,
						label = "descrip"
					};
				};
				
				Bitmap
				{
					x = 289, y = 415,
					image="buttons/decor-ui_d",
				};
				
				Button
				{
					x = 289, y = 415,
					name="decorbutton",
					label="upgrade",
					font=DecorButtonFont,
					th = 36,
					graphics=DecorButtonGraphics,
					type=kPush,
					xoffset=0,
					yoffset=0,
					passmessages = 1,
					command=
					function()
						DecorButton();
					end					
				};
				
			};
			
			ScreenFade
			{
				x=0,
				y=0,
				w=0,
				h=0,
				name="screenfade"
			},
		},
	
}