Example #1
0
        public void syncBrushInfo()
        {
            GuiControl    TerrainBrushSizeTextEditContainer     = "TerrainBrushSizeTextEditContainer";
            GuiControl    TerrainBrushPressureTextEditContainer = "TerrainBrushPressureTextEditContainer";
            GuiControl    TerrainBrushSoftnessTextEditContainer = "TerrainBrushSoftnessTextEditContainer";
            GuiControl    TerrainSetHeightTextEditContainer     = "TerrainSetHeightTextEditContainer";
            TerrainEditor ETerrainEditor = "ETerrainEditor";

            GuiTextEditCtrl tTerrainBrushSizeTextEditContainer =
                TerrainBrushSizeTextEditContainer.findObjectByInternalName("textEdit", true);

            GuiTextEditCtrl tTerrainBrushPressureTextEditContainer =
                TerrainBrushPressureTextEditContainer.findObjectByInternalName("textEdit", true);

            GuiTextEditCtrl tTerrainBrushSoftnessTextEditContainer =
                TerrainBrushSoftnessTextEditContainer.findObjectByInternalName("textEdit", true);

            GuiTextEditCtrl tTerrainSetHeightTextEditContainer =
                TerrainSetHeightTextEditContainer.findObjectByInternalName("textEdit", true);

            tTerrainBrushSizeTextEditContainer.text     = Util.getWord(ETerrainEditor.getBrushSize(), 0);
            tTerrainBrushPressureTextEditContainer.text = (ETerrainEditor.getBrushPressure() * 100).AsString();
            tTerrainBrushSoftnessTextEditContainer.text = (ETerrainEditor.getBrushSoftness() * 100).AsString();
            tTerrainSetHeightTextEditContainer.text     = (ETerrainEditor.setHeightVal.AsString());

            string brushType = ETerrainEditor.getBrushType();

            Util.eval("EWTerrainEditToolbar-->" + brushType + ".setStateOn(1);");
        }
Example #2
0
        public void syncBrushInfo()
        {
            // Update gui brush info
            GuiControl    PaintBrushSizeTextEditContainer     = "PaintBrushSizeTextEditContainer";
            GuiControl    PaintBrushSlopeControl              = "PaintBrushSlopeControl";
            GuiControl    PaintBrushPressureTextEditContainer = "PaintBrushPressureTextEditContainer";
            TerrainEditor ETerrainEditor = "ETerrainEditor";

            ((GuiTextEditCtrl)PaintBrushSizeTextEditContainer.findObjectByInternalName("textEdit", true)).text =
                Util.getWord(ETerrainEditor.getBrushSize(), 0);
            ((GuiTextEditCtrl)PaintBrushSlopeControl.findObjectByInternalName("SlopeMinAngle", true)).text =
                ETerrainEditor.getSlopeLimitMinAngle().AsString();
            ((GuiTextEditCtrl)PaintBrushSlopeControl.findObjectByInternalName("SlopeMaxAngle", true)).text =
                ETerrainEditor.getSlopeLimitMaxAngle().AsString();
            ((GuiTextEditCtrl)PaintBrushPressureTextEditContainer.findObjectByInternalName("textEdit", true)).text =
                (ETerrainEditor.getBrushPressure() * 100).AsString();

            string brushType = ETerrainEditor.getBrushType();

            Util.eval("EWTerrainPainterToolbar-->" + brushType + ".setStateOn(1);");
        }