Exemple #1
0
        public static void initializeRiverEditor()
        {
            Omni.self.Print(" % - Initializing River Editor");
            gui.RiverEditor.initialize();
            RiverEditorGui.initialize();
            RiverEditorToolbar.initialize();
            // Add ourselves to EditorGui, where all the other tools reside
            RiverEditorGui riverEditorGui = "RiverEditorGui";

            riverEditorGui.setVisible(false);

            RiverEditorToolbar oRiverEditorToolbar = "RiverEditorToolbar";

            oRiverEditorToolbar.setVisible(false);
            ((GuiWindowCollapseCtrl)"RiverEditorOptionsWindow").setVisible(false);
            GuiWindowCollapseCtrl RiverEditorTreeWindow = "RiverEditorTreeWindow";

            RiverEditorTreeWindow.setVisible(false);

            EditorGui EditorGui = "EditorGui";

            EditorGui.add("RiverEditorGui");
            EditorGui.add("RiverEditorToolbar");
            EditorGui.add("RiverEditorOptionsWindow");
            EditorGui.add("RiverEditorTreeWindow");

            ObjectCreator oRiverEditorPlugin = new ObjectCreator("ScriptObject", "RiverEditorPlugin", typeof(RiverEditorPlugin));

            oRiverEditorPlugin["editorGui"] = "RiverEditorGui";
            oRiverEditorPlugin.Create();

            RiverEditorPlugin RiverEditorPlugin = "RiverEditorPlugin";

            RiverEditorPlugin.initialize();
        }
        public override void onDeactivated()
        {
            RiverEditorGui        RiverEditorGui           = "RiverEditorGui";
            GuiControl            RiverEditorToolbar       = "RiverEditorToolbar";
            GuiWindowCollapseCtrl RiverEditorOptionsWindow = "RiverEditorOptionsWindow";
            GuiWindowCollapseCtrl RiverEditorTreeWindow    = "RiverEditorTreeWindow";
            GizmoProfile          GlobalGizmoProfile       = "GlobalGizmoProfile";

            //Copyright Winterleaf Entertainment L.L.C. 2013
            if (!this["isActive"].AsBool())
            {
                return;
            }
            this["isActive"] = false.AsString();
            //Copyright Winterleaf Entertainment L.L.C. 2013

            this.writeSettings();

            omni.bGlobal["$River::EditorOpen"] = false;

            RiverEditorGui.setVisible(false);
            RiverEditorToolbar.setVisible(false);
            RiverEditorOptionsWindow.setVisible(false);
            RiverEditorTreeWindow.setVisible(false);
            this.map.pop();

            // Restore the previous Gizmo
            // alignment settings.
            GlobalGizmoProfile["alignment"] = this["prevGizmoAlignment"];

            // Allow the Gui to cleanup.
            RiverEditorGui.onEditorDeactivated();

            base.onDeactivated();
        }
Exemple #3
0
        public override void onDeactivated()
        {
            DecalEditorGui        DecalEditorGui     = "DecalEditorGui";
            GuiWindowCollapseCtrl DecalPreviewWindow = "DecalPreviewWindow";
            GuiWindowCollapseCtrl DecalEditorWindow  = "DecalEditorWindow";
            GizmoProfile          GlobalGizmoProfile = "GlobalGizmoProfile";

            //Copyright Winterleaf Entertainment L.L.C. 2013
            if (!this["isActive"].AsBool())
            {
                return;
            }
            this["isActive"] = false.AsString();
            //Copyright Winterleaf Entertainment L.L.C. 2013
            DecalEditorGui.setVisible(false);
            DecalPreviewWindow.setVisible(false);
            DecalEditorWindow.setVisible(false);

            this.map.pop();

            // Remember last palette selection
            this["paletteSelection"] = DecalEditorGui.getMode();

            // Restore the previous Gizmo
            // alignment settings.
            GlobalGizmoProfile["alignment"] = this["prevGizmoAlignment"];

            base.onDeactivated();
        }
Exemple #4
0
        public override void onActivated()
        {
            GuiWindowCollapseCtrl MissionAreaEditorPropertiesWindow = "MissionAreaEditorPropertiesWindow";
            GuiWindowCollapseCtrl MissionAreaEditorTerrainWindow    = "MissionAreaEditorTerrainWindow";
            MissionAreaEditorGui  MissionAreaEditorGui = "MissionAreaEditorGui";
            EditorGui             EditorGui            = "EditorGui";

            EditorGui.EditorGuiStatusBar EditorGuiStatusBar = "EditorGuiStatusBar";

            //Copyright Winterleaf Entertainment L.L.C. 2013
            this["isActive"] = true.AsString();
            //Copyright Winterleaf Entertainment L.L.C. 2013
            this.readSettings();

            EditorGui.bringToFront("MissionAreaEditorGui");

            MissionAreaEditorGui.setVisible(true);
            MissionAreaEditorGui.makeFirstResponder(true);

            MissionAreaEditorTerrainWindow.setVisible(true);
            MissionAreaEditorPropertiesWindow.setVisible(true);

            // Set the status bar here until all tool have been hooked up
            EditorGuiStatusBar.setInfo("Mission Area Editor.");
            EditorGuiStatusBar.setSelection("");

            // Allow the Gui to setup.
            MissionAreaEditorGui.onEditorActivated();

            base.onActivated();
        }
Exemple #5
0
        public override void onDeactivated()
        {
            writeSettings();

            bGlobal["$Nav::EditorOpen"] = false;

            NavEditorGui          NavEditorGui           = "NavEditorGui";
            GuiWindowCollapseCtrl NavEditorOptionsWindow = "NavEditorOptionsWindow";
            GuiWindowCollapseCtrl NavEditorTreeWindow    = "NavEditorTreeWindow";
            GuiControl            NavEditorToolbar       = "NavEditorToolbar";
            GizmoProfile          GlobalGizmoProfile     = "GlobalGizmoProfile";

            NavEditorGui.setVisible(false);
            NavEditorToolbar.setVisible(false);
            NavEditorOptionsWindow.setVisible(false);
            NavEditorTreeWindow.setVisible(false);
            map.pop();

            // Restore the previous Gizmo alignment settings.
            GlobalGizmoProfile.alignment = prevGizmoAlignment;

            // Allow the Gui to cleanup.
            NavEditorGui.onEditorDeactivated();

            base.onDeactivated();
        }
Exemple #6
0
        public override void onDeactivated()
        {
            GuiRoadEditorCtrl     RoadEditorGui           = "RoadEditorGui";
            GuiControl            RoadEditorToolbar       = "RoadEditorToolbar";
            GuiWindowCollapseCtrl RoadEditorOptionsWindow = "RoadEditorOptionsWindow";
            GuiWindowCollapseCtrl RoadEditorTreeWindow    = "RoadEditorTreeWindow";

            //Copyright Winterleaf Entertainment L.L.C. 2013
            if (!this["isActive"].AsBool())
            {
                return;
            }
            this["isActive"] = false.AsString();
            //Copyright Winterleaf Entertainment L.L.C. 2013

            this.writeSettings();

            RoadEditorGui.setVisible(false);
            RoadEditorToolbar.setVisible(false);
            RoadEditorOptionsWindow.setVisible(false);
            RoadEditorTreeWindow.setVisible(false);
            this.map.pop();

            base.onDeactivated();
        }
Exemple #7
0
        public override void onDeactivated()
        {
            GuiMeshRoadEditorCtrl MeshRoadEditorGui           = "MeshRoadEditorGui";
            GuiControl            MeshRoadEditorToolbar       = "MeshRoadEditorToolbar";
            GuiWindowCollapseCtrl MeshRoadEditorOptionsWindow = "MeshRoadEditorOptionsWindow";

            MeshRoadEditorGui.MeshRoadEditorTreeWindow MeshRoadEditorTreeWindow = "MeshRoadEditorTreeWindow";
            GizmoProfile GlobalGizmoProfile = "GlobalGizmoProfile";

            //Copyright Winterleaf Entertainment L.L.C. 2013
            if (!this["isActive"].AsBool())
            {
                return;
            }
            this["isActive"] = false.AsString();
            //Copyright Winterleaf Entertainment L.L.C. 2013
            this.writeSettings();

            MeshRoadEditorGui.setVisible(false);
            MeshRoadEditorOptionsWindow.setVisible(false);
            MeshRoadEditorToolbar.setVisible(false);
            MeshRoadEditorTreeWindow.setVisible(false);
            this.map.pop();

            // Restore the previous Gizmo
            // alignment settings.
            GlobalGizmoProfile["alignment"] = this["prevGizmoAlignment"];

            base.onDeactivated();
        }
Exemple #8
0
        public override void onDeactivated()
        {
            if (!isActive)
            {
                return;
            }

            EditorGui             EditorGui               = "EditorGui";
            TerrainPainter        TerrainPainter          = "TerrainPainter";
            GuiWindowCollapseCtrl TerrainPainterPreview   = "TerrainPainterPreview";
            GuiControl            EWTerrainPainterToolbar = "EWTerrainPainterToolbar";
            TerrainEditor         ETerrainEditor          = "ETerrainEditor";

            isActive = false;
            base.onDeactivated();

            EditorGui.writeTerrainEditorSettings();
            map.pop();

            //Copyright Winterleaf Entertainment L.L.C. 2013
            TerrainPainter.setVisible(false);
            TerrainPainterPreview.setVisible(false);
            //Copyright Winterleaf Entertainment L.L.C. 2013
            EWTerrainPainterToolbar.setVisible(false);
            ETerrainEditor.setVisible(false);
        }
Exemple #9
0
        public static void initializeMeshRoadEditor()
        {
            Omni.self.Print(" % - Initializing Mesh Road Editor");

            //exec( "./meshRoadEditor.cs" );
            //MeshRoadEditor_initialize();
            gui.MeshRoadEditor.initialize();
            //exec( "./meshRoadEditorGui.gui" );
            //MeshRoadEditorGui_initialize();
            MeshRoadEditorGui.initialize();
            //exec( "./meshRoadEditorToolbar.gui");
            //MeshRoadEditorToolbar_initialize();
            MeshRoadEditorToolbar.initialize();
            //exec( "./meshRoadEditorGui.cs" );

            MeshRoadEditorGui xMeshRoadEditorGui = "MeshRoadEditorGui";

            xMeshRoadEditorGui.setVisible(false);

            GuiWindowCollapseCtrl MeshRoadEditorOptionsWindow = "MeshRoadEditorOptionsWindow";

            MeshRoadEditorOptionsWindow.setVisible(false);
            MeshRoadEditorToolbar oMeshRoadEditorToolbar = "MeshRoadEditorToolbar";

            oMeshRoadEditorToolbar.setVisible(false);

            WinterLeaf.Demo.Full.Models.User.GameCode.Tools.MeshRoadEditor.gui.MeshRoadEditorGui.
            MeshRoadEditorTreeWindow
                MeshRoadEditorTreeWindow = "MeshRoadEditorTreeWindow";

            MeshRoadEditorTreeWindow.setVisible(false);

            EditorGui EditorGui = "EditorGui";

            EditorGui.add("MeshRoadEditorGui");
            EditorGui.add("MeshRoadEditorOptionsWindow");
            EditorGui.add("MeshRoadEditorToolbar");
            EditorGui.add("MeshRoadEditorTreeWindow");

            ObjectCreator oMeshRoadEditorPlugin = new ObjectCreator("ScriptObject", "MeshRoadEditorPlugin",
                                                                    typeof(
                                                                        WinterLeaf.Demo.Full.Models.User.GameCode.Tools.MeshRoadEditor.gui.CodeBehind.MeshRoadEditorPlugin));

            oMeshRoadEditorPlugin["editorGui"] = "MeshRoadEditorGui";
            oMeshRoadEditorPlugin.Create();

            gui.CodeBehind.MeshRoadEditorPlugin mrep = "MeshRoadEditorPlugin";


            mrep.initialize();
        }
        public override void onActivated()
        {
            RiverEditorGui        RiverEditorGui           = "RiverEditorGui";
            GuiControl            RiverEditorToolbar       = "RiverEditorToolbar";
            GuiWindowCollapseCtrl RiverEditorOptionsWindow = "RiverEditorOptionsWindow";
            GuiWindowCollapseCtrl RiverEditorTreeWindow    = "RiverEditorTreeWindow";
            GuiTreeViewCtrl       RiverTreeView            = "RiverTreeView";

            EditorGui.EditorGuiStatusBar EditorGuiStatusBar = "EditorGuiStatusBar";
            GizmoProfile GlobalGizmoProfile = "GlobalGizmoProfile";
            EditorGui    EditorGui          = "EditorGui";

            //Copyright Winterleaf Entertainment L.L.C. 2013
            this["isActive"] = true.AsString();
            //Copyright Winterleaf Entertainment L.L.C. 2013
            this.readSettings();

            omni.bGlobal["$River::EditorOpen"] = true;

            ((GuiBitmapButtonCtrl)
             ((GuiDynamicCtrlArrayControl)"ToolsPaletteArray").findObjectByInternalName(
                 "RiverEditorAddRiverMode", false)).performClick();
            EditorGui.bringToFront("RiverEditorGui");

            RiverEditorGui.setVisible(true);
            RiverEditorGui.makeFirstResponder(true);
            RiverEditorToolbar.setVisible(true);

            RiverEditorOptionsWindow.setVisible(true);
            RiverEditorTreeWindow.setVisible(true);

            RiverTreeView.open("ServerRiverSet", true);
            this.map.push();

            // Store this on a dynamic field
            // in order to restore whatever setting
            // the user had before.
            this["prevGizmoAlignment"] = GlobalGizmoProfile["alignment"];

            // The DecalEditor always uses Object alignment.
            GlobalGizmoProfile["alignment"] = "Object";

            // Set the status bar here until all tool have been hooked up
            EditorGuiStatusBar.setInfo("River editor.");
            EditorGuiStatusBar.setSelection("");

            // Allow the Gui to setup.
            RiverEditorGui.onEditorActivated();

            base.onActivated();
        }
        //---------------------------------------------------------------------------------------------

        public override void onActivated()
        {
            EditorGui             EditorGui = "EditorGui";
            GuiWindowCollapseCtrl DatablockEditorTreeWindow      = "DatablockEditorTreeWindow";
            GuiWindowCollapseCtrl DatablockEditorInspectorWindow = "DatablockEditorInspectorWindow";

            EditorGui.EditorGuiStatusBar EditorGuiStatusBar = "EditorGuiStatusBar";
            Extendable.WorldEditor       EWorldEditor       = "EWorldEditor";

            //Copyright Winterleaf Entertainment L.L.C. 2013
            this["isActive"] = true.AsString();
            //Copyright Winterleaf Entertainment L.L.C. 2013
            ((GuiControl)EditorGui.findObjectByInternalName("WorldEditorToolbar", true)).setVisible(false);
            EditorGui.bringToFront("DatablockEditorPlugin");

            DatablockEditorTreeWindow.setVisible(true);
            DatablockEditorInspectorWindow.setVisible(true);
            DatablockEditorInspectorWindow.makeFirstResponder(true);

            this.map.push();

            // Set the status bar here until all tool have been hooked up
            EditorGuiStatusBar.setInfo("Datablock editor.");

            int numSelected = this.getNumSelectedDatablocks();

            if (numSelected == 0)
            {
                EditorGuiStatusBar.setSelection("");
            }
            else
            {
                EditorGuiStatusBar.setSelection(numSelected + " datablocks selected");
            }

            this.init();
            this.readSettings();

            if (EWorldEditor.getSelectionSize() == 1)
            {
                this.onObjectSelected(EWorldEditor.getSelectedObject(0));
            }

            base.onActivated();
        }
        public override void onActivated()
        {
            GuiWindowCollapseCtrl MaterialEditorPropertiesWindow = "MaterialEditorPropertiesWindow";
            GuiWindowCollapseCtrl MaterialEditorPreviewWindow    = "MaterialEditorPreviewWindow";
            EditorPlugin          WorldEditorPlugin = "WorldEditorPlugin";

            MaterialEditor.MaterialEditorGui MaterialEditorGui = "MaterialEditorGui";
            GuiRolloutCtrl advancedTextureMapsRollout          = "advancedTextureMapsRollout";
            GuiRolloutCtrl materialAnimationPropertiesRollout  = "materialAnimationPropertiesRollout";
            GuiRolloutCtrl materialAdvancedPropertiesRollout   = "materialAdvancedPropertiesRollout";
            EditorGui      EditorGui          = "EditorGui";
            GuiControl     WorldEditorToolbar = EditorGui.FOT("WorldEditorToolbar");

            //Copyright Winterleaf Entertainment L.L.C. 2013
            this["isActive"] = true.AsString();
            //Copyright Winterleaf Entertainment L.L.C. 2013
            if (bGlobal["$gfx::wireframe"])
            {
                bGlobal["$wasInWireFrameMode"] = true;
                bGlobal["$gfx::wireframe"]     = false;
            }
            else
            {
                bGlobal["$wasInWireFrameMode"] = false;
            }
            advancedTextureMapsRollout["Expanded"]         = false.AsString();
            materialAnimationPropertiesRollout["Expanded"] = false.AsString();
            materialAdvancedPropertiesRollout["Expanded"]  = false.AsString();
            WorldEditorPlugin.onActivated();

            //Copyright Winterleaf Entertainment L.L.C. 2013
            MaterialEditorPropertiesWindow.setVisible(true);
            MaterialEditorPreviewWindow.setVisible(true);
            //Copyright Winterleaf Entertainment L.L.C. 2013
            WorldEditorToolbar.setVisible(true);

            MaterialEditorGui.currentObject = sGlobal["$Tools::materialEditorList"];
            // Execute the back end scripts that actually do the work.
            MaterialEditorGui.open();
            this.map.push();

            base.onActivated();
        }
Exemple #13
0
        public override void onActivated()
        {
            DecalEditorGui        DecalEditorGui     = "DecalEditorGui";
            EditorGui             EditorGui          = "EditorGui";
            GuiWindowCollapseCtrl DecalPreviewWindow = "DecalPreviewWindow";
            GuiWindowCollapseCtrl DecalEditorWindow  = "DecalEditorWindow";
            GizmoProfile          GlobalGizmoProfile = "GlobalGizmoProfile";

            //Copyright Winterleaf Entertainment L.L.C. 2013
            this["isActive"] = true.AsString();
            //Copyright Winterleaf Entertainment L.L.C. 2013
            EditorGui.bringToFront(DecalEditorGui);
            DecalEditorGui.setVisible(true);
            DecalEditorGui.makeFirstResponder(true);
            DecalPreviewWindow.setVisible(true);
            DecalEditorWindow.setVisible(true);

            this.map.push();

            //WORKAROUND: due to the gizmo mode being stored on its profile (which may be shared),
            //  we may end up with a mismatch between the editor mode and gizmo mode here.
            //  Reset mode explicitly here to work around this.
            DecalEditorGui.setMode(DecalEditorGui.getMode());

            // Set the current palette selection
            DecalEditorGui.paletteSync(this["paletteSelection"]);

            // Store this on a dynamic field
            // in order to restore whatever setting
            // the user had before.
            this["prevGizmoAlignment"] = GlobalGizmoProfile["alignment"];

            // The DecalEditor always uses Object alignment.
            GlobalGizmoProfile["alignment"] = "Object";

            DecalEditorGui.rebuildInstanceTree();

            // These could perhaps be the node details like the shape editor
            //ShapeEdPropWindow.syncNodeDetails(-1);

            base.onActivated();
        }
Exemple #14
0
        public static void initializeMissionAreaEditor()
        {
            Omni.self.Print(" % - Initializing Mission Area Editor");

            //exec( "./missionAreaEditor.ed.cs" );
            //MissionAreaEditor_initialize();
            gui.MissionAreaEditor.initialize();
            //exec( "./missionAreaEditorGui.ed.gui" );
            //MissionAreaEditorGui_initialize();
            MissionAreaEditorGui.initialize();
            //exec( "./missionAreaEditorGui.ed.cs" );

            // Add ourselves to EditorGui, where all the other tools reside
            MissionAreaEditorGui oMissionAreaEditorGui = "MissionAreaEditorGui";

            oMissionAreaEditorGui.setVisible(false);

            GuiWindowCollapseCtrl MissionAreaEditorTerrainWindow = "MissionAreaEditorTerrainWindow";

            MissionAreaEditorTerrainWindow.setVisible(false);

            GuiWindowCollapseCtrl MissionAreaEditorPropertiesWindow = "MissionAreaEditorPropertiesWindow";

            MissionAreaEditorPropertiesWindow.setVisible(false);

            EditorGui EditorGui = "EditorGui";

            EditorGui.add("MissionAreaEditorGui");
            EditorGui.add("MissionAreaEditorTerrainWindow");
            EditorGui.add("MissionAreaEditorPropertiesWindow");

            ObjectCreator ocMissionAreaEditorPlugin = new ObjectCreator("ScriptObject", "MissionAreaEditorPlugin",
                                                                        typeof(MissionAreaEditorPlugin));

            ocMissionAreaEditorPlugin["editorGui"] = "MissionAreaEditorGui";
            ocMissionAreaEditorPlugin.Create();


            MissionAreaEditorPlugin oMissionAreaEditorPlugin = "MissionAreaEditorPlugin";

            oMissionAreaEditorPlugin.initialize();
        }
        //---------------------------------------------------------------------------------------------

        public override void onDeactivated()
        {
            GuiWindowCollapseCtrl DatablockEditorTreeWindow      = "DatablockEditorTreeWindow";
            GuiWindowCollapseCtrl DatablockEditorInspectorWindow = "DatablockEditorInspectorWindow";

            //Copyright Winterleaf Entertainment L.L.C. 2013
            if (!this["isActive"].AsBool())
            {
                return;
            }
            this["isActive"] = false.AsString();
            //Copyright Winterleaf Entertainment L.L.C. 2013
            this.writeSettings();

            DatablockEditorInspectorWindow.setVisible(false);
            DatablockEditorTreeWindow.setVisible(false);
            this.map.pop();

            base.onDeactivated();
        }
Exemple #16
0
        public override void onActivated()
        {
            RoadEditorGui         RoadEditorGui           = "RoadEditorGui";
            GuiControl            RoadEditorToolbar       = "RoadEditorToolbar";
            GuiWindowCollapseCtrl RoadEditorOptionsWindow = "RoadEditorOptionsWindow";
            GuiWindowCollapseCtrl RoadEditorTreeWindow    = "RoadEditorTreeWindow";
            GuiTreeViewCtrl       RoadTreeView            = "RoadTreeView";

            EditorGui.EditorGuiStatusBar EditorGuiStatusBar = "EditorGuiStatusBar";
            EditorGui EditorGui = "EditorGui";

            //Copyright Winterleaf Entertainment L.L.C. 2013
            this["isActive"] = true.AsString();
            //Copyright Winterleaf Entertainment L.L.C. 2013

            this.readSettings();

            ((GuiBitmapButtonCtrl)
             ((GuiDynamicCtrlArrayControl)"ToolsPaletteArray").findObjectByInternalName("RoadEditorAddRoadMode",
                                                                                        false)).performClick();

            EditorGui.bringToFront(RoadEditorGui);

            RoadEditorGui.setVisible(true);
            RoadEditorGui.makeFirstResponder(true);
            RoadEditorToolbar.setVisible(true);

            RoadEditorOptionsWindow.setVisible(true);
            RoadEditorTreeWindow.setVisible(true);

            RoadTreeView.open("ServerDecalRoadSet", true);

            this.map.push();

            // Set the status bar here until all tool have been hooked up
            EditorGuiStatusBar.setInfo("Road editor.");
            EditorGuiStatusBar.setSelection("");

            base.onActivated();
        }
Exemple #17
0
        public static void initializeParticleEditor()
        {
            Omni.self.Print(" % - Initializing Particle Editor");
            gui.ParticleEditor.initialize();
            ParticleEmitterEditor.initialize();
            ParticleParticleEditor.initialize();
            GuiWindowCollapseCtrl pe_Window = "PE_Window";

            pe_Window.setVisible(false);
            EditorGui EditorGui = "EditorGui";

            EditorGui.add("PE_Window");

            ObjectCreator oParticleEditorPlugin = new ObjectCreator("ScriptObject", "ParticleEditorPlugin", typeof(ParticleEditorPlugin));

            oParticleEditorPlugin["editorGui"] = "EWorldEditor";
            oParticleEditorPlugin.Create();

            ParticleEditorPlugin ParticleEditorPlugin = "ParticleEditorPlugin";

            ParticleEditorPlugin.initialize();
        }
Exemple #18
0
        public override void onActivated()
        {
            EditorGui     EditorGui      = "EditorGui";
            TerrainEditor ETerrainEditor = "ETerrainEditor";

            GuiWindowCollapseCtrl TerrainPainterPreview   = "TerrainPainterPreview";
            GuiControl            EWTerrainPainterToolbar = "EWTerrainPainterToolbar";

            EditorGui.EditorGuiStatusBar EditorGuiStatusBar = "EditorGuiStatusBar";
            TerrainPainter TerrainPainter = "TerrainPainter";

            base.onActivated();
            isActive = true;

            EditorGui.readTerrainEditorSettings();
            GuiControl EWTerrainPainterToolbarBrushType = "EWTerrainPainterToolbarBrushType";

            ((GuiBitmapButtonCtrl)EWTerrainPainterToolbarBrushType.findObjectByInternalName("ellipse", true))
            .performClick();
            map.push();

            EditorGui.bringToFront(ETerrainEditor);
            ETerrainEditor.setVisible(true);
            ETerrainEditor.attachTerrain();
            ETerrainEditor.makeFirstResponder(true);

            //Copyright Winterleaf Entertainment L.L.C. 2013
            TerrainPainter.setVisible(true);
            TerrainPainterPreview.setVisible(true);
            //Copyright Winterleaf Entertainment L.L.C. 2013
            EWTerrainPainterToolbar.setVisible(true);
            ETerrainEditor.onBrushChanged();
            //Copyright Winterleaf Entertainment L.L.C. 2013
            TerrainPainter.setup(0);
            //Copyright Winterleaf Entertainment L.L.C. 2013
            syncBrushInfo();

            EditorGuiStatusBar.setSelection("");
        }
        public override void onDeactivated()
        {
            EditorGui             EditorGui                 = "EditorGui";
            MenuBar               menuBar                   = EditorGui["menuBar"];
            GuiControl            ConvexEditorToolbar       = "ConvexEditorToolbar";
            GuiConvexEditorCtrl   ConvexEditorGui           = "ConvexEditorGui";
            GuiWindowCollapseCtrl ConvexEditorOptionsWindow = "ConvexEditorOptionsWindow";
            GuiWindowCollapseCtrl ConvexEditorTreeWindow    = "ConvexEditorTreeWindow";

            this.writeSettings();

            ConvexEditorGui.setVisible(false);
            ConvexEditorOptionsWindow.setVisible(false);
            ConvexEditorTreeWindow.setVisible(false);
            ConvexEditorToolbar.setVisible(false);
            this.map.pop();

            // Remove our menu.
            menuBar.remove("ConvexActionsMenu");

            base.onDeactivated();
        }
Exemple #20
0
        public override void onDeactivated()
        {
            GuiWindowCollapseCtrl MissionAreaEditorPropertiesWindow = "MissionAreaEditorPropertiesWindow";
            GuiWindowCollapseCtrl MissionAreaEditorTerrainWindow    = "MissionAreaEditorTerrainWindow";
            MissionAreaEditorGui  MissionAreaEditorGui = "MissionAreaEditorGui";

            //Copyright Winterleaf Entertainment L.L.C. 2013
            if (!this["isActive"].AsBool())
            {
                return;
            }
            this["isActive"] = false.AsString();
            //Copyright Winterleaf Entertainment L.L.C. 2013
            this.writeSettings();

            MissionAreaEditorGui.setVisible(false);
            MissionAreaEditorTerrainWindow.setVisible(false);
            MissionAreaEditorPropertiesWindow.setVisible(false);

            // Allow the Gui to cleanup.
            MissionAreaEditorGui.onEditorDeactivated();

            base.onDeactivated();
        }
        public override void onDeactivated()
        {
            EditorPlugin WorldEditorPlugin = "WorldEditorPlugin";

            MaterialEditor.MaterialEditorGui MaterialEditorGui = "MaterialEditorGui";
            GuiWindowCollapseCtrl            MaterialEditorPropertiesWindow = "MaterialEditorPropertiesWindow";
            GuiWindowCollapseCtrl            MaterialEditorPreviewWindow    = "MaterialEditorPreviewWindow";
            EditorGui  EditorGui          = "EditorGui";
            GuiControl WorldEditorToolbar = EditorGui.FOT("WorldEditorToolbar");

            //Copyright Winterleaf Entertainment L.L.C. 2013
            if (!this["isActive"].AsBool())
            {
                return;
            }
            this["isActive"] = false.AsString();
            //Copyright Winterleaf Entertainment L.L.C. 2013

            if (bGlobal["$wasInWireFrameMode"])
            {
                bGlobal["$gfx::wireframe"] = true;
            }

            WorldEditorPlugin.onDeactivated();

            MaterialEditorGui.quit();

            //Copyright Winterleaf Entertainment L.L.C. 2013
            MaterialEditorPreviewWindow.setVisible(false);
            MaterialEditorPropertiesWindow.setVisible(false);
            //Copyright Winterleaf Entertainment L.L.C. 2013
            WorldEditorToolbar.setVisible(false);
            this.map.pop();

            base.onDeactivated();
        }
Exemple #22
0
        public static void initializeNavEditor()
        {
            omni.Util._echo(" % - Initializing Navigation Editor");

            omni.iGlobal["$Nav::WalkFlag"]     = 1 << 0;
            omni.iGlobal["$Nav::SwimFlag"]     = 1 << 1;
            omni.iGlobal["$Nav::JumpFlag"]     = 1 << 2;
            omni.iGlobal["$Nav::LedgeFlag"]    = 1 << 3;
            omni.iGlobal["$Nav::DropFlag"]     = 1 << 4;
            omni.iGlobal["$Nav::ClimbFlag"]    = 1 << 5;
            omni.iGlobal["$Nav::TeleportFlag"] = 1 << 6;

            // Execute all relevant scripts and GUIs.
            //exec("./NavEditor.cs");
            NavEditorProfiles.initialize();
            //exec("./NavEditorGui.gui");
            gui.NavEditorGui.initialize();
            //exec("./NavEditorToolbar.gui");
            gui.NavEditorToolbar.initialize();
            //exec("./NavEditorGui.cs");
            //exec("./NavEditorAboutDlg.gui");
            NavEditorAboutDlg.initialize();
            //exec("./NavEditorConsoleDlg.gui");
            gui.NavEditorConsoleDlg.initialize();
            //exec("./CreateNewNavMeshDlg.gui");
            CreateNewNavMeshDlg.initialize();

            // Add ourselves to EditorGui, where all the other tools reside
            NavEditorGui          NavEditorGui           = "NavEditorGui";
            GuiControl            NavEditorToolbar       = "NavEditorToolbar";
            GuiWindowCollapseCtrl NavEditorOptionsWindow = "NavEditorOptionsWindow";
            GuiWindowCollapseCtrl NavEditorTreeWindow    = "NavEditorTreeWindow";
            GuiWindowCtrl         NavEditorConsoleDlg    = "NavEditorConsoleDlg";

            NavEditorGui.setVisible(false);
            NavEditorToolbar.setVisible(false);
            NavEditorOptionsWindow.setVisible(false);
            NavEditorTreeWindow.setVisible(false);
            NavEditorConsoleDlg.setVisible(false);

            EditorGui EditorGui = "EditorGui";

            EditorGui.add(NavEditorGui);
            EditorGui.add(NavEditorToolbar);
            EditorGui.add(NavEditorOptionsWindow);
            EditorGui.add(NavEditorTreeWindow);
            EditorGui.add(NavEditorConsoleDlg);

            ObjectCreator oc = new ObjectCreator("ScriptObject", "NavEditorPlugin", typeof(NavEditorPlugin));

            oc["editorGui"] = NavEditorGui;
            oc.Create();

            // Bind shortcuts for the nav editor.
            ActionMap map = new ObjectCreator("ActionMap").Create();

            map.bindCmd("keyboard", "1", "ENavEditorSelectModeBtn.performClick();", "");
            map.bindCmd("keyboard", "2", "ENavEditorLinkModeBtn.performClick();", "");
            map.bindCmd("keyboard", "3", "ENavEditorCoverModeBtn.performClick();", "");
            map.bindCmd("keyboard", "4", "ENavEditorTileModeBtn.performClick();", "");
            map.bindCmd("keyboard", "5", "ENavEditorTestModeBtn.performClick();", "");
            map.bindCmd("keyboard", "c", "NavEditorConsoleBtn.performClick();", "");
            NavEditorPlugin NavEditorPlugin = "NavEditorPlugin";

            NavEditorPlugin.map = map;

            NavEditorPlugin.initSettings();
        }
Exemple #23
0
        public override void onActivated()
        {
            readSettings();

            // Set a global variable so everyone knows we're editing!
            bGlobal["$Nav::EditorOpen"] = true;

            // Start off in Select mode.
            GuiDynamicCtrlArrayControl ToolsPaletteArray   = "ToolsPaletteArray";
            GuiBitmapButtonCtrl        NavEditorSelectMode = ToolsPaletteArray.FOT("NavEditorSelectMode");

            NavEditorSelectMode.performClick();

            EditorGui    EditorGui    = "EditorGui";
            NavEditorGui NavEditorGui = "NavEditorGui";

            EditorGui.bringToFront(NavEditorGui);

            NavEditorGui.setVisible(true);
            NavEditorGui.makeFirstResponder(true);
            GuiControl NavEditorToolbar = "NavEditorToolbar";

            NavEditorToolbar.setVisible(true);

            GuiWindowCollapseCtrl NavEditorOptionsWindow = "NavEditorOptionsWindow";
            GuiWindowCollapseCtrl NavEditorTreeWindow    = "NavEditorTreeWindow";

            NavEditorOptionsWindow.setVisible(true);
            NavEditorTreeWindow.setVisible(true);

            // Inspect the ServerNavMeshSet, which contains all the NavMesh objects
            // in the mission.
            SimSet ServerNavMeshSet = "ServerNavMeshSet";

            if (!Util.isObject(ServerNavMeshSet))
            {
                ServerNavMeshSet = new ObjectCreator("SimSet", "ServerNavMeshSet").Create();
            }
            if (ServerNavMeshSet.getCount() == 0)
            {
                messageBox.MessageBoxYesNo("No NavMesh",
                                           "There is no NavMesh in this level. Would you like to create one?" + " " +
                                           "If not, please use the World Editor to create a new NavMesh.",
                                           "Canvas.pushDialog(CreateNewNavMeshDlg);");
            }
            NavTreeView NavTreeView = "NavTreeView";

            NavTreeView.open(ServerNavMeshSet, true);

            // Push our keybindings to the top. (See initializeNavEditor for where this
            // map was created.)
            map.push();

            // Store this on a dynamic field
            // in order to restore whatever setting
            // the user had before.
            GizmoProfile GlobalGizmoProfile = "GlobalGizmoProfile";

            prevGizmoAlignment = GlobalGizmoProfile.alignment;

            // Always use Object alignment.
            GlobalGizmoProfile.alignment = "Object";

            // Set the status bar here until all tool have been hooked up
            EditorGui.EditorGuiStatusBar EditorGuiStatusBar = "EditorGuiStatusBar";
            EditorGuiStatusBar.setInfo("Navigation editor.");
            EditorGuiStatusBar.setSelection("");

            // Allow the Gui to setup.
            NavEditorGui.onEditorActivated();

            base.onActivated();
        }