public SearchDialog(WorldTreeNode node, TreeNodeCollection collection, WorldEditor worldEditor)
 {
     this.rootNode = node;
     this.rootNodeCollection = collection;
     this.app = worldEditor;
     InitializeComponent();
 }
示例#2
0
 public SearchDialog(WorldTreeNode node, TreeNodeCollection collection, WorldEditor worldEditor)
 {
     this.rootNode           = node;
     this.rootNodeCollection = collection;
     this.app = worldEditor;
     InitializeComponent();
 }
示例#3
0
        public void AddToTree(WorldTreeNode parentNode)
        {
            if (parentNode != null)
            {
                this.parentNode = parentNode;

                inTree = true;

                // create a node for the collection and add it to the parent
                node = app.MakeTreeNode(this, NodeName);
                parentNode.Nodes.Add(node);

                foreach (IWorldObject obj in children)
                {
                    obj.AddToTree(node);
                }

                // build the menu
                CommandMenuBuilder menuBuilder = new CommandMenuBuilder();
                menuBuilder.Add("Drag Road", new DragObjectsFromMenuCommandFactory(app), app.DefaultCommandClickHandler);
                menuBuilder.AddDropDown("Move to Collection", menuBuilder.ObjectCollectionDropDown_Opening);
                menuBuilder.FinishDropDown();
                menuBuilder.Add("Copy Description", "", app.copyToClipboardMenuButton_Click);
                menuBuilder.Add("Help", "Road", app.HelpClickHandler);
                menuBuilder.Add("Delete", new DeleteObjectCommandFactory(app, parent, this), app.DefaultCommandClickHandler);
                node.ContextMenuStrip = menuBuilder.Menu;
                buttonBar             = menuBuilder.ButtonBar;
            }
            else
            {
                inTree = false;
            }
        }
        public void AddToTree(WorldTreeNode parentNode)
        {
            // add the world node
            node = app.MakeTreeNode(this, NodeName);
            treeView.Nodes.Add(node);

            // build the menu
            CommandMenuBuilder menuBuilder = new CommandMenuBuilder();

            menuBuilder.Add("Create Object Collection", new CreateWorldCollectionCommandFactory(app, ((IObjectCollectionParent)this)), app.DefaultCommandClickHandler);
            menuBuilder.Add("Copy Description", "", app.copyToClipboardMenuButton_Click);
            menuBuilder.Add("Help", "World_Root", app.HelpClickHandler);
            node.ContextMenuStrip = menuBuilder.Menu;

            // traverse children
            worldTerrain.AddToTree(node);
            ocean.AddToTree(node);
            skybox.AddToTree(node);
            fog.AddToTree(node);
            ambientLight.AddToTree(node);
            directionalLight.AddToTree(node);

//             pathObjectTypes.AddToTree(node);
            foreach (WorldObjectCollection child in worldCollections)
            {
                child.AddToTree(node);
            }

            inTree    = true;
            buttonBar = menuBuilder.ButtonBar;
        }
示例#5
0
        public void AddToTree(WorldTreeNode parentNode)
        {
            if (!inTree && parentNode != null)
            {
                this.parentNode = parentNode;

                // add the terrain node
                node = app.MakeTreeNode(this, NodeName);
                parentNode.Nodes.Add(node);

                CommandMenuBuilder menuBuilder = new CommandMenuBuilder();

                menuBuilder.Add("Drag Decal", new DragObjectsFromMenuCommandFactory(app), app.DefaultCommandClickHandler);
                menuBuilder.Add("Copy Description", "", app.copyToClipboardMenuButton_Click);
                menuBuilder.AddDropDown("Move to Collection", menuBuilder.ObjectCollectionDropDown_Opening);
                menuBuilder.Add("Help", ObjectType, app.HelpClickHandler);
                menuBuilder.Add("Delete", new DeleteObjectCommandFactory(app, parent, this), app.DefaultCommandClickHandler);
                node.ContextMenuStrip = menuBuilder.Menu;
                inTree    = true;
                buttonBar = menuBuilder.ButtonBar;
            }
            else
            {
                inTree = false;
            }
        }
示例#6
0
        public Fog(XmlReader r, Boundary parent, WorldEditor app)
        {
            this.app        = app;
            this.parentNode = null;
            this.parent     = parent;

            FromXml(r);
        }
示例#7
0
 private void searchTextBox_textChanged(object obj, EventArgs args)
 {
     currentNode     = null;
     findNext        = false;
     findButton.Text = "Find";
     nodeCount       = 0;
     found           = false;
 }
示例#8
0
        public Fog(XmlReader r, Boundary parent, WorldEditor app)
        {
            this.app = app;
            this.parentNode = null;
            this.parent = parent;

            FromXml(r);
        }
示例#9
0
 public Fog(WorldEditor app, Boundary parent, ColorEx color, float nearin, float farin)
 {
     this.app        = app;
     this.parentNode = null;
     this.parent     = parent;
     this.cx         = color;
     this.near       = nearin;
     this.far        = farin;
 }
 public void RemoveFromTree()
 {
     if (node.IsSelected)
     {
         node.UnSelect();
     }
     parentNode.Nodes.Remove(node);
     parentNode = null;
     node       = null;
 }
        public void RemoveFromTree()
        {
            if (node.IsSelected)
            {
                node.UnSelect();
            }
            terrainDisplay.RemoveFromTree();

            parentNode.Nodes.Remove(node);
            parentNode = null;
            node       = null;
            inTree     = false;
        }
示例#12
0
 private void buildMenu(WorldTreeNode node)
 {
     if (inTree && node != null)
     {
         CommandMenuBuilder menuBuilder = new CommandMenuBuilder();
         if (loaded)
         {
             menuBuilder.Add("Create Object Collection", new CreateWorldCollectionCommandFactory(app, (IObjectCollectionParent)this), app.DefaultCommandClickHandler);
             menuBuilder.Add("Add Object", new AddObjectCommandFactory(app, this), app.DefaultCommandClickHandler);
             menuBuilder.Add("Add Road", new AddRoadCommandFactory(app, this), app.DefaultCommandClickHandler);
             menuBuilder.Add("Add Marker", new AddMarkerCommandFactory(app, this), app.DefaultCommandClickHandler);
             menuBuilder.Add("Add Marker at Camera", new AddMarkerAtCameraCommandFactory(app, this), app.DefaultCommandClickHandler);
             menuBuilder.Add("Add Region", new AddRegionCommandFactory(app, this), app.DefaultCommandClickHandler);
             menuBuilder.Add("Add Point Light", new AddPointLightCommandFactory(app, this), app.DefaultCommandClickHandler);
             menuBuilder.Add("Add Terrain Decal", new AddTerrainDecalCommandFactory(app, this), app.DefaultCommandClickHandler);
             menuBuilder.AddDropDown("Move to Collection", menuBuilder.ObjectCollectionMoveDropDown_Opening);
             menuBuilder.FinishDropDown();
             menuBuilder.Add("Copy Description", "", app.copyToClipboardMenuButton_Click);
             menuBuilder.Add("Unload Collection", new UnloadCollectionCommandFactory(app, this), app.DefaultCommandClickHandler);
             if (inScene)
             {
                 menuBuilder.Add("Remove From Scene", this, app.RemoveCollectionFromSceneClickHandler);
                 node.ImageIndex         = 3;
                 node.SelectedImageIndex = 3;
             }
             else
             {
                 menuBuilder.Add("Add To Scene", this, app.AddCollectionToSceneClickHandler);
                 node.ImageIndex         = 2;
                 node.SelectedImageIndex = 2;
             }
             menuBuilder.Add("Help", "Collection", app.HelpClickHandler);
             menuBuilder.Add("Delete", new DeleteObjectCommandFactory(app, parent, this), app.DefaultCommandClickHandler);
             node.ContextMenuStrip = menuBuilder.Menu;
             buttonBar             = menuBuilder.ButtonBar;
         }
         else
         {
             if (buttonBar != null)
             {
                 buttonBar.Clear();
             }
             menuBuilder.Add("Load Collection", new LoadCollectionCommandFactory(app, this), app.DefaultCommandClickHandler);
             node.ContextMenuStrip   = menuBuilder.Menu;
             node.ImageIndex         = 1;
             node.SelectedImageIndex = 1;
             buttonBar = menuBuilder.ButtonBar;
         }
         app.UpdateButtonBar();
     }
 }
示例#13
0
 public void RemoveFromTree()
 {
     if (node.IsSelected)
     {
         node.UnSelect();
     }
     foreach (IWorldObject plant in plantList)
     {
         plant.RemoveFromTree();
     }
     parentNode.Nodes.Remove(node);
     parentNode = null;
     node       = null;
 }
示例#14
0
        public void RemoveFromTree()
        {
            if (node != null && inTree)
            {
                if (node.IsSelected)
                {
                    node.UnSelect();
                }
                parentNode.Nodes.Remove(node);
                node       = null;
                parentNode = null;

                inTree = false;
            }
        }
        public void RemoveFromTree()
        {
            if (node.IsSelected)
            {
                node.UnSelect();
            }
            foreach (IWorldObject tree in treeTypes)
            {
                tree.RemoveFromTree();
            }

            parentNode.Nodes.Remove(node);
            parentNode = null;
            node       = null;
        }
        public void AddToTree(WorldTreeNode parentNode)
        {
            this.parentNode = parentNode;

            // add the Fog node
            node = app.MakeTreeNode(this, "Directional Light");
            parentNode.Nodes.Add(node);

            CommandMenuBuilder menuBuilder = new CommandMenuBuilder();

            menuBuilder.Add("Copy Description", "", app.copyToClipboardMenuButton_Click);
            menuBuilder.Add("Help", "Directional_Light", app.HelpClickHandler);
            menuBuilder.Add("Delete", new DeleteObjectCommandFactory(app, parent, this), app.DefaultCommandClickHandler);
            node.ContextMenuStrip = menuBuilder.Menu;
            buttonBar             = menuBuilder.ButtonBar;
        }
示例#17
0
        public void AddToTree(WorldTreeNode parentNode)
        {
            this.parentNode = parentNode;

            // add the Fog node
            node = app.MakeTreeNode(this, "Global Fog");
            parentNode.Nodes.Add(node);

            CommandMenuBuilder menuBuilder = new CommandMenuBuilder();

            menuBuilder.Add("Copy Description", "", app.copyToClipboardMenuButton_Click);
            menuBuilder.Add("Help", "Global_Fog", app.HelpClickHandler);

            node.ContextMenuStrip = menuBuilder.Menu;
            buttonBar             = menuBuilder.ButtonBar;
        }
示例#18
0
        public void RemoveFromTree()
        {
            if (inTree && node != null && parentNode != null)
            {
                if (node.IsSelected)
                {
                    node.UnSelect();
                }
                points.RemoveFromTree();

                parentNode.Nodes.Remove(node);
            }
            parentNode = null;
            node       = null;
            inTree     = false;
        }
示例#19
0
        public void AddToTree(WorldTreeNode parentNode)
        {
            this.parentNode = parentNode;

            // add the Path Object Types node
            node = app.MakeTreeNode(this, "Path Object Type " + pathObjectType.name);
            parentNode.Nodes.Add(node);

            CommandMenuBuilder menuBuilder = new CommandMenuBuilder();

            menuBuilder.Add("Edit Path Object Type", new EditPathObjectTypeCommandFactory(app, parent, this), app.DefaultCommandClickHandler);
            menuBuilder.Add("Copy Description", "", app.copyToClipboardMenuButton_Click);
            menuBuilder.Add("Delete Path Object Type", new DeletePathObjectTypeCommandFactory(app, parent, this), app.DefaultCommandClickHandler);
            node.ContextMenuStrip = menuBuilder.Menu;
            buttonBar             = menuBuilder.ButtonBar;
        }
        public void AddToTree(WorldTreeNode parentNode)
        {
            this.parentNode = parentNode;

            // add the terrain node
            node = app.MakeTreeNode(this, "Terrain Display");
            parentNode.Nodes.Add(node);

            CommandMenuBuilder menuBuilder = new CommandMenuBuilder();

            menuBuilder.Add("Copy Description", "", app.copyToClipboardMenuButton_Click);
            menuBuilder.Add("Help", "Alpha_Splat_Terrain_Display", app.HelpClickHandler);

            node.ContextMenuStrip = menuBuilder.Menu;
            inTree    = true;
            buttonBar = menuBuilder.ButtonBar;
        }
        public void AddToTree(WorldTreeNode parentNode)
        {
            this.parentNode = parentNode;
            inTree          = true;

            // create a node for the collection and add it to the parent
            node = new WorldTreeNode(this, NodeName);

            parentNode.Nodes.Add(node);

            points.AddToTree(node);
            // build the menu
            CommandMenuBuilder menuBuilder = new CommandMenuBuilder();

            menuBuilder.Add("Delete Path", new DeleteInteriorPathCommandFactory(app, parent, this), app.DefaultCommandClickHandler);
            node.ContextMenuStrip = menuBuilder.Menu;
        }
        public void RemoveFromTree()
        {
            if (node != null && parentNode != null)
            {
                if (node != null && node.IsSelected)
                {
                    node.UnSelect();
                }
                foreach (IWorldObject child in children)
                {
                    child.RemoveFromTree();
                }

                parentNode.Nodes.Remove(node);
                parentNode = null;
                node       = null;
            }
        }
示例#23
0
        public void AddToTree(WorldTreeNode parentNode)
        {
            this.parentNode = parentNode;
            inTree          = true;

            // create a node for the collection and add it to the parent
            this.node = app.MakeTreeNode(this, "Fog");
            parentNode.Nodes.Add(node);

            // build the menu
            CommandMenuBuilder menuBuilder = new CommandMenuBuilder();

            menuBuilder.Add("Copy Description", "", app.copyToClipboardMenuButton_Click);
            menuBuilder.Add("Help", "Fog", app.HelpClickHandler);
            menuBuilder.Add("Delete", new DeleteObjectCommandFactory(app, parent, this), app.DefaultCommandClickHandler);
            node.ContextMenuStrip = menuBuilder.Menu;
            buttonBar             = menuBuilder.ButtonBar;
        }
示例#24
0
        public void AddToTree(WorldTreeNode parentNode)
        {
            this.parentNode = parentNode;

            // create a node for the collection and add it to the parent
            node = app.MakeTreeNode(this, NodeName);
            parentNode.Nodes.Add(node);
            // build the menu
            inTree = true;
            buildMenu(node);
            if (loaded)
            {
                // Iterate all children and have them add themselves to the tree
                foreach (IWorldObject child in objectList)
                {
                    child.AddToTree(node);
                }
            }
        }
        public void AddToTree(WorldTreeNode parentNode)
        {
            if (parentNode != null && !inTree)
            {
                this.parentNode = parentNode;
                inTree          = true;

                // create a node for the collection and add it to the parent
                node = app.MakeTreeNode(this, NodeName);
                parentNode.Nodes.Add(node);

                // build the menu
                CommandMenuBuilder menuBuilder = new CommandMenuBuilder();
                menuBuilder.Add("Attach Particle Effect", new AddWaypointParticleEffectCommandFactory(app, this), app.DefaultCommandClickHandler);
                menuBuilder.Add("Add Spawn Generator", new AddSpawnGenToMarkerCommandFactory(app, this), app.DefaultCommandClickHandler);
                menuBuilder.Add("Add Sound", new AddSoundCommandFactory(app, this), app.DefaultCommandClickHandler);
                menuBuilder.AddDropDown("View From");
                menuBuilder.Add("Above", new DirectionAndMarker(CameraDirection.Above, this), app.CameraMarkerDirClickHandler);
                menuBuilder.Add("North", new DirectionAndMarker(CameraDirection.North, this), app.CameraMarkerDirClickHandler);
                menuBuilder.Add("South", new DirectionAndMarker(CameraDirection.South, this), app.CameraMarkerDirClickHandler);
                menuBuilder.Add("West", new DirectionAndMarker(CameraDirection.West, this), app.CameraMarkerDirClickHandler);
                menuBuilder.Add("East", new DirectionAndMarker(CameraDirection.East, this), app.CameraMarkerDirClickHandler);
                menuBuilder.FinishDropDown();
                menuBuilder.Add("Drag Marker", new DragObjectsFromMenuCommandFactory(app), app.DefaultCommandClickHandler);
                menuBuilder.AddDropDown("Move to Collection", menuBuilder.ObjectCollectionDropDown_Opening);
                menuBuilder.FinishDropDown();
                menuBuilder.Add("Copy Description", "", app.copyToClipboardMenuButton_Click);
                menuBuilder.Add("Help", "Marker", app.HelpClickHandler);
                menuBuilder.Add("Delete", new DeleteObjectCommandFactory(app, parent, this), app.DefaultCommandClickHandler);
                node.ContextMenuStrip = menuBuilder.Menu;

                foreach (IWorldObject child in children)
                {
                    child.AddToTree(node);
                }
                buttonBar = menuBuilder.ButtonBar;
            }
            else
            {
                inTree = false;
            }
        }
示例#26
0
        public void RemoveFromTree()
        {
            if (node.IsSelected)
            {
                node.UnSelect();
            }
            worldTerrain.RemoveFromTree();
            ocean.RemoveFromTree();
            skybox.RemoveFromTree();
            pathObjectTypes.RemoveFromTree();
            foreach (WorldObjectCollection child in worldCollections)
            {
                child.RemoveFromTree();
            }

            treeView.Nodes.Remove(node);
            node = null;

            inTree = false;
        }
        public void AddToTree(WorldTreeNode parentNode)
        {
            this.parentNode = parentNode;
            if (!inTree)
            {
                inTree = true;

                // create a node for the collection and add it to the parent
                node = app.MakeTreeNode(this, Name);
                parentNode.Nodes.Add(this.Node);

                // build the menu
                CommandMenuBuilder menuBuilder = new CommandMenuBuilder();
                menuBuilder.Add("Copy Description", "", app.copyToClipboardMenuButton_Click);
                menuBuilder.Add("Drag Point", new DragMPPointCommandFactory(app, this), app.DefaultCommandClickHandler);
                menuBuilder.Add("Insert new points", new InsertPointsCommandFactory(app, (IWorldContainer)parent, this.PointNum), app.DefaultCommandClickHandler);
                menuBuilder.Add("Delete", new DeletePointCommandFactory(app, parent, this), app.DefaultCommandClickHandler);
                node.ContextMenuStrip = menuBuilder.Menu;
                buttonBar             = menuBuilder.ButtonBar;
            }
        }
        public void AddToTree(WorldTreeNode parentNode)
        {
            this.parentNode = parentNode;

            // add the terrain node
            node = app.MakeTreeNode(this, "Terrain");
            parentNode.Nodes.Add(node);

            CommandMenuBuilder menuBuilder = new CommandMenuBuilder();

            menuBuilder.Add("Load Terrain", new LoadTerrainCommandFactory(app), app.DefaultCommandClickHandler);
            menuBuilder.Add("Copy Description", "", app.copyToClipboardMenuButton_Click);
            menuBuilder.Add("Help", "Terrain", app.HelpClickHandler);

            node.ContextMenuStrip = menuBuilder.Menu;

            terrainDisplay.AddToTree(node);

            inTree    = true;
            buttonBar = menuBuilder.ButtonBar;
        }
示例#29
0
        public void AddToTree(WorldTreeNode parentNode)
        {
            this.parentNode = parentNode;

            // add the Creature Classes node
            node = app.MakeTreeNode(this, "Path Object Types");
            parentNode.Nodes.Add(node);

            CommandMenuBuilder menuBuilder = new CommandMenuBuilder();

            menuBuilder.Add("Add Path Object Type", new AddPathObjectTypeCommandFactory(app, this), app.DefaultCommandClickHandler);
            menuBuilder.Add("Copy Description", "", app.copyToClipboardMenuButton_Click);
            node.ContextMenuStrip = menuBuilder.Menu;

            foreach (PathObjectTypeNode pathObjectType in pathObjectTypes)
            {
                pathObjectType.AddToTree(node);
            }

            inTree    = true;
            buttonBar = menuBuilder.ButtonBar;
        }
示例#30
0
        public void AddToTree(WorldTreeNode parentNode)
        {
            if (parentNode != null)
            {
                this.parentNode = parentNode;
                inTree          = true;

                // create a node for the collection and add it to the parent
                node = app.MakeTreeNode(this, NodeName);

                parentNode.Nodes.Add(node);
                CommandMenuBuilder menuBuilder = new CommandMenuBuilder();
                menuBuilder.Add("Add Forest", new AddForestCommandFactory(app, parent, this), app.DefaultCommandClickHandler);
                menuBuilder.Add("Add Water", new AddWaterCommandFactory(app, parent, this), app.DefaultCommandClickHandler);
                menuBuilder.Add("Add Fog", new AddFogCommandFactory(app, parent, this), app.DefaultCommandClickHandler);
                menuBuilder.Add("Add Sound", new AddSoundCommandFactory(app, (IWorldContainer)this), app.DefaultCommandClickHandler);
                menuBuilder.Add("Add Vegetation", new AddGrassCommandFactory(app, parent, this), app.DefaultCommandClickHandler);
                menuBuilder.Add("Add Spawn Generator", new AddSpawnGenToRegionCommandFactory(app, this), app.DefaultCommandClickHandler);
                menuBuilder.Add("Add Ambient Light", new AddAmbientLightCommandFactory(app, this), app.DefaultCommandClickHandler);
                menuBuilder.Add("Add Directional Light", new AddDirectionalLightCommandFactory(app, this), app.DefaultCommandClickHandler);
                menuBuilder.Add("Drag Region", new DragObjectsFromMenuCommandFactory(app), app.DefaultCommandClickHandler);
                menuBuilder.AddDropDown("Move to Collection", menuBuilder.ObjectCollectionDropDown_Opening);
                menuBuilder.FinishDropDown();
                menuBuilder.Add("Copy Description", "", app.copyToClipboardMenuButton_Click);
                menuBuilder.Add("Help", "Region", app.HelpClickHandler);
                menuBuilder.Add("Delete", new DeleteObjectCommandFactory(app, parent, this), app.DefaultCommandClickHandler);

                node.ContextMenuStrip = menuBuilder.Menu;

                //			points.AddToTree(node);

                foreach (IWorldObject child in children)
                {
                    child.AddToTree(node);
                }
                buttonBar = menuBuilder.ButtonBar;
            }
        }
        public void RemoveFromTree()
        {
            if (inTree)
            {
                if (node.IsSelected)
                {
                    node.UnSelect();
                }


                // remove this object from the tree
                parentNode.Nodes.Remove(node);

                parentNode = null;
                node       = null;
                inTree     = false;
            }
            // remove all children from the tree
            foreach (MPPoint pt in points)
            {
                pt.RemoveFromTree();
            }
        }
示例#32
0
        public void AddToTree(WorldTreeNode parentNode)
        {
            this.parentNode = parentNode;
            inTree          = true;

            // create a node for the collection and add it to the parent
            node = app.MakeTreeNode(this, NodeName);

            parentNode.Nodes.Add(node);
            Grass grass = this;
            CommandMenuBuilder menuBuilder = new CommandMenuBuilder();

            menuBuilder.Add("Add Plant Type", new AddPlantTypeCommandFactory(app, grass), app.DefaultCommandClickHandler);
            menuBuilder.Add("Copy Description", "", app.copyToClipboardMenuButton_Click);
            menuBuilder.Add("Help", "Grass", app.HelpClickHandler);
            menuBuilder.Add("Delete", new DeleteObjectCommandFactory(app, parent, this), app.DefaultCommandClickHandler);
            node.ContextMenuStrip = menuBuilder.Menu;

            foreach (IWorldObject plant in plantList)
            {
                plant.AddToTree(node);
            }
            buttonBar = menuBuilder.ButtonBar;
        }
        public void AddToTree(WorldTreeNode parentNode)
        {
            if (parentNode != null)
            {
                this.parentNode = parentNode;
                inTree = true;

                // create a node for the collection and add it to the parent
                node = app.MakeTreeNode(this, NodeName);
                parentNode.Nodes.Add(node);

                // build the menu
                CommandMenuBuilder menuBuilder = new CommandMenuBuilder();

                if (AttachmentPoints.Count > 0)
                {
                    menuBuilder.Add("Attach Particle Effect", new AddObjectParticleEffectCommandFactory(app, this), app.DefaultCommandClickHandler);
                }
                menuBuilder.Add("Add Sound", new AddSoundCommandFactory(app, this), app.DefaultCommandClickHandler);
                menuBuilder.AddDropDown("View From");
                menuBuilder.Add("Above", new DirectionAndObject(CameraDirection.Above, this), app.CameraObjectDirClickHandler);
                menuBuilder.Add("North", new DirectionAndObject(CameraDirection.North, this), app.CameraObjectDirClickHandler);
                menuBuilder.Add("South", new DirectionAndObject(CameraDirection.South, this), app.CameraObjectDirClickHandler);
                menuBuilder.Add("West", new DirectionAndObject(CameraDirection.West, this), app.CameraObjectDirClickHandler);
                menuBuilder.Add("East", new DirectionAndObject(CameraDirection.East, this), app.CameraObjectDirClickHandler);
                menuBuilder.FinishDropDown();
                menuBuilder.Add("Drag Object", new DragObjectsFromMenuCommandFactory(app), app.DefaultCommandClickHandler);
                menuBuilder.AddDropDown("Move to Collection", menuBuilder.ObjectCollectionDropDown_Opening);
                menuBuilder.FinishDropDown();
                menuBuilder.Add("Copy Description", "", app.copyToClipboardMenuButton_Click);
                menuBuilder.Add("Help", "Object", app.HelpClickHandler);
                menuBuilder.Add("Delete", new DeleteObjectCommandFactory(app, parent, this), app.DefaultCommandClickHandler);
                //             menuBuilder.Add("Generate Model Paths", new GenerateModelPathsCommandFactory(this), app.DefaultCommandClickHandler);
                node.ContextMenuStrip = menuBuilder.Menu;

                foreach (IWorldObject child in children)
                {
                    child.AddToTree(node);
                }
                buttonBar = menuBuilder.ButtonBar;
            }
        }
        public void AddToTree(WorldTreeNode parentNode)
        {
            if (parentNode != null)
            {
                this.parentNode = parentNode;
                inTree = true;

                // create a node for the collection and add it to the parent
                node = app.MakeTreeNode(this, NodeName);

                parentNode.Nodes.Add(node);
                CommandMenuBuilder menuBuilder = new CommandMenuBuilder();
                menuBuilder.Add("Add Forest", new AddForestCommandFactory(app, parent, this), app.DefaultCommandClickHandler);
                menuBuilder.Add("Add Water", new AddWaterCommandFactory(app, parent, this), app.DefaultCommandClickHandler);
                menuBuilder.Add("Add Fog", new AddFogCommandFactory(app, parent, this), app.DefaultCommandClickHandler);
                menuBuilder.Add("Add Sound", new AddSoundCommandFactory(app, (IWorldContainer)this), app.DefaultCommandClickHandler);
                menuBuilder.Add("Add Vegetation", new AddGrassCommandFactory(app, parent, this), app.DefaultCommandClickHandler);
                menuBuilder.Add("Add Spawn Generator", new AddSpawnGenToRegionCommandFactory(app, this), app.DefaultCommandClickHandler);
                menuBuilder.Add("Add Ambient Light", new AddAmbientLightCommandFactory(app, this), app.DefaultCommandClickHandler);
                menuBuilder.Add("Add Directional Light", new AddDirectionalLightCommandFactory(app, this), app.DefaultCommandClickHandler);
                menuBuilder.Add("Drag Region", new DragObjectsFromMenuCommandFactory(app), app.DefaultCommandClickHandler);
                menuBuilder.AddDropDown("Move to Collection", menuBuilder.ObjectCollectionDropDown_Opening);
                menuBuilder.FinishDropDown();
                menuBuilder.Add("Copy Description", "", app.copyToClipboardMenuButton_Click);
                menuBuilder.Add("Help", "Region", app.HelpClickHandler);
                menuBuilder.Add("Delete", new DeleteObjectCommandFactory(app, parent, this), app.DefaultCommandClickHandler);

                node.ContextMenuStrip = menuBuilder.Menu;

                //			points.AddToTree(node);

                foreach (IWorldObject child in children)
                {
                    child.AddToTree(node);
                }
                buttonBar = menuBuilder.ButtonBar;
            }
        }
        public void AddToTree(WorldTreeNode parentNode)
        {
            this.parentNode = parentNode;

            // add the terrain node
            node = app.MakeTreeNode(this, "Terrain");
            parentNode.Nodes.Add(node);

            CommandMenuBuilder menuBuilder = new CommandMenuBuilder();

            menuBuilder.Add("Load Terrain", new LoadTerrainCommandFactory(app), app.DefaultCommandClickHandler);
            menuBuilder.Add("Copy Description", "", app.copyToClipboardMenuButton_Click);
            menuBuilder.Add("Help", "Terrain", app.HelpClickHandler);

            node.ContextMenuStrip = menuBuilder.Menu;

            terrainDisplay.AddToTree(node);

            inTree = true;
            buttonBar = menuBuilder.ButtonBar;
        }
 public void RemoveFromTree()
 {
     parentNode.Nodes.Remove(node);
     parentNode = null;
     node = null;
 }
        public void RemoveFromTree()
        {
            if (node.IsSelected)
            {
                node.UnSelect();
            }
            worldTerrain.RemoveFromTree();
            ocean.RemoveFromTree();
            skybox.RemoveFromTree();
            pathObjectTypes.RemoveFromTree();
            foreach (WorldObjectCollection child in worldCollections)
            {
                child.RemoveFromTree();
            }

            treeView.Nodes.Remove(node);
            node = null;

            inTree = false;
        }
        public void AddToTree(WorldTreeNode parentNode)
        {
            this.parentNode = parentNode;

            // add the Fog node
            node = app.MakeTreeNode(this, "Directional Light");
            parentNode.Nodes.Add(node);

            CommandMenuBuilder menuBuilder = new CommandMenuBuilder();
            menuBuilder.Add("Copy Description", "", app.copyToClipboardMenuButton_Click);
            menuBuilder.Add("Help", "Directional_Light", app.HelpClickHandler);
            menuBuilder.Add("Delete", new DeleteObjectCommandFactory(app, parent, this), app.DefaultCommandClickHandler);
            node.ContextMenuStrip = menuBuilder.Menu;
            buttonBar = menuBuilder.ButtonBar;
        }
 private void searchTextBox_textChanged(object obj, EventArgs args)
 {
     currentNode = null;
     findNext = false;
     findButton.Text = "Find";
     nodeCount = 0;
     found = false;
 }
示例#40
0
        public void AddToTree(WorldTreeNode parentNode)
        {
            this.parentNode = parentNode;
            inTree = true;

            // create a node for the collection and add it to the parent
            node = app.MakeTreeNode(this, name);

            parentNode.Nodes.Add(node);
            Forest forest = this;
            CommandMenuBuilder menuBuilder = new CommandMenuBuilder();
            menuBuilder.Add("Add Tree", new AddTreeCommandFactory(app, forest), app.DefaultCommandClickHandler);
            menuBuilder.Add("Copy Description", "", app.copyToClipboardMenuButton_Click);
            menuBuilder.Add("Help", "Forest", app.HelpClickHandler);
            menuBuilder.Add("Delete", new DeleteObjectCommandFactory(app, parent, this), app.DefaultCommandClickHandler);
            node.ContextMenuStrip = menuBuilder.Menu;

            foreach (IWorldObject tree in treeTypes)
            {
                tree.AddToTree(node);
            }
            buttonBar = menuBuilder.ButtonBar;
        }
示例#41
0
        public void RemoveFromTree()
        {
            if (node.IsSelected)
            {
                node.UnSelect();
            }
            foreach (IWorldObject tree in treeTypes)
            {
                tree.RemoveFromTree();
            }

            parentNode.Nodes.Remove(node);
            parentNode = null;
            node = null;
        }
        public void AddToTree(WorldTreeNode parentNode)
        {
            if (parentNode != null)
            {
                this.parentNode = parentNode;

                inTree = true;

                // create a node for the collection and add it to the parent
                node = app.MakeTreeNode(this, NodeName);
                parentNode.Nodes.Add(node);

                foreach (IWorldObject obj in children)
                {
                    obj.AddToTree(node);
                }

                // build the menu
                CommandMenuBuilder menuBuilder = new CommandMenuBuilder();
                menuBuilder.Add("Drag Road", new DragObjectsFromMenuCommandFactory(app), app.DefaultCommandClickHandler);
                menuBuilder.AddDropDown("Move to Collection", menuBuilder.ObjectCollectionDropDown_Opening);
                menuBuilder.FinishDropDown();
                menuBuilder.Add("Copy Description", "", app.copyToClipboardMenuButton_Click);
                menuBuilder.Add("Help", "Road", app.HelpClickHandler);
                menuBuilder.Add("Delete", new DeleteObjectCommandFactory(app, parent, this), app.DefaultCommandClickHandler);
                node.ContextMenuStrip = menuBuilder.Menu;
                buttonBar = menuBuilder.ButtonBar;
            }
            else
            {
                inTree = false;
            }
        }
        public void AddToTree(WorldTreeNode parentNode)
        {
            this.parentNode = parentNode;

            // add the terrain node
            node = app.MakeTreeNode(this, "Terrain Display");
            parentNode.Nodes.Add(node);

            CommandMenuBuilder menuBuilder = new CommandMenuBuilder();

            menuBuilder.Add("Copy Description", "", app.copyToClipboardMenuButton_Click);
            menuBuilder.Add("Help", "Auto_Splat_Terrain_Display", app.HelpClickHandler);

            node.ContextMenuStrip = menuBuilder.Menu;
            inTree = true;
            buttonBar = menuBuilder.ButtonBar;
        }
        public void AddToTree(WorldTreeNode parentNode)
        {
            this.parentNode = parentNode;

            // add the Creature Classes node
            node = app.MakeTreeNode(this, "Path Object Types");
            parentNode.Nodes.Add(node);

            CommandMenuBuilder menuBuilder = new CommandMenuBuilder();
            menuBuilder.Add("Add Path Object Type", new AddPathObjectTypeCommandFactory(app, this), app.DefaultCommandClickHandler);
            menuBuilder.Add("Copy Description", "", app.copyToClipboardMenuButton_Click);
            node.ContextMenuStrip = menuBuilder.Menu;

            foreach (PathObjectTypeNode pathObjectType in pathObjectTypes)
                pathObjectType.AddToTree(node);

            inTree = true;
            buttonBar = menuBuilder.ButtonBar;
        }
示例#45
0
 public void RemoveFromTree()
 {
     if (node.IsSelected)
     {
         node.UnSelect();
     }
     foreach (IWorldObject plant in plantList)
     {
         plant.RemoveFromTree();
     }
     parentNode.Nodes.Remove(node);
     parentNode = null;
     node = null;
 }
        public void AddToTree(WorldTreeNode parentNode)
        {
            this.parentNode = parentNode;

            // create a node for the collection and add it to the parent
            node = app.MakeTreeNode(this, NodeName);
            parentNode.Nodes.Add(node);
            // build the menu
            inTree = true;
            buildMenu(node);
            if (loaded)
            {
                // Iterate all children and have them add themselves to the tree
                foreach (IWorldObject child in objectList)
                {
                    child.AddToTree(node);
                }
            }
        }
 private void searchTreeNode(WorldTreeNode parentNode, string searchQuery, bool Top)
 {
     foreach (WorldTreeNode node in parentNode.Nodes)
     {
         if (found)
         {
             return;
         }
         if (findNext)
         {
             if (ReferenceEquals((object)node,(object)app.SelectedNodes[0]))
             {
                 findNext = false;
                 searchTreeNode(node, searchQuery, false);
                 if (end)
                 {
                     return;
                 }
             }
             else
             {
                 searchTreeNode(node, searchQuery, false);
             }
             if (end)
             {
                 return;
             }
             continue;
         }
         if (((node.Text).ToLower()).Contains((searchQuery.ToLower())))
         {
             if (end)
             {
                 return;
             }
             nodeCount++;
             foreach (WorldTreeNode selectedNode in app.SelectedNodes)
             {
                 selectedNode.UnSelect();
             }
             node.Select();
             findNext = true;
             findButton.Text = "Find next";
             found = true;
             return;
         }
         else
         {
             nodeCount++;
             searchTreeNode(node, searchQuery, false);
             if (end)
             {
                 return;
             }
         }
     }
     int count = rootNode.GetNodeCount(true);
     if (nodeCount >= (rootNode.GetNodeCount(true)) )
     {
         nodeCount = 0;
         currentNode = null;
         findNext = false;
         findButton.Text = "Find";
         end = true;
         if (!found)
         {
             MessageBox.Show("You reached the end and no more matches were found");
         }
         return;
     }
 }
        public void RemoveFromTree()
        {
            if (node.IsSelected)
            {
                node.UnSelect();
            }
            parentNode.Nodes.Remove(node);

            parentNode = null;
            node = null;
        }
        public void AddToTree(WorldTreeNode parentNode)
        {
            this.parentNode = parentNode;
            inTree = true;

            // create a node for the collection and add it to the parent
            node = new WorldTreeNode(this, NodeName);

            parentNode.Nodes.Add(node);

            points.AddToTree(node);
            // build the menu
            CommandMenuBuilder menuBuilder = new CommandMenuBuilder();
            menuBuilder.Add("Delete Path", new DeleteInteriorPathCommandFactory(app, parent, this), app.DefaultCommandClickHandler);
            node.ContextMenuStrip = menuBuilder.Menu;
        }
 private void buildMenu(WorldTreeNode node)
 {
     if (inTree && node != null)
     {
         CommandMenuBuilder menuBuilder = new CommandMenuBuilder();
         if (loaded)
         {
             menuBuilder.Add("Create Object Collection", new CreateWorldCollectionCommandFactory(app, (IObjectCollectionParent)this), app.DefaultCommandClickHandler);
             menuBuilder.Add("Add Object", new AddObjectCommandFactory(app, this), app.DefaultCommandClickHandler);
             menuBuilder.Add("Add Road", new AddRoadCommandFactory(app, this), app.DefaultCommandClickHandler);
             menuBuilder.Add("Add Marker", new AddMarkerCommandFactory(app, this), app.DefaultCommandClickHandler);
             menuBuilder.Add("Add Marker at Camera", new AddMarkerAtCameraCommandFactory(app, this), app.DefaultCommandClickHandler);
             menuBuilder.Add("Add Region", new AddRegionCommandFactory(app, this), app.DefaultCommandClickHandler);
             menuBuilder.Add("Add Point Light", new AddPointLightCommandFactory(app, this), app.DefaultCommandClickHandler);
             menuBuilder.Add("Add Terrain Decal", new AddTerrainDecalCommandFactory(app, this), app.DefaultCommandClickHandler);
             menuBuilder.AddDropDown("Move to Collection", menuBuilder.ObjectCollectionMoveDropDown_Opening);
             menuBuilder.FinishDropDown();
             menuBuilder.Add("Copy Description", "", app.copyToClipboardMenuButton_Click);
             menuBuilder.Add("Unload Collection", new UnloadCollectionCommandFactory(app, this), app.DefaultCommandClickHandler);
             if (inScene)
             {
                 menuBuilder.Add("Remove From Scene", this, app.RemoveCollectionFromSceneClickHandler);
                 node.ImageIndex = 3;
                 node.SelectedImageIndex = 3;
             }
             else
             {
                 menuBuilder.Add("Add To Scene", this, app.AddCollectionToSceneClickHandler);
                 node.ImageIndex = 2;
                 node.SelectedImageIndex = 2;
             }
             menuBuilder.Add("Help", "Collection", app.HelpClickHandler);
             menuBuilder.Add("Delete", new DeleteObjectCommandFactory(app, parent, this), app.DefaultCommandClickHandler);
             node.ContextMenuStrip = menuBuilder.Menu;
             buttonBar = menuBuilder.ButtonBar;
         }
         else
         {
             if (buttonBar != null)
             {
                 buttonBar.Clear();
             }
             menuBuilder.Add("Load Collection", new LoadCollectionCommandFactory(app, this), app.DefaultCommandClickHandler);
             node.ContextMenuStrip = menuBuilder.Menu;
             node.ImageIndex = 1;
             node.SelectedImageIndex = 1;
             buttonBar = menuBuilder.ButtonBar;
         }
         app.UpdateButtonBar();
     }
 }
        public void AddToTree(WorldTreeNode parentNode)
        {
            // add the world node
            node = app.MakeTreeNode(this, NodeName);
            treeView.Nodes.Add(node);

            // build the menu
            CommandMenuBuilder menuBuilder = new CommandMenuBuilder();
            menuBuilder.Add("Create Object Collection", new CreateWorldCollectionCommandFactory(app,((IObjectCollectionParent) this)), app.DefaultCommandClickHandler);
            menuBuilder.Add("Copy Description", "", app.copyToClipboardMenuButton_Click);
            menuBuilder.Add("Help", "World_Root", app.HelpClickHandler);
            node.ContextMenuStrip = menuBuilder.Menu;

            // traverse children
            worldTerrain.AddToTree(node);
            ocean.AddToTree(node);
            skybox.AddToTree(node);
            fog.AddToTree(node);
            ambientLight.AddToTree(node);
            directionalLight.AddToTree(node);

            //             pathObjectTypes.AddToTree(node);
            foreach (WorldObjectCollection child in worldCollections)
            {
                child.AddToTree(node);
            }

            inTree = true;
            buttonBar = menuBuilder.ButtonBar;
        }
        public void AddToTree(WorldTreeNode parentNode)
        {
            this.parentNode = parentNode;

            // add the Fog node
            node = app.MakeTreeNode(this, "Global Ambient Light");
            parentNode.Nodes.Add(node);

            CommandMenuBuilder menuBuilder = new CommandMenuBuilder();
            menuBuilder.Add("Copy Description", "", app.copyToClipboardMenuButton_Click);
            menuBuilder.Add("Help", "Global_Ambient_Light", app.HelpClickHandler);

            node.ContextMenuStrip = menuBuilder.Menu;
            buttonBar = menuBuilder.ButtonBar;
        }
示例#53
0
        public void AddToTree(WorldTreeNode parentNode)
        {
            this.parentNode = parentNode;
            inTree = true;

            // create a node for the collection and add it to the parent
            this.node = app.MakeTreeNode(this, "Spawn Generator");

            parentNode.Nodes.Add(node);

            // build the menu
            CommandMenuBuilder menuBuilder = new CommandMenuBuilder();
            menuBuilder.Add("Copy Description", "", app.copyToClipboardMenuButton_Click);
            menuBuilder.Add("Help", "Spawn_Generator", app.HelpClickHandler);
            menuBuilder.Add("Delete", new DeleteObjectCommandFactory(app, parent, this), app.DefaultCommandClickHandler);
            node.ContextMenuStrip = menuBuilder.Menu;
            buttonBar = menuBuilder.ButtonBar;
        }
        public void RemoveFromTree()
        {
            if (node != null && inTree)
            {
                if (node.IsSelected)
                {
                    node.UnSelect();
                }
                foreach (IWorldObject child in children)
                {
                    child.RemoveFromTree();
                }

                parentNode.Nodes.Remove(node);
                parentNode = null;
                node = null;
            }
        }
        public void RemoveFromTree()
        {
            if (node.IsSelected)
            {
                node.UnSelect();
            }
            terrainDisplay.RemoveFromTree();

            parentNode.Nodes.Remove(node);
            parentNode = null;
            node = null;
            inTree = false;
        }
        public void AddToTree(WorldTreeNode parentNode)
        {
            if (!inTree && parentNode != null)
            {
                this.parentNode = parentNode;

                // add the terrain node
                node = app.MakeTreeNode(this, NodeName);
                parentNode.Nodes.Add(node);

                CommandMenuBuilder menuBuilder = new CommandMenuBuilder();

                menuBuilder.Add("Drag Decal", new DragObjectsFromMenuCommandFactory(app), app.DefaultCommandClickHandler);
                menuBuilder.Add("Copy Description", "", app.copyToClipboardMenuButton_Click);
                menuBuilder.AddDropDown("Move to Collection", menuBuilder.ObjectCollectionDropDown_Opening);
                menuBuilder.Add("Help", ObjectType, app.HelpClickHandler);
                menuBuilder.Add("Delete", new DeleteObjectCommandFactory(app, parent, this), app.DefaultCommandClickHandler);
                node.ContextMenuStrip = menuBuilder.Menu;
                inTree = true;
                buttonBar = menuBuilder.ButtonBar;
            }
            else
            {
                inTree = false;
            }
        }
示例#57
0
 public void RemoveFromTree()
 {
     if (inTree)
     {
         if (node.IsSelected)
         {
             node.UnSelect();
         }
         if (node != null)
         {
             parentNode.Nodes.Remove(node);
         }
         parentNode = null;
         node = null;
         inTree = false;
     }
 }
示例#58
0
        public void AddToTree(WorldTreeNode parentNode)
        {
            this.parentNode = parentNode;
            if (!inTree)
            {
                inTree = true;

                // create a node for the collection and add it to the parent
                node = app.MakeTreeNode(this, Name);
                parentNode.Nodes.Add(this.Node);

                // build the menu
                CommandMenuBuilder menuBuilder = new CommandMenuBuilder();
                menuBuilder.Add("Copy Description", "", app.copyToClipboardMenuButton_Click);
                menuBuilder.Add("Drag Point", new DragMPPointCommandFactory(app, this), app.DefaultCommandClickHandler);
                menuBuilder.Add("Insert new points", new InsertPointsCommandFactory(app, (IWorldContainer)parent, this.PointNum), app.DefaultCommandClickHandler);
                menuBuilder.Add("Delete", new DeletePointCommandFactory(app, parent, this), app.DefaultCommandClickHandler);
                node.ContextMenuStrip = menuBuilder.Menu;
                buttonBar = menuBuilder.ButtonBar;
            }
        }
        public void AddToTree(WorldTreeNode parentNode)
        {
            this.parentNode = parentNode;

            // add the Path Object Types node
            node = app.MakeTreeNode(this, "Path Object Type " + pathObjectType.name);
            parentNode.Nodes.Add(node);

            CommandMenuBuilder menuBuilder = new CommandMenuBuilder();
            menuBuilder.Add("Edit Path Object Type", new EditPathObjectTypeCommandFactory(app, parent, this), app.DefaultCommandClickHandler);
            menuBuilder.Add("Copy Description", "", app.copyToClipboardMenuButton_Click);
            menuBuilder.Add("Delete Path Object Type", new DeletePathObjectTypeCommandFactory(app, parent, this), app.DefaultCommandClickHandler);
            node.ContextMenuStrip = menuBuilder.Menu;
            buttonBar = menuBuilder.ButtonBar;
        }
示例#60
-1
 public Fog(WorldEditor app, Boundary parent, ColorEx color, float nearin, float farin)
 {
     this.app = app;
     this.parentNode = null;
     this.parent = parent;
     this.cx = color;
     this.near = nearin;
     this.far = farin;
 }