public override void onActiveTerrainChange(string newTerrain = "")
 {
     EditorGui EditorGui = "EditorGui";
     TerrainPainter TerrainPainter = "TerrainPainter";
     if (EditorGui.currentEditor.getId() == "TerrainPainterPlugin".getID())
         TerrainPainter.setup(((TerrainEditor) "ETerrainEditor")["paintIndex"].AsInt());
 }
Example #2
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("");
        }