コード例 #1
0
        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;
        }
コード例 #2
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;
            }
        }
コード例 #3
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;
            }
        }
コード例 #4
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;
        }
コード例 #5
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;
        }
コード例 #6
0
        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;
        }
コード例 #7
0
        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;
        }
コード例 #8
0
ファイル: Fog.cs プロジェクト: yanivkalfa/MultiversePlatform
        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;
        }
コード例 #9
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;
            }
        }
コード例 #10
0
        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;
        }
コード例 #11
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;
        }
コード例 #12
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;
        }
コード例 #13
0
        public void AddToTree(WorldTreeNode parentNode)
        {
            if (!inTree)
            {
                // save parentNode for use later when removing from the tree
                this.parentNode = parentNode;



                // create a node for the collection and add it to the parent
                node = app.MakeTreeNode(this, "Points");
                CommandMenuBuilder menuBuilder = new CommandMenuBuilder();
                parentNode.Nodes.Add(node); menuBuilder.Add("Copy Description", "", app.copyToClipboardMenuButton_Click);
                menuBuilder.Add("Help", "Plant_Type", app.HelpClickHandler);
                node.ContextMenuStrip = menuBuilder.Menu;
                buttonBar             = menuBuilder.ButtonBar;// mark this object as being in the tree
                inTree = true;
            }
            // add any children to the tree
            foreach (MPPoint pt in points)
            {
                pt.AddToTree(node);
            }
        }
コード例 #14
0
        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;
        }
コード例 #15
0
        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;
        }
コード例 #16
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();
     }
 }
コード例 #17
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;
            }
        }
コード例 #18
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;
        }
コード例 #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;
        }
コード例 #20
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;
            }
        }
コード例 #21
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;
        }
コード例 #22
0
        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;
        }
コード例 #23
0
        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;
            }
        }
コード例 #24
0
        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;
        }
コード例 #25
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;
        }
コード例 #26
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);

                // 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;
            }
        }
コード例 #27
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;
            }
        }
コード例 #28
0
        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;
        }
コード例 #29
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;
            }
        }
コード例 #30
0
        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;
        }
コード例 #31
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();
     }
 }
コード例 #32
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;
            }
        }
コード例 #33
0
        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;
        }