示例#1
0
        public override void onActivated()
        {
            base.onActivated();
            EditorGui           EditorGui            = "EditorGui";
            TerrainEditor       ETerrainEditor       = "ETerrainEditor";
            GuiControl          EWTerrainEditToolbar = "EWTerrainEditToolbar";
            TerrainEditorPlugin TerrainEditorPlugin  = "TerrainEditorPlugin";

            EditorGui.EditorGuiStatusBar EditorGuiStatusBar = "EditorGuiStatusBar";
            Settings EditorSettings = "EditorSettings";

            EditorGui.readTerrainEditorSettings();

            string action = EditorSettings.value("TerrainEditor/currentAction");

            ETerrainEditor.switchAction(action);

            GuiButtonCtrl ctrl =
                (((GuiDynamicCtrlArrayControl)"ToolsPaletteArray").findObjectByInternalName(action, true));

            ctrl.setStateOn(true);

            GuiBitmapButtonCtrl octrl =
                ((GuiControl)"EWTerrainEditToolbarBrushType").findObjectByInternalName("ellipse", true);

            octrl.performClick();

            EditorGui.menuBar.insert(this["terrainMenu"], EditorGui.menuBar["dynamicItemInsertPos"].AsInt());

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

            EWTerrainEditToolbar.setVisible(true);
            ETerrainEditor.onBrushChanged();
            ETerrainEditor.setup();
            TerrainEditorPlugin.syncBrushInfo();

            EditorGuiStatusBar.setSelection("");

            ((ActionMap)map).push();
        }