コード例 #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, "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;
        }
コード例 #5
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;
        }
コード例 #6
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;
        }
コード例 #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;

            // 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);
                }
            }
        }
コード例 #10
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;
            }
        }
コード例 #11
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;
            }
        }
コード例 #12
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;
        }
コード例 #13
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;
        }
コード例 #14
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;
            }
        }
コード例 #15
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;
        }
コード例 #16
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);
            }
        }