示例#1
0
        public static void EPainter_TerrainMaterialAddCallback(TerrainMaterial mat, int matIndex)
        {
            if (!mat.isObject())
                return;

            ((TerrainEditor) "ETerrainEditor").addMaterial(mat.getInternalName());
            ((TerrainPainter) "TerrainPainter").setup(matIndex);
        }
        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";
        }
示例#3
0
        public static void EPainter_TerrainMaterialUpdateCallback(TerrainMaterial mat, int matIndex)
        {
            if (matIndex == -1 || !mat.isObject())
                return;

            // Update the material and the UI.

            ((TerrainEditor) "ETerrainEditor").updateMaterial((uint) matIndex, mat.getInternalName());
            ((TerrainPainter) "TerrainPainter").setup(matIndex);
        }