require( "scripts/style.lua" );


MakeDialog
{
		
		LevelEditor
		{ 
			name="leveleditorwindow",
			x=0,
			y=0,
			w=800,
			h=600,
			
			FillWindow
			{
				x=125,
				y= 0,
				w= 675,
				h = 110,
				name = "careergroup",
				r = 0.75,
				g = 0.75,
				b = 0.75,
					
					
				Window
				{
					name = "careerlevelgroup",
					
					Text
					{
						font = StandardButtonFont,
						name = "level",
						x=25,y=10,w=60,h=20,
						flags = kHAlignLeft + kVAlignTop,
						label = "level"
					};
					
					
					
					
					Text
					{
						font = StandardButtonFont,
						name = "levelval",
						x=33,y=40,w=20,h=20,
						flags = kHAlignCenter + kVAlignTop,
						label = "1"
					};
					
					Button
					{
						x = 5,
						y = 40,
						name = "levelleft",
						graphics = LeftArrowGraphics,
						type = kPush,
						scale = 0.25,
						command = 
							function() 
								IncrementLevel(-1);
							end	
					},
					
					Button
					{
						x = 55,
						y = 40,
						name = "levelright",
						graphics = RightArrowGraphics,
						type = kPush,
						scale = 0.25,
						command = 
							function() 
								IncrementLevel(1);
							end	
					},
					
					FillWindow
					{
						x=20,
						y= 60,
						w= 30,
						h = 20,
						r = 0.5,
						g = 0.5,
						b = 0.5,
						
						TextEdit
						{
							font = StandardButtonFont,
							name = "gotolevelval",
							x=5,y=0,w=kMax-5,h=kMax,
							length=12
							
						};
						
					},
					
					Button
					{
						x=15,
						y=85,
						font = SmallButtonFont,
						graphics = SolidButtonGraphics,
						name="gotolevel",
						label="le_gotolevel",
						type = kPush,
						scale = 0.4,
						command=
							function()
								GotoLevel();
							end
					},
				};
				
				
				
				Window
				{
					name = "bonuslevelgroup",
					
					Text
					{
						font = StandardButtonFont,
						name = "level",
						x=10,y=10,w=80,h=20,
						flags = kHAlignLeft + kVAlignTop,
						label = "le_restaurant"
					};
					
					
					
					
					Text
					{
						font = StandardButtonFont,
						name = "restaurantval",
						x=33,y=40,w=20,h=20,
						flags = kHAlignCenter + kVAlignTop,
						label = "1"
					};
					
					Button
					{
						x = 5,
						y = 40,
						name = "restaurantleft",
						graphics = LeftArrowGraphics,
						type = kPush,
						scale = 0.25,
						command = 
							function() 
								IncrementRestaurant(-1);
							end	
					},
					
					Button
					{
						x = 55,
						y = 40,
						name = "restaurantright",
						graphics = RightArrowGraphics,
						type = kPush,
						scale = 0.25,
						command = 
							function() 
								IncrementRestaurant(1);
							end	
					},
				};
				
				Text
				{
					font = StandardButtonFont,
					name = "goal",
					x=100,y=10,w=60,h=20,
					flags = kHAlignLeft + kVAlignTop,
					label = "le_goal"
				};
				
				Bitmap
				{
					image="backgrounds/textfield.png",
					x=150,
					y=10,
					scale = 0.5,
					
					TextEdit
					{
						font = SmallButtonFont,
						name = "goalval",
						x=5,y=0,w=kMax-5,h=kMax,
						length=12
						
					};
				};
				
				Text
				{
					font = StandardButtonFont,
					name = "expert",
					x=100,y=40,w=60,h=20,
					flags = kHAlignLeft + kVAlignTop,
					label = "le_expert",
					
				};
				
				Bitmap
				{
					image="backgrounds/textfield.png",
					x=150,
					y=40,
					scale = 0.5,
					
					TextEdit
					{
						font = SmallButtonFont,
						name = "expertval",
						x=5,y=0,w=kMax-5,h=kMax,
						length=12
						
					};
				};
				
				Text
				{
					font = StandardButtonFont,
					name = "leavepenalty",
					x=60,y=70,w=120,h=20,
					flags = kHAlignLeft + kVAlignTop,
					label = "le_leavepenalty",
					
				};
				
				Bitmap
				{
					image="backgrounds/textfield.png",
					x=150,
					y=70,
					scale = 0.5,
					
					TextEdit
					{
						font = SmallButtonFont,
						name = "leavepenaltyval",
						x=5,y=0,w=kMax-5,h=kMax,
						length=12
						
					};
				};
				
				Text
				{
					font = SmallButtonFont,
					name = "snackchance",
					x=250,y=10,w=100,h=20,
					flags = kHAlignLeft + kVAlignTop,
					label = "le_snackchance"
				};
				
				Bitmap
				{
					image="backgrounds/textfield.png",
					x=335,
					y=10,
					scale = 0.5,
					
					TextEdit
					{
						font = SmallButtonFont,
						name = "snackchanceval",
						x=5,y=0,w=kMax-5,h=kMax,
						length=12
						
					};
				};
				Window
				{
					name = "careerlayoutgroup",
					x = 250,
					y = 40,
					
					Text
					{
						font = StandardButtonFont,
						name = "doodle",
						x=0,y=3,w=60,h=20,
						flags = kHAlignLeft + kVAlignTop,
						label = "le_doodle",
						
					};
					
					FillWindow
					{
						x=50,
						y=0,
						w= 300,
						h = 20,
						r = 0.5,
						g = 0.5,
						b = 0.5,
						
						TextEdit
						{
							font = SmallestButtonFont,
							name = "doodleval",
							x=5,y=3,w=kMax,h=kMax,
							length=80
						};
					};
				
				
					
					Text
					{
						font = StandardButtonFont,
						name = "layout",
						x=0,y=43,w=60,h=20,
						flags = kHAlignLeft + kVAlignTop,
						label = "le_layout",
						
					};
					
					Bitmap
					{
						image="backgrounds/textfield.png",
						x=50,
						y=30,
						scale = 0.75,
						
						TextEdit
						{
							font = SmallestButtonFont,
							name = "layoutval",
							x=5,y=3,w=kMax-5,h=kMax,
							length=80
						};
					};
				};
				
				Button
				{
					x=500,
					y=70,
					font = StandardButtonFont,
					graphics = SolidButtonGraphics,
					name="customers",
					label="le_customers",
					type = kPush,
					command=
						function()
							DoModal("scripts/leveleditor/careermode.lua");
						end
				},
				
				
				
			};
			
			FillWindow
			{
				x=125,
				y= 0,
				w= 675,
				h = 100,
				name = "endlessgroup",
				r = 0.75,
				g = 0.75,
				b = 0.75,
					
				Text
				{
					font = StandardButtonFont,
					name = "endlesslevel",
					x=25,y=10,w=60,h=20,
					flags = kHAlignLeft + kVAlignTop,
					label = "level"
				};
				
				Text
				{
					font = StandardButtonFont,
					name = "endlesslevelval",
					x=33,y=40,w=20,h=20,
					flags = kHAlignCenter + kVAlignTop,
					label = "1"
				};
				
				Button
				{
					x = 5,
					y = 40,
					name = "endlesslevelleft",
					graphics = LeftArrowGraphics,
					type = kPush,
					scale = 0.25,
					command = 
						function() 
							IncrementLevel(-1);
						end	
				},
				
				Button
				{
					x = 55,
					y = 40,
					name = "endlesslevelright",
					graphics = RightArrowGraphics,
					type = kPush,
					scale = 0.25,
					command = 
						function() 
							IncrementLevel(1);
						end	
				},
				
				Text
				{
					font = StandardButtonFont,
					name = "endlessrestaurant",
					x=10,y=80,w=90,h=20,
					flags = kHAlignLeft + kVAlignTop,
					label = "le_restaurant"
				};
				
				Text
				{
					font = StandardButtonFont,
					name = "endlessrestaurantval",
					x=33,y=110,w=20,h=20,
					flags = kHAlignCenter + kVAlignTop,
					label = "1"
				};
				
				Button
				{
					x = 5,
					y = 110,
					name = "endlessrestaurantleft",
					graphics = LeftArrowGraphics,
					type = kPush,
					scale = 0.25,
					command = 
						function() 
							IncrementRestaurant(-1);
						end	
				},
				
				Button
				{
					x = 55,
					y = 110,
					name = "endlessrestaurantright",
					graphics = RightArrowGraphics,
					type = kPush,
					scale = 0.25,
					command = 
						function() 
							IncrementRestaurant(1);
						end	
				},
				
				Text
				{
					font = StandardButtonFont,
					name = "endlessstars",
					x=85,y=10,w=60,h=20,
					flags = kHAlignRight+ kVAlignTop,
					label = "le_stars"
				};
				
				Bitmap
				{
					image="backgrounds/textfield.png",
					x=150,
					y=10,
					scale = 0.5,
					
					TextEdit
					{
						font = SmallButtonFont,
						name = "endlessstarsval",
						x=5,y=0,w=kMax-5,h=kMax,
						length=12
						
					};
				};
				
				Text
				{
					font = StandardButtonFont,
					name = "endlessstartdiff",
					x=85,y=40,w=60,h=20,
					flags = kHAlignRight + kVAlignTop,
					label = "le_startdiff",
					
				};
				
				Bitmap
				{
					image="backgrounds/textfield.png",
					x=150,
					y=40,
					scale = 0.5,
					
					TextEdit
					{
						font = SmallButtonFont,
						name = "endlessstartdiffval",
						x=5,y=0,w=kMax-5,h=kMax,
						length=12
						
					};
				};
				
				Text
				{
					font = StandardButtonFont,
					name = "endlessmindiff",
					x=85,y=70,w=60,h=20,
					flags = kHAlignRight + kVAlignTop,
					label = "le_mindiff",
					
				};
				
				Bitmap
				{
					image="backgrounds/textfield.png",
					x=150,
					y=70,
					scale = 0.5,
					
					TextEdit
					{
						font = SmallButtonFont,
						name = "endlessmindiffval",
						x=5,y=0,w=kMax-5,h=kMax,
						length=12
						
					};
				};
				
				Text
				{
					font = SmallButtonFont,
					name = "endlesstimer",
					x=230,y=10,w=100,h=20,
					flags = kHAlignRight + kVAlignTop,
					label = "le_difftimer"
				};
				
				Bitmap
				{
					image="backgrounds/textfield.png",
					x=335,
					y=10,
					scale = 0.5,
					
					TextEdit
					{
						font = SmallButtonFont,
						name = "endlesstimerval",
						x=5,y=0,w=kMax-5,h=kMax,
						length=12
						
					};
				};
				
				Text
				{
					font = SmallButtonFont,
					name = "endlessdiffamount",
					x=230,y=40,w=100,h=20,
					flags = kHAlignRight + kVAlignTop,
					label = "le_diffdelta"
				};
				
				Bitmap
				{
					image="backgrounds/textfield.png",
					x=335,
					y=40,
					scale = 0.5,
					
					TextEdit
					{
						font = SmallButtonFont,
						name = "endlessdiffdeltaval",
						x=5,y=0,w=kMax-5,h=kMax,
						length=12
						
					};
				};
				
				
				
				Text
				{
					font = StandardButtonFont,
					name = "endlesslayout",
					x=345,y=65,w=60,h=20,
					flags = kHAlignCenter + kVAlignTop,
					label = "le_layout"
				};
				
				Text
				{
					font = StandardButtonFont,
					name = "endlesslayoutnum",
					x=345,y=80,w=60,h=20,
					flags = kHAlignCenter + kVAlignTop,
					label = "1"
					
				};
				
				Bitmap
				{
					image="backgrounds/textfield.png",
					x=335,
					y=100,
					scale = 0.5,
					
					TextEdit
					{
						font = SmallButtonFont,
						name = "endlesslayoutval",
						x=5,y=0,w=kMax-5,h=kMax,
						length=12
						
					};
				};
				
				Button
				{
					x = 335,
					y = 80,
					name = "endlesslayoutleft",
					graphics = LeftArrowGraphics,
					type = kPush,
					scale = 0.25,
					command = 
						function() 
							IncrementLayout(-1);
						end	
				},
				
				Button
				{
					x = 385,
					y = 80,
					name = "endlesslayoutright",
					graphics = RightArrowGraphics,
					type = kPush,
					scale = 0.25,
					command = 
						function() 
							IncrementLayout(1);
						end	
				},
				
				
				
				Button
				{
					x=500,
					y=50,
					font = StandardButtonFont,
					graphics = SolidButtonGraphics,
					name="customers",
					label="le_customers",
					type = kPush,
					command=
						function()
							DoModal("scripts/leveleditor/endlessmode.lua");
						end
				},
				
			};
			
			FillWindow
			{
				name="leveltweaks",
				x=700,
				y= 150,
				w= 100,
				h = 200,
				r = 0.75,
				g = 0.75,
				b = 0.75,
		
				Button
				{
					x = 5,
					y = 10,
					w = 90,
					name = "brokenarm",
					label= "le_brokenarm",
					font = SmallestButtonFont,
					flags = kHAlignRight + kVAlignBottom,
					graphics = CheckboxButtonGraphics,
					type = kToggle,	
					xoffset = 0,
					yoffset = 0,
					scale = 0.5	,
					command = 
						function() 
							--ToggleStation(0);
						end				
				},
				
				Button
				{
					x = 5,
					y = 35,
					w = 90,
					name = "flashlight",
					label= "le_flashlight",
					font = SmallestButtonFont,
					flags = kHAlignRight + kVAlignBottom,
					graphics = CheckboxButtonGraphics,
					type = kToggle,	
					xoffset = 0,
					yoffset = 0,
					scale = 0.5,
					command = 
						function() 
							--ToggleStation(1);
						end					
				},
				
				Button
				{
					x = 5,
					y = 60,
					w = 90,
					name = "startdirty",
					label= "le_startdirty",
					font = SmallestButtonFont,
					flags = kHAlignRight + kVAlignBottom,
					graphics = CheckboxButtonGraphics,
					type = kToggle,	
					xoffset = 0,
					yoffset = 0,
					scale = 0.5,
					command = 
						function() 
							--ToggleStation(1);
						end					
				},
				
				Button
				{
					x = 5,
					y = 85,
					w = 90,
					name = "mustcolor",
					label= "le_mustcolor",
					font = SmallestButtonFont,
					flags = kHAlignRight + kVAlignBottom,
					graphics = CheckboxButtonGraphics,
					type = kToggle,	
					xoffset = 0,
					yoffset = 0,
					scale = 0.5,
					command = 
						function() 
							--ToggleStation(1);
						end					
				},
				
				Text
				{
					x = 5,
					y = 110,
					w = 90,
					h = 20,
					name = "newchef",
					label= "le_newchef",
					font = SmallestButtonFont,
					flags = kHAlignLeft + kVAlignBottom
				},
				
				FillWindow
				{
					x=60,
					y= 115,
					w= 40,
					h = 15,
					r = 0.5,
					g = 0.5,
					b = 0.5,
					
					TextEdit
					{
						font = SmallButtonFont,
						name = "newchefval",
						x=5,y=0,w=kMax-5,h=kMax,
						length=12
						
					};
				};
				
				Text
				{
					x = 5,
					y = 135,
					w = 90,
					h = 20,
					name = "shakefreq",
					label= "le_shakefreq",
					font = SmallestButtonFont,
					flags = kHAlignLeft + kVAlignBottom
				},
				
				FillWindow
				{

					x=60,
					y= 140,
					w= 40,
					h = 15,
					r = 0.5,
					g = 0.5,
					b = 0.5,
					
					TextEdit
					{
						font = SmallButtonFont,
						name = "shakefreqval",
						x=5,y=0,w=kMax-5,h=kMax,
						length=12
						
					};
				};
				
				Text
				{
					x = 5,
					y = 160,
					w = 90,
					h = 20,
					name = "shakespill",
					label= "le_shakespill",
					font = SmallestButtonFont,
					flags = kHAlignLeft + kVAlignBottom
				},
				
				FillWindow
				{
					x=60,
					y= 165,
					w= 40,
					h = 15,
					r = 0.5,
					g = 0.5,
					b = 0.5,
					
					TextEdit
					{
						font = SmallButtonFont,
						name = "shakespillval",
						x=5,y=0,w=kMax-5,h=kMax,
						length=12
						
					};
				};
				
				Text
				{
					x = 5,
					y = 185,
					w = 90,
					h = 20,
					name = "shakelength",
					label= "le_shakelength",
					font = SmallestButtonFont,
					flags = kHAlignLeft + kVAlignBottom
				},
				
				FillWindow
				{
					x=60,
					y= 190,
					w= 40,
					h = 15,
					r = 0.5,
					g = 0.5,
					b = 0.5,
					
					TextEdit
					{
						font = SmallButtonFont,
						name = "shakelengthval",
						x=5,y=0,w=kMax-5,h=kMax,
						length=12
						
					};
				};
				
			};
			
   			FillWindow
   			{
   				x=0,
   				y= 50,
   				w= 100,
   				h = 250,
   				r = 0.75,
   				g = 0.75,
   				b = 0.75,
   		
   		
  				Button
  				{
  					x = 5,
  					y = 25,
  					w = 90,
  					name = "drinkstation",
  					label= "le_drink",
  					font = SmallestButtonFont,
  					flags = kHAlignRight + kVAlignBottom,
  					graphics = CheckboxButtonGraphics,
  					type = kToggle,	
  					xoffset = 0,
 					yoffset = 0,
  					scale = 0.5,
  					command = 
  						function() 
  							ToggleStation(0);
  						end	
  				},
   				
   				Button
   				{
   					x = 5,
   					y = 50,
   					w = 90,
   					name = "snackstation",
   					label= "le_snack",
   					font = SmallestButtonFont,
   					flags = kHAlignRight + kVAlignBottom,
   					graphics = CheckboxButtonGraphics,
   					type = kToggle,	
   					xoffset = 0,
   					yoffset = 0,
   					scale = 0.5	,
   					command = 
   						function() 
  							ToggleStation(1);
   						end				
   				},
   				
   				Button
   				{
   					x = 5,
   					y = 75,
   					w = 90,
   					name = "dessertstation",
   					label= "le_dessert",
   					font = SmallestButtonFont,
   					flags = kHAlignRight + kVAlignBottom,
   					graphics = CheckboxButtonGraphics,
   					type = kToggle,	
   					xoffset = 0,
   					yoffset = 0,
   					scale = 0.5,
   					command = 
   						function() 
  							ToggleStation(2);
   						end					
   				},
   				
   				Button
   				{
   					x = 5,
   					y = 100,
   					w = 90,
   					name = "mop",
   					label= "le_mop",
   					font = SmallestButtonFont,
   					flags = kHAlignRight + kVAlignBottom,
   					graphics = CheckboxButtonGraphics,
   					type = kToggle,	
   					xoffset = 0,
   					yoffset = 0,
   					scale = 0.5	,
   					command = 
   						function() 
  							ToggleStation(3);
   						end				
   				},
   				
   				Button
   				{
   					x = 5,
   					y = 125,
   					w = 90,
   					name = "highchair",
   					label= "le_highchair",
   					font = SmallestButtonFont,
   					flags = kHAlignRight + kVAlignBottom,
   					graphics = CheckboxButtonGraphics,
   					type = kToggle,	
   					xoffset = 0,
   					yoffset = 0,
   					scale = 0.5	,
   					command = 
   						function() 
  							ToggleStation(4);
   						end				
   				},
   				
  				Button
  				{
  					x = 5,
  					y = 150,
  					w = 90,
  					name = "phone",
  					label= "le_phone",
  					font = SmallestButtonFont,
  					flags = kHAlignRight + kVAlignBottom,
  					graphics = CheckboxButtonGraphics,
  					type = kToggle,	
  					xoffset = 0,
  					yoffset = 0,
  					scale = 0.5	,
  					command = 
  						function() 
  							ToggleStation(5);
  						end				
  				},
   				
  				Button
  				{
  					x = 5,
  					y = 175,
  					w = 90,
  					name = "podium",
  					label= "le_podium",
  					font = SmallestButtonFont,
  					flags = kHAlignRight + kVAlignBottom,
  					graphics = CheckboxButtonGraphics,
  					type = kToggle,	
  					xoffset = 0,
  					yoffset = 0,
  					scale = 0.5	,
  					command = 
  						function() 
  							ToggleStation(6);
  						end				
  				},
   				
   				Button
   				{
   					x = 5,
  					y = 200,
  					w = 90,
  					name = "bench",
  					label= "le_bench",
  					font = SmallestButtonFont,
  					flags = kHAlignRight + kVAlignBottom,
  					graphics = CheckboxButtonGraphics,
  					type = kToggle,	
  					xoffset = 0,
  					yoffset = 0,
  					scale = 0.5	,
  					command = 
  						function() 
  							ToggleStation(7);
  						end				
  				},
  				
  				Button
  				{
  					x = 5,
   					y = 225,
   					w = 90,
   					name = "bar",
   					label= "le_bar",
   					font = SmallestButtonFont,
   					flags = kHAlignRight + kVAlignBottom,
   					graphics = CheckboxButtonGraphics,
   					type = kToggle,	
   					xoffset = 0,
   					yoffset = 0,
   					scale = 0.5	,
   					command = 
   						function() 
 							ToggleStation(8);
   						end				
   				},
   				
   			};			
			
			
			
			FillWindow
			{
				x=0,
				y= 400,
				w= 100,
				h = 200,
				r = 0.75,
				g = 0.75,
				b = 0.75,
				
				BeginGroup();
		
		
				Button
				{
					x = 5,
					y = 25,
					w = 90,
					name = "movetable",
					label= "le_movetable",
					font = SmallestButtonFont,
					flags = kHAlignRight + kVAlignBottom,
					graphics = CheckboxButtonGraphics,
					type = kRadio,	
					xoffset = 0,
					yoffset = 0,
					scale = 0.5,
					on = true,
					command = 
						function() 
							SetMouseMode(0);
						end	
				},
				
				Button
				{
					x = 5,
					y = 50,
					w = 90,
					name = "deleteTable",
					label= "le_deletetable",
					font = SmallestButtonFont,
					flags = kHAlignRight + kVAlignBottom,
					graphics = CheckboxButtonGraphics,
					type = kRadio,	
					xoffset = 0,
					yoffset = 0,
					scale = 0.5	,
					command = 
						function() 
							SetMouseMode(1);
						end				
				},
				
				Button
				{
					x = 5,
					y = 75,
					w = 90,
					name = "add2top",
					label= "le_add2top",
					font = SmallestButtonFont,
					flags = kHAlignRight + kVAlignBottom,
					graphics = CheckboxButtonGraphics,
					type = kRadio,	
					xoffset = 0,
					yoffset = 0,
					scale = 0.5,
					command = 
						function() 
							SetMouseMode(2);
						end					
				},
				
				Button
				{
					x = 5,
					y = 100,
					w = 90,
					name = "add4top",
					label= "le_add4top",
					font = SmallestButtonFont,
					flags = kHAlignRight + kVAlignBottom,
					graphics = CheckboxButtonGraphics,
					type = kRadio,	
					xoffset = 0,
					yoffset = 0,
					scale = 0.5	,
					command = 
						function() 
							SetMouseMode(3);
						end				
				},
				
				Button
				{
					x = 5,
					y = 125,
					w = 90,
					name = "add6top",
					label= "le_add6top",
					font = SmallestButtonFont,
					flags = kHAlignRight + kVAlignBottom,
					graphics = CheckboxButtonGraphics,
					type = kRadio,	
					xoffset = 0,
					yoffset = 0,
					scale = 0.5	,
					command = 
						function() 
							SetMouseMode(4);
						end				
				},
				
				Button
				{
					x = 5,
					y = 150,
					w = 90,
					name = "colorseat",
					label= "le_colorseat",
					font = SmallestButtonFont,
					flags = kHAlignRight + kVAlignBottom,
					graphics = CheckboxButtonGraphics,
					type = kRadio,	
					xoffset = 0,
					yoffset = 0,
					scale = 0.5	,
					command = 
						function() 
							SetMouseMode(5);
						end				
				},
			};
			
			Button
			{
				x=670,
				y=480,
				font = StandardButtonFont,
				graphics = SolidButtonGraphics,
				name="playlevel",
				label="le_playlevel",
				type = kPush,
				command=
					function()
						SaveLevelData();
						SwapToModalSetName("scripts/game.lua");
					end
			},
			
			
			Button
			{
				x=670,
				y=530,
				font = StandardButtonFont,
				graphics = SolidButtonGraphics,
				name="back",
				label="back",
				type = kPush,
				command=
					function()
						SwapToModalSetName("scripts/mainmenu.lua");
					end
			},
		};
	
};