// =================
// BATTLEZONE EDITOR - tweaked by TimeVirus - 
// =================
//
// ============================================
// Oiled, polished and pinstriped by RocketmanX
// ============================================
//
///  --- set personal startup default favorites here -----

	Cmd("editor.height.size.width 5");
	Cmd("editor.height.size.depth 5");

	Cmd("editor.color.size.width 1");
	Cmd("editor.color.size.depth 1");

	Cmd("editor.texture.size.width 1");
	Cmd("editor.texture.size.depth 1");
	Cmd("editor.texture.index 1");

	Cmd("editor.object.skill 3");
	Cmd("editor.object.config apserv");

	Cmd("editor.height.mode.eyedrop");
	Cmd("editor.color.mode.eyedrop");
	Cmd("editor.texture.mode.eyedrop");

	Cmd("console.log=1");

/// -------------------------------------------------------

Exec("bzeditor_camera.cfg");
Exec("bzeditor_fog.cfg");
Exec("bzeditor_sky.cfg");
Exec("bzeditor_sky2.cfg");
Exec("bzeditor_rain.cfg");
Exec("bzeditor_sprites.cfg");
Exec("bzeditor_splat.cfg");
Exec("bzeditor_misc.cfg");


   ConfigureVarSys()
{
	CreateInteger("sky.range", 0);
	SetIntegerRange("sky.range", 0, 11);
}
   ConfigureVarSys()
{
	CreateInteger("editshell.button", 21);
	SetIntegerRange("editshell.button", 0, 25); // - increased to allow Lizard's Editor additions - RX
}


//
// CREATE EDITOR MENU BAR
//
   CreateControl("EditMenu", "WINDOW")
{
	Pos(212, 0);
	Size(438, 64);
//	BorderSize(3);
	BevelSize(0);
	ColorGroup("BACKGROUND");

	

//
// create the height editor button
//

	CreateControl("Height", "BUTTON")
	{
		Pos(4, 10);
		Size(40, 8);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Height");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Value(5);  //BR1 - Changed from 0
		UseVar("editor.page");

		NotifyParent("Button::Select", "Height");
	}
    
	//
	// create the color editor button
	//
    CreateControl("Color", "BUTTON")
	{
		Pos(52, 10);
		Size(40, 8);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Color");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Value(1);
		UseVar("editor.page");

		NotifyParent("Button::Select", "Color");
	}

	//
	// create the texture editor button
	//
	CreateControl("Texture", "BUTTON")
	{
		Pos(100, 10);
		Size(40, 8);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Texture");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Value(2);
		UseVar("editor.page");

		NotifyParent("Button::Select", "Texture");
	}

	//
	// create the water editor button
	//
	CreateControl("Water", "BUTTON")
	{
		Pos(148, 10);
		Size(40, 8);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Water");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Value(3);
		UseVar("editor.page");

		NotifyParent("Button::Select", "Water");
	}

	//
	// create the environment editor button
	//
	CreateControl("Environ", "BUTTON")
	{
		Pos(196, 10);
		Size(40, 8);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Environ");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Value(4);
		UseVar("editor.page");

		NotifyParent("Button::Select", "Environ");
	}

	//
	// create the object editor button
	//
	CreateControl("Object", "BUTTON")
	{
		Pos(244, 10);
		Size(40, 8);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Object");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Value(0);  //BR1 - Changed from 5 to set as default
		UseVar("editor.page");

		NotifyParent("Button::Select", "Object");
	}

	//
	// create the path editor button
	//
	CreateControl("Path", "BUTTON")
	{
		Pos(292, 10);
		Size(40, 8);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Path");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Value(6);
		UseVar("editor.page");

		NotifyParent("Button::Select", "Path");
	}

//////>>>>>>>>>>>>>>>>>>>>>>>>>>
///////////////////////////////
///////  Lizard Editor additions - connected by RX
//////>>>>>>>>>>>>>>>>>>>>>>>>>>

    CreateControl("Fog", "BUTTON")
	{
		Pos(4, 28);
		Size(40, 8);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Fog");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Value(7);
		UseVar("editor.page");

		NotifyParent("Button::Select", "Fog");
	}

	CreateControl("Rain", "BUTTON")
	{
		Pos(52, 28);
		Size(40, 8);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Rain");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Value(9);
		UseVar("editor.page");

		NotifyParent("Button::Select", "Rain");
	}
	
	CreateControl("Sky", "BUTTON")
	{
		Pos(100, 28);
		Size(40, 8);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Sky");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Value(8);
		UseVar("editor.page");

		NotifyParent("Button::Select", "Sky");
	}

	CreateControl("Sky2", "BUTTON")
	{
		Pos(148, 28);
		Size(40, 8);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Sky 2");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Value(10);
		UseVar("editor.page");

		NotifyParent("Button::Select", "Sky2");
	}

	CreateControl("Sprites", "BUTTON")
	{
		Pos(196, 28);
		Size(40, 8);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Sprites");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Value(11);
		UseVar("editor.page");

		NotifyParent("Button::Select", "Sprites");
	}

	CreateControl("Splat", "BUTTON")
	{
		Pos(244, 28);
		Size(40, 8);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Splat");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Value(12);
		UseVar("editor.page");

		NotifyParent("Button::Select", "Splat");
	}

	CreateControl("Misc", "BUTTON")
	{
		Pos(292, 28);
		Size(40, 8);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Other");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Value(13);
		UseVar("editor.page");

		NotifyParent("Button::Select", "Misc");
	}

//******************************************************
    CreateControl("load", "BUTTON")
	{
		ColorGroup("TVBUTTON1");
		Pos(341, 10);
		Size(40, 8);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Load");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Value(0);
		UseVar("editshell.button");

		NotifyParent("Button::Select", "load");
	}
//******************************************************
//******************************************************
    CreateControl("save", "BUTTON")
	{
		ColorGroup("TVBUTTON1");
		Pos(391, 10);
		Size(40, 8);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Save");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Value(1);
		UseVar("editshell.button");

		NotifyParent("Button::Select", "save");
	}
//******************************************************
//******************************************************
    CreateControl("undo", "BUTTON")
	{
		ColorGroup("TVBUTTON1");
		Pos(341, 28);
		Size(40, 8);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Undo");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Value(2);
		UseVar("editshell.button");

		NotifyParent("Button::Select", "undo");
	}

//******************************************************
//******************************************************

    CreateControl("redo", "BUTTON")
	{
		ColorGroup("TVBUTTON1");
		Pos(391, 28);
		Size(40, 8);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Redo");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Value(3);
		UseVar("editshell.button");

		NotifyParent("Button::Select", "redo");
	}

/// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
/// Create Visibility controls
/// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

	  CreateControl("RangeTitle", "STATIC")
		{
		ColorGroup("TVBUTTON2");
		Pos(1, 47);
		Size(75, 7);
		BorderSize(1);
		BevelSize(2);
		Font("TINY");
		Text("Visibility Range");
		Style("INERT", "TRANSPARENT");
		}

	 CreateControl("Range1", "BUTTON")
		{
		ColorGroup("TVBUTTON2");
		Pos(79, 47);
		Size(30, 7);
		BorderSize(1);
		BevelSize(2);
		Font("TINY");
		Text("250");
		Style("ROLLOVER", "RADIO");
		Value(1);
		UseVar("sky.range");
		NotifyParent("Button::Select", "Range1");
		}
	OnEvent("Range1")
		{
		Cmd("sky.visibilityrange 250");
		Cmd("sky.fogrange 125 250");
		}

	CreateControl("Range2", "BUTTON")
		{
		ColorGroup("TVBUTTON2");
		Pos(113, 47);
		Size(30, 7);
		BorderSize(1);
		BevelSize(2);
		Font("TINY");
		Text("300");
		Style("ROLLOVER", "RADIO");
		Value(2);
		UseVar("sky.range");
		NotifyParent("Button::Select", "Range2");
		}

	OnEvent("Range2")
		{
		Cmd("sky.visibilityrange 300");
		Cmd("sky.fogrange 150 300");
		}

	CreateControl("Range3", "BUTTON")
		{
		ColorGroup("TVBUTTON2");
		Pos(146, 47);
		Size(30, 7);
		BorderSize(1);
		BevelSize(2);
		Font("TINY");
		Text("350");
		Style("ROLLOVER", "RADIO");
		Value(3);
		UseVar("sky.range");
		NotifyParent("Button::Select", "Range3");
		}
	OnEvent("Range3")
		{
		Cmd("sky.visibilityrange 350");
		Cmd("sky.fogrange 175 350");
		}

	CreateControl("Range4", "BUTTON")
		{
		ColorGroup("TVBUTTON2");
		Pos(179, 47);
		Size(30, 7);
		BorderSize(1);
		BevelSize(2);
		Font("TINY");
		Text("400");
		Style("ROLLOVER", "RADIO");
		Value(4);
		UseVar("sky.range");
		NotifyParent("Button::Select", "Range4");
		}
	OnEvent("Range4")
		{
		Cmd("sky.visibilityrange 400");
		Cmd("sky.fogrange 200 400");
		}

	CreateControl("Range5", "BUTTON")
		{
		ColorGroup("TVBUTTON2");
		Pos(212, 47);
		Size(30, 7);
		BorderSize(1);
		BevelSize(2);
		Font("TINY");
		Text("450");
		Style("ROLLOVER", "RADIO");
		Value(5);
		UseVar("sky.range");
		NotifyParent("Button::Select", "Range5");
		}
	OnEvent("Range5")
		{
		Cmd("sky.visibilityrange 450");
		Cmd("sky.fogrange 225 450");
		}

	CreateControl("Range6", "BUTTON")
		{
		ColorGroup("TVBUTTON2");
		Pos(245, 47);
		Size(30, 7);
		BorderSize(1);
		BevelSize(2);
		Font("TINY");
		Text("600");
		Style("ROLLOVER", "RADIO");
		Value(6);
		UseVar("sky.range");
		NotifyParent("Button::Select", "Range6");
		}
	OnEvent("Range6")
		{
		Cmd("sky.visibilityrange 600");
		Cmd("sky.fogrange 600 600");
		}

	CreateControl("Range7", "BUTTON")
		{
		ColorGroup("TVBUTTON2");
		Pos(278, 47);
		Size(30, 7);
		BorderSize(1);
		BevelSize(2);
		Font("TINY");
		Text("800");
		Style("ROLLOVER", "RADIO");
		Value(7);
		UseVar("sky.range");
		NotifyParent("Button::Select", "Range7");
		}
	OnEvent("Range7")
		{
		Cmd("sky.visibilityrange 800");
		Cmd("sky.fogrange 800 800");
		}

	CreateControl("Range8", "BUTTON")
		{
		ColorGroup("TVBUTTON2");
		Pos(311, 47);
		Size(30, 7);
		BorderSize(1);
		BevelSize(2);
		Font("TINY");
		Text("1000");
		Style("ROLLOVER", "RADIO");
		Value(8);
		UseVar("sky.range");
		NotifyParent("Button::Select", "Range8");
		}
	OnEvent("Range8")
		{
		Cmd("sky.visibilityrange 1000");
		Cmd("sky.fogrange 1000 1000");
		}

	CreateControl("Range9", "BUTTON")
		{
		ColorGroup("TVBUTTON2");
		Pos(344, 47);
		Size(30, 7);
		BorderSize(1);
		BevelSize(2);
		Font("TINY");
		Text("1200");
		Style("ROLLOVER", "RADIO");
		Value(9);
		UseVar("sky.range");
		NotifyParent("Button::Select", "Range9");
		}
	OnEvent("Range9")
		{
		Cmd("sky.visibilityrange 1200");
		Cmd("sky.fogrange 1200 1200");
		}

	CreateControl("Range10", "BUTTON")
		{
		ColorGroup("TVBUTTON2");
		Pos(377, 47);
		Size(30, 7);
		BorderSize(1);
		BevelSize(2);
		Font("TINY");
		Text("1500");
		Style("ROLLOVER", "RADIO");
		Value(10);
		UseVar("sky.range");
		NotifyParent("Button::Select", "Range10");
		}
	OnEvent("Range10")
		{
		Cmd("sky.visibilityrange 1500");
		Cmd("sky.fogrange 1500 1500");
		}

//******************************************************

	// handle activation event
	OnEvent("Control::Activate")
	{

		Cmd("editor.page 0");

//BLACK ROOK CHANGES:
//		Activate("|EditHeight");
		Activate("|EditObject");    //This defaults the editor to Object mode
		Activate("|EditCamera");
	//	Activate("|EditGFX");
	}

	// handle deactivation event
	OnEvent("Control::Deactivate")
	{
		Deactivate("|EditCamera");
	//	Deactivate("|EditGFX");
		Deactivate("|EditHeight");
		Deactivate("|EditColor");
		Deactivate("|EditTexture");
		Deactivate("|EditWater");
		Deactivate("|EditEnviron");
		Deactivate("|EditObject");
		Deactivate("|EditPath");
		Deactivate("|ObjectListBox");
		Deactivate("|EditFog");
		Deactivate("|EditRain");
		Deactivate("|EditSky");
		Deactivate("|EditSky2");
		Deactivate("|EditSprites");
		Deactivate("|EditSplat");
		Deactivate("|EditMisc");
	}

	// handle the "height" event
	OnEvent("Height")
	{
		Deactivate("|EditColor");
		Deactivate("|EditTexture");
		Deactivate("|EditWater");
		Deactivate("|EditEnviron");
		Deactivate("|EditObject");
		Deactivate("|EditPath");
		Deactivate("|ObjectListBox");
		Deactivate("|EditFog");
		Deactivate("|EditRain");
		Deactivate("|EditSky");
		Deactivate("|EditSky2");
		Deactivate("|EditSprites");
		Deactivate("|EditSplat");
		Deactivate("|EditMisc");

		Activate("|EditHeight");
	}

	// handle the "color" event
	OnEvent("Color")
	{
		Deactivate("|EditHeight");
		Deactivate("|EditTexture");
		Deactivate("|EditWater");
		Deactivate("|EditEnviron");
		Deactivate("|EditObject");
		Deactivate("|EditPath");
		Deactivate("|ObjectListBox");
		Deactivate("|EditFog");
		Deactivate("|EditRain");
		Deactivate("|EditSky");
		Deactivate("|EditSky2");
		Deactivate("|EditSprites");
		Deactivate("|EditSplat");
		Deactivate("|EditMisc");

		Activate("|EditColor");
	}

	// handle the "texture" event
	OnEvent("Texture")
	{
		Deactivate("|EditHeight");
		Deactivate("|EditColor");
		Deactivate("|EditWater");
		Deactivate("|EditEnviron");
		Deactivate("|EditObject");
		Deactivate("|EditPath");
		Deactivate("|ObjectListBox");
		Deactivate("|EditFog");
		Deactivate("|EditRain");
		Deactivate("|EditSky");
		Deactivate("|EditSky2");
		Deactivate("|EditSprites");
		Deactivate("|EditSplat");
		Deactivate("|EditMisc");

		Activate("|EditTexture");
	}

	// handle the "water" event
	OnEvent("Water")
	{
		Deactivate("|EditHeight");
		Deactivate("|EditColor");
		Deactivate("|EditTexture");
		Deactivate("|EditEnviron");
		Deactivate("|EditObject");
		Deactivate("|EditPath");
		Deactivate("|ObjectListBox");
		Deactivate("|EditFog");
		Deactivate("|EditRain");
		Deactivate("|EditSky");
		Deactivate("|EditSky2");
		Deactivate("|EditSprites");
		Deactivate("|EditSplat");
		Deactivate("|EditMisc");

		Activate("|EditWater");
	}

	// handle the "environ" event
	OnEvent("Environ")
	{
		Deactivate("|EditHeight");
		Deactivate("|EditColor");
		Deactivate("|EditTexture");
		Deactivate("|EditWater");
		Deactivate("|EditObject");
		Deactivate("|EditPath");
		Deactivate("|ObjectListBox");
		Deactivate("|EditFog");
		Deactivate("|EditRain");
		Deactivate("|EditSky");
		Deactivate("|EditSky2");
		Deactivate("|EditSprites");
		Deactivate("|EditSplat");
		Deactivate("|EditMisc");

		Activate("|EditEnviron");
	}

	// handle the "object" event
	OnEvent("Object")
	{
		Deactivate("|EditHeight");
		Deactivate("|EditColor");
		Deactivate("|EditTexture");
		Deactivate("|EditWater");
		Deactivate("|EditEnviron");
		Deactivate("|EditPath");
		Deactivate("|EditFog");
		Deactivate("|EditRain");
		Deactivate("|EditSky");
		Deactivate("|EditSky2");
		Deactivate("|EditSprites");
		Deactivate("|EditSplat");
		Deactivate("|EditMisc");

		Activate("|EditObject");

		Deactivate("|ObjectListBox.VehicleList");
		Deactivate("|ObjectListBox.BuildingList");
		Deactivate("|ObjectListBox.EnvironmentList");
		Deactivate("|ObjectListBox.PowerUpList");

		Activate("|ObjectListBox.BlackRookList1");

		Deactivate("|ObjectListBox.BlackRookList2");
		Deactivate("|ObjectListBox.BlackRookList3");
		Deactivate("|ObjectListBox.BlackRookList4");
		Deactivate("|ObjectListBox.BlackRookList5");
		Deactivate("|ObjectListBox.BlackRookList6");
		Deactivate("|ObjectListBox.BlackRookList7");
		Deactivate("|ObjectListBox.BlackRookList8");
		Deactivate("|ObjectListBox.BlackRookList9");
		Deactivate("|ObjectListBox.BlackRookList10");
		Deactivate("|ObjectListBox.BlackRookList11");
		Deactivate("|ObjectListBox.BlackRookList12");
		Deactivate("|ObjectListBox.BlackRookList13");
		Deactivate("|ObjectListBox.BlackRookList14");
		Deactivate("|ObjectListBox.BlackRookList15");
		Deactivate("|ObjectListBox.BlackRookList16");
		Deactivate("|ObjectListBox.BlackRookList17");
		Deactivate("|ObjectListBox.BlackRookList18");
		Deactivate("|ObjectListBox.BlackRookList19");
		Deactivate("|ObjectListBox.BlackRookList20");
		Deactivate("|ObjectListBox.BlackRookList21");

	}

	// handle the "path" event
	OnEvent("Path")
	{
		Deactivate("|EditHeight");
		Deactivate("|EditColor");
		Deactivate("|EditTexture");
		Deactivate("|EditWater");
		Deactivate("|EditEnviron");
		Deactivate("|EditObject");
		Deactivate("|ObjectListBox");
		Deactivate("|EditFog");
		Deactivate("|EditRain");
		Deactivate("|EditSky");
		Deactivate("|EditSky2");
		Deactivate("|EditSprites");
		Deactivate("|EditSplat");
		Deactivate("|EditMisc");

		Activate("|EditPath");
	}

	// handle the "fog" event
	OnEvent("Fog")
	{
		Deactivate("|EditHeight");
		Deactivate("|EditColor");
		Deactivate("|EditTexture");
		Deactivate("|EditWater");
		Deactivate("|EditEnviron");
		Deactivate("|EditObject");
		Deactivate("|EditPath");
		Deactivate("|ObjectListBox");
		Deactivate("|EditRain");
		Deactivate("|EditSky");
		Deactivate("|EditSky2");
		Deactivate("|EditSprites");
		Deactivate("|EditSplat");
		Deactivate("|EditMisc");

		Activate("|EditFog");
	}

	// handle the "Rain" event
	OnEvent("Rain")
	{
		Deactivate("|EditHeight");
		Deactivate("|EditColor");
		Deactivate("|EditTexture");
		Deactivate("|EditWater");
		Deactivate("|EditEnviron");
		Deactivate("|EditObject");
		Deactivate("|EditPath");
		Deactivate("|ObjectListBox");
		Deactivate("|EditFog");
		Deactivate("|EditSky");
		Deactivate("|EditSky2");
		Deactivate("|EditSprites");
		Deactivate("|EditSplat");
		Deactivate("|EditMisc");
		
		Activate("|EditRain");

	}

	// handle the "Sky" event
	OnEvent("Sky")
	{
		Deactivate("|EditHeight");
		Deactivate("|EditColor");
		Deactivate("|EditTexture");
		Deactivate("|EditWater");
		Deactivate("|EditEnviron");
		Deactivate("|EditObject");
		Deactivate("|EditPath");
		Deactivate("|ObjectListBox");
		Deactivate("|EditFog");
		Deactivate("|EditRain");
		Deactivate("|EditSky2");
		Deactivate("|EditSprites");
		Deactivate("|EditSplat");
		Deactivate("|EditMisc");
		
		Activate("|EditSky");

	}

	// handle the "Sky2" event
	OnEvent("Sky2")
	{
		Deactivate("|EditHeight");
		Deactivate("|EditColor");
		Deactivate("|EditTexture");
		Deactivate("|EditWater");
		Deactivate("|EditEnviron");
		Deactivate("|EditObject");
		Deactivate("|EditPath");
		Deactivate("|ObjectListBox");
		Deactivate("|EditFog");
		Deactivate("|EditRain");
		Deactivate("|EditSky");
		Deactivate("|EditSprites");
		Deactivate("|EditSplat");
		Deactivate("|EditMisc");
		
		Activate("|EditSky2");

	}

	// handle the "Sprites" event
	OnEvent("Sprites")
	{
		Deactivate("|EditHeight");
		Deactivate("|EditColor");
		Deactivate("|EditTexture");
		Deactivate("|EditWater");
		Deactivate("|EditEnviron");
		Deactivate("|EditObject");
		Deactivate("|EditPath");
		Deactivate("|ObjectListBox");
		Deactivate("|EditFog");
		Deactivate("|EditRain");
		Deactivate("|EditSky");
		Deactivate("|EditSky2");
		Deactivate("|EditSplat");
		Deactivate("|EditMisc");
		
		Activate("|EditSprites");

	}

	// handle the "Splat" event
	OnEvent("Splat")
	{
		Deactivate("|EditHeight");
		Deactivate("|EditColor");
		Deactivate("|EditTexture");
		Deactivate("|EditWater");
		Deactivate("|EditEnviron");
		Deactivate("|EditObject");
		Deactivate("|EditPath");
		Deactivate("|ObjectListBox");
		Deactivate("|EditFog");
		Deactivate("|EditRain");
		Deactivate("|EditSky");
		Deactivate("|EditSky2");
		Deactivate("|EditSprites");
		Deactivate("|EditMisc");
		
		Activate("|EditSplat");

	}

	// handle the "Misc" event
	OnEvent("Misc")
	{
		Deactivate("|EditHeight");
		Deactivate("|EditColor");
		Deactivate("|EditTexture");
		Deactivate("|EditWater");
		Deactivate("|EditEnviron");
		Deactivate("|EditObject");
		Deactivate("|EditPath");
		Deactivate("|ObjectListBox");
		Deactivate("|EditFog");
		Deactivate("|EditRain");
		Deactivate("|EditSky");
		Deactivate("|EditSky2");
		Deactivate("|EditSprites");
		Deactivate("|EditSplat");

		Activate("|EditMisc");
	}


//******************************************************************
// handle the "load" event
	OnEvent("load")
	{
		Cmd("game.load");
		Cmd("editshell.button 5");
	}

//******************************************************************
// handle the "save" event
	OnEvent("save")
	{
		Cmd("game.save");
		Cmd("editshell.button 5");
	}

//******************************************************************
// handle the "undo" event
	OnEvent("undo")
	{
		Cmd("editor.undo");
		Cmd("editshell.button 5");
	}

//******************************************************************
// handle the "redo" event
	OnEvent("redo")
	{
		Cmd("editor.redo");
		Cmd("editshell.button 5");
	}
	
	   
}
