// ================
// BATTLEZONE SHELL
// ================

//Exec("bzshell_cam_move.cfg");

//
// CREATE SHELL MAIN PAGE
//
CreateControl("ShellMain", "WINDOW")
{
	// inherit root window's dimensions
	Geometry("PARENTWIDTH", "PARENTHEIGHT");

	// set window style
	Style("TRANSPARENT");

	//
	// create the "logout" button
	//
	CreateControl("Logout", "BUTTON")
	{
		ColorGroup("MAGENTA");

		Geometry("LEFT", "TOP");
		Position(50, 75);
		Size(300, 0);
		BorderSize(25);
		BevelSize(13);
		TabSize(200, 25);
		Style("ROLLOVER", "OUTLINE");
		Title("Logout");
		TitleFont("MEDIUM");
		Cursor("Highlight");
		NotifyParent("Button::Press", "Logout");
	}

	//
	// create the "single player" button
	//
	CreateControl("Single", "BUTTON")
	{
		Geometry("LEFT", "TOP");
		Position(50, 175);
		Size(500, 0);
		BorderSize(25);
		BevelSize(13);
		TabSize(375, 25);
		Title("Single Player");
		TitleFont("MEDIUM");
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		NotifyParent("Button::Press", "Single");
	}

	//
	// create the "multiplayer" button
	//
	CreateControl("Multi", "BUTTON")
	{
		Geometry("LEFT", "TOP");
		Position(50, 263);
		Size(500, 0);
		BorderSize(25);
		BevelSize(13);
		TabSize(375, 25);
		Title("MultiPlayer");
		TitleFont("MEDIUM");
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		NotifyParent("Button::Press", "Multi");
	}

	//
	// create the "instant action" button
	//
	CreateControl("Instant", "BUTTON")
	{
		Geometry("LEFT", "TOP");
		Position(50, 350);
		Size(500, 0);
		BorderSize(25);
		BevelSize(13);
		TabSize(375, 25);
		Title("Instant Action");
		TitleFont("MEDIUM");
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		NotifyParent("Button::Press", "Instant");
	}

	//
	// create the "load game" button
	//
	CreateControl("Load", "BUTTON")
	{
		Geometry("LEFT", "TOP");
		Position(50, 438);
		Size(500, 0);
		BorderSize(25);
		BevelSize(13);
		TabSize(375, 25);
		Title("Load Game");
		TitleFont("MEDIUM");
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		NotifyParent("Button::Press", "Load");
	}

	//
	// create the "game options" button
	//
	CreateControl("Options", "BUTTON")
	{
		Geometry("LEFT", "TOP");
		Position(50, 525);
		Size(500, 0);
		BorderSize(25);
		BevelSize(13);
		TabSize(375, 25);
		Title("Game Options");
		TitleFont("MEDIUM");
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		NotifyParent("Button::Press", "Options");
	}

	OnEvent("Control::Activate")
	{
		cmd("shell.background main.tga");
	}

	//
	// handle the "single" event
	//
	OnEvent("Single")
	{
		FadeOut();
		Cmd("shell.single.enter");
		FadeIn("|ShellSingle");
	}

	//
	// handle the "multi" event
	//
	OnEvent("Multi")
	{
		FadeOut();
		Cmd("shell.multi.enter");
		FadeIn("|ShellMulti");
	}

	//
	// handle the "instant" event
	//
	OnEvent("Instant")
	{
		Cmd("options.instant.bool0 1"); 	// Player Respawn toggle (on)
		Cmd("options.instant.bool1 1"); 	// points for killing AI toggle (on)
		Cmd("options.instant.bool2 1"); 	// kill for killing AI toggle (on)
		Cmd("options.instant.bool3 1"); 	// keep sniper rifle on pilot respawn toggle (on)
		Cmd("options.instant.bool4 1"); 	// Default G66 human combat skill progression toggle (on)
		Cmd("options.instant.bool5 1"); 	// Default G66 crate drops toggle (on)
		Cmd("options.instant.bool6 1"); 	// Eruptions toggle (off)
		Cmd("options.instant.bool7 0"); 	// Earthquakes toggle (off)
		Cmd("options.instant.bool8 0"); 	// Default G66 CPU advanced weapons toggle (off)
		Cmd("options.instant.bool9 0"); 	// Default G66 CPU mine fields toggle (off)
		Cmd("options.instant.bool10 0"); 	// G66 Random Scrap Pools toggle (off)
		Cmd("options.instant.bool11 1"); 	// G66 Random Scrap Fields toggle (off)
		Cmd("options.instant.bool12 0"); 	// G66 Random Fauna toggle (off)
		Cmd("options.instant.bool13 0"); 	// G66 Surprise Attacks toggle (off)
		Cmd("options.instant.bool14 0"); 	// G66 Rogue Attacks toggle (off)
		Cmd("options.instant.bool15 1"); 	// G66 Neutral Snipes toggle (off)
		Cmd("options.instant.bool16 0");  	// G66 Juggernaut toggle (off)
		Cmd("options.instant.bool17 0");  	// G66 Fighting Pilots toggle (off)
		Cmd("options.instant.bool18 1");  	// TLI toggle (off)
		Cmd("options.instant.bool19 0");  	// Weapons Linking toggle (off)
		Cmd("options.instant.bool20 1");  	// Human Reinforcements toggle (off)

		Cmd("options.instant.int0 0");		// Kill limit, 0 is unlimited
		Cmd("options.instant.int1 0");		// Time limit, 0 is unlimited
		Cmd("options.instant.int2 0");		// unit limit, 0 is unlimited	
		Cmd("options.instant.int3 2");		// Default AI skill for human turrets
		Cmd("options.instant.int4 2");		// Default AI skill for human non-turrets
		Cmd("options.instant.int5 2");		// Default CPU AI skill for turrets
		Cmd("options.instant.int6 2");		// Default CPU AI skill for non-turrets.
		Cmd("options.instant.int7 1023");	// Bitfields saying which vehicles out of mpvehicles66*.odf are allowable. 3 = both scouts
		Cmd("options.instant.int8 2");		// Default scrap boost for humans
		Cmd("options.instant.int9 1");		// Default scrap boost for CPU
//	Cmd("options.instant.int10 4"); 	// Default G66 Difficulty Level Button
		Cmd("shell.instant.difficulty 1"); 	// Default G66 Difficulty Level
		Cmd("options.instant.int12 2"); 	// Default G66 human combat unit skill
		Cmd("options.instant.int13 2"); 	// Default G66 human non-combat unit skill
		Cmd("shell.instant.playerforce 1"); 	// Default G66 human starting force
		Cmd("options.instant.int15 0"); 	// EarlyAIP Option (0..4)
		Cmd("options.instant.int16 2"); 	// Default G66 CPU combat unit skill
		Cmd("options.instant.int17 2"); 	// Default G66 CPU non-combat unit skill
		Cmd("shell.instant.computerforce 1"); 	// Default G66 CPU starting force
//			Cmd("options.instant.int19 1"); 	// Default G66 CPU scrap boost
		Cmd("options.instant.int20 1"); 	// Default G66 Sun Rotation Speed
		Cmd("options.instant.int21 2"); 	// Default G66 Time of Day
		Cmd("options.instant.int22 180"); 	// Default G66 Pilot Lifetime
//			Cmd("options.instant.int23 1");		// Default G66 Extra Options button
		Cmd("options.instant.int24 1024");		// Default Starting Ships Button
		Cmd("options.instant.int25 2048");	// Default Starting Vehicles List 
		Cmd("options.instant.int26 2");		// Default Human Extra Starting Forces Button

		Cmd("options.instant.string4 MPVehicles66.odf"); 
//			Cmd("options.instant.string13 Insane"); 
		FadeOut();
		FadeIn("|ShellInstant");
		Cmd("shell.instant.loadaction");
		Cmd("shell.instant.load");
 		Cmd("shell.instant.name dunesi.bzn");	// map name
	}

	//
	// handle the "load" event
	//
	OnEvent("Load")
	{
		FadeOut();
		FadeIn("|ShellLoad");
	}

	//
	// handle the "options" event
	//
	OnEvent("Options")
	{
		FadeOut();
		FadeIn("|ShellOption");
	}

	//
	// handle the "Cineractive" event
	//
//	OnEvent("cam_move")
//	{
//		FadeOut();
//		FadeIn("|cam_move");
//	}

	//
	// handle the "logout" event
	//
	OnEvent("Logout")
	{
		FadeOut();
		FadeIn("|ShellLogin");
	}
}

Cmd("shell.instant.name dunesi.bzn");	// map name
Exec("bzshell_instant_xo_g66_x2_5.cfg");
Exec("bzshell_instant_xo_g662_x2_5.cfg");
Exec("bzshell_instant_xo_g663_x2_5.cfg");
Exec("bzshell_instant_xo_g664_x2_5.cfg");
