Example #1
0
        public void open()
        {
            EditorGui                      EditorGui                      = "EditorGui";
            GuiCanvas                      Canvas                         = "Canvas";
            GuiEditorGui                   GuiEditorGui                   = "GuiEditorGui";
            EWTreeWindow                   EWTreeWindow                   = "EWTreeWindow";
            TerrainPainter                 TerrainPainter                 = "TerrainPainter";
            GuiWindowCollapseCtrl          TerrainPainterPreview          = "TerrainPainterPreview";
            EWInspectorWindow              EWInspectorWindow              = "EWInspectorWindow";
            MaterialEditorPreviewWindow    MaterialEditorPreviewWindow    = "MaterialEditorPreviewWindow";
            MaterialEditorPropertiesWindow MaterialEditorPropertiesWindow = "MaterialEditorPropertiesWindow";
            DatablockEditorTreeWindow      DatablockEditorTreeWindow      = "DatablockEditorTreeWindow";
            DatablockEditorInspectorWindow DatablockEditorInspectorWindow = "DatablockEditorInspectorWindow";

            DecalEditorGui.DecalEditorWindow              DecalEditorWindow            = "DecalEditorWindow";
            DecalEditorGui.DecalPreviewWindow             DecalPreviewWindow           = "DecalPreviewWindow";
            ForestEditorGui.ForestEditorPalleteWindow     ForestEditorPalleteWindow    = "ForestEditorPalleteWindow";
            ForestEditorGui.ForestEditorPropertiesWindow  ForestEditorPropertiesWindow = "ForestEditorPropertiesWindow";
            MeshRoadEditorGui.MeshRoadEditorTreeWindow    MeshRoadEditorTreeWindow     = "MeshRoadEditorTreeWindow";
            MeshRoadEditorGui.MeshRoadEditorOptionsWindow MeshRoadEditorOptionsWindow  = "MeshRoadEditorOptionsWindow";
            GuiWindowCollapseCtrl MissionAreaEditorTerrainWindow    = "MissionAreaEditorTerrainWindow";
            GuiWindowCollapseCtrl MissionAreaEditorPropertiesWindow = "MissionAreaEditorPropertiesWindow";

            ParticleEditor.gui.ParticleEditor.PE_Window PE_Window                = "PE_Window";
            RiverEditorGui.RiverEditorTreeWindow        RiverEditorTreeWindow    = "RiverEditorTreeWindow";
            RiverEditorGui.RiverEditorOptionsWindow     RiverEditorOptionsWindow = "RiverEditorOptionsWindow";
            RoadEditorGui.RoadEditorTreeWindow          RoadEditorTreeWindow     = "RoadEditorTreeWindow";
            RoadEditorGui.RoadEditorOptionsWindow       RoadEditorOptionsWindow  = "RoadEditorOptionsWindow";
            ShapeEdAdvancedWindow ShapeEdAdvancedWindow = "ShapeEdAdvancedWindow";
            ShapeEdSelectWindow   ShapeEdSelectWindow   = "ShapeEdSelectWindow";
            ShapeEdPropWindow     ShapeEdPropWindow     = "ShapeEdPropWindow";

            // prevent the mission editor from opening while the GuiEditor is open.
            if (Canvas.getContent() == GuiEditorGui.getId())
            {
                return;
            }

            if (!EditorGui.isInitialized)
            {
                EditorGui.init();
            }

            this.editorEnabled();
            Canvas.setContent(EditorGui);
            EditorGui.syncCameraGui();

            if (EWTreeWindow["wasOpen"].AsBool())
            {
                EWTreeWindow.OpenPopOut();
            }

            if (EWInspectorWindow["wasOpen"].AsBool())
            {
                EWInspectorWindow.OpenPopOut();
            }

            if (TerrainPainter["wasOpen"].AsBool())
            {
                TerrainPainter.OpenPopOut();
            }

            if (TerrainPainterPreview["wasOpen"].AsBool())
            {
                TerrainPainterPreview.OpenPopOut();
            }

            if (MaterialEditorPreviewWindow["wasOpen"].AsBool())
            {
                MaterialEditorPreviewWindow.OpenPopOut();
            }

            if (MaterialEditorPropertiesWindow["wasOpen"].AsBool())
            {
                MaterialEditorPropertiesWindow.OpenPopOut();
            }

            if (DatablockEditorTreeWindow["wasOpen"].AsBool())
            {
                DatablockEditorTreeWindow.OpenPopOut();
            }

            if (DatablockEditorInspectorWindow["wasOpen"].AsBool())
            {
                DatablockEditorInspectorWindow.OpenPopOut();
            }

            if (DecalEditorWindow["wasOpen"].AsBool())
            {
                DecalEditorWindow.OpenPopOut();
            }

            if (DecalPreviewWindow["wasOpen"].AsBool())
            {
                DecalPreviewWindow.OpenPopOut();
            }

            if (ForestEditorPalleteWindow["wasOpen"].AsBool())
            {
                ForestEditorPalleteWindow.OpenPopOut();
            }

            if (ForestEditorPropertiesWindow["wasOpen"].AsBool())
            {
                ForestEditorPropertiesWindow.OpenPopOut();
            }

            if (MeshRoadEditorTreeWindow["wasOpen"].AsBool())
            {
                MeshRoadEditorTreeWindow.OpenPopOut();
            }

            if (MeshRoadEditorOptionsWindow["wasOpen"].AsBool())
            {
                MeshRoadEditorOptionsWindow.OpenPopOut();
            }

            if (MissionAreaEditorTerrainWindow["wasOpen"].AsBool())
            {
                MissionAreaEditorTerrainWindow.OpenPopOut();
            }

            if (MissionAreaEditorPropertiesWindow["wasOpen"].AsBool())
            {
                MissionAreaEditorPropertiesWindow.OpenPopOut();
            }

            if (PE_Window["wasOpen"].AsBool())
            {
                PE_Window.OpenPopOut();
            }

            if (RiverEditorTreeWindow["wasOpen"].AsBool())
            {
                RiverEditorTreeWindow.OpenPopOut();
            }

            if (RiverEditorOptionsWindow["wasOpen"].AsBool())
            {
                RiverEditorOptionsWindow.OpenPopOut();
            }

            if (RoadEditorTreeWindow["wasOpen"].AsBool())
            {
                RoadEditorTreeWindow.OpenPopOut();
            }

            if (RoadEditorOptionsWindow["wasOpen"].AsBool())
            {
                RoadEditorOptionsWindow.OpenPopOut();
            }

            if (ShapeEdAdvancedWindow["wasOpen"].AsBool())
            {
                ShapeEdAdvancedWindow.OpenPopOut();
            }

            if (ShapeEdSelectWindow["wasOpen"].AsBool())
            {
                ShapeEdSelectWindow.OpenPopOut();
            }

            if (ShapeEdPropWindow["wasOpen"].AsBool())
            {
                ShapeEdPropWindow.OpenPopOut();
            }
        }