Exemplo n.º 1
0
        public override void onGuiUpdate(string text)
        {
            string        minHeight      = Util.getWord(text, 1);
            string        avgHeight      = Util.getWord(text, 2);
            string        maxHeight      = Util.getWord(text, 3);
            TerrainEditor ETerrainEditor = "ETerrainEditor";
            string        mouseBrushInfo = " (Mouse) #: " + Util.getWord(text, 0) + "  avg: " + avgHeight + " " +
                                           ETerrainEditor.currentAction;
            string selectionInfo = "     (Selected) #: " + Util.getWord(text, 4) + "  avg: " + Util.getWord(text, 5);

            GuiTextCtrl TEMouseBrushInfo  = "TEMouseBrushInfo";
            GuiTextCtrl TEMouseBrushInfo1 = "TEMouseBrushInfo1";
            GuiTextCtrl TESelectionInfo   = "TESelectionInfo";
            GuiTextCtrl TESelectionInfo1  = "TESelectionInfo1";


            TEMouseBrushInfo.setValue(mouseBrushInfo);
            TEMouseBrushInfo1.setValue(mouseBrushInfo);
            TESelectionInfo.setValue(selectionInfo);
            TESelectionInfo1.setValue(selectionInfo);

            EditorGui.EditorGuiStatusBar EditorGuiStatusBar = "EditorGuiStatusBar";

            EditorGuiStatusBar.setSelection("min: " + minHeight + "  avg: " + avgHeight + "  max: " + maxHeight);
        }
Exemplo n.º 2
0
        public void onSolderEdges()
        {
            editor Editor = "Editor";
            TerrainEditor ETerrainEditor = "ETerrainEditor";

            // # Work with all terrains on the loaded level.
            TerrainSolderEdgesAction action = new ObjectCreator("TerrainSolderEdgesAction").Create();
            action.solder();
            action.addToManager(Editor.getUndoManager());
            ETerrainEditor.isDirty = true;
        }
Exemplo n.º 3
0
        public void setPaintMaterial(int matIndex, TerrainMaterial terrainMat)
        {
            if (!terrainMat.isObject())
                throw new Exception("TerrainEditor::setPaintMaterial - Got bad material!");
            TerrainEditor ETerrainEditor = "ETerrainEditor";
            ETerrainEditor.paintIndex = matIndex;
            GuiBitmapCtrl ETerrainMaterialSelected = "ETerrainMaterialSelected";
            GuiButtonCtrl ETerrainMaterialSelectedEdit = "ETerrainMaterialSelectedEdit";
            GuiTextCtrl TerrainTextureText = "TerrainTextureText";
            GuiWindowCtrl ProceduralTerrainPainterDescription = "ProceduralTerrainPainterDescription";

            ETerrainEditor.paintIndex = matIndex;
            ETerrainMaterialSelected["selectedMatIndex"] = matIndex.AsString();
            ETerrainMaterialSelected["selectedMat"] = terrainMat;
            ETerrainMaterialSelected.bitmap = new TypeImageFilename(terrainMat.diffuseMap);
            ETerrainMaterialSelectedEdit["Visible"] = terrainMat.isObject().AsString();
            TerrainTextureText.text = terrainMat.getInternalName();
            ProceduralTerrainPainterDescription.text = "Generate " + terrainMat.getInternalName() + " layer";
        }