소스 검색

Added a checkbox to the terrain import GUI and fixed a space.

Daniel Buckmaster 12 년 전
부모
커밋
b868906ba5

+ 1 - 1
Engine/source/terrain/terrFile.cpp

@@ -684,7 +684,7 @@ void TerrainFile::import(  const GBitmap &heightMap,
                            F32 heightScale,
                            const Vector<U8> &layerMap, 
                            const Vector<String> &materials,
-                           bool flipYAxis)
+                           bool flipYAxis )
 {
    AssertFatal( heightMap.getWidth() == heightMap.getHeight(), "TerrainFile::import - Height map is not square!" );
    AssertFatal( isPow2( heightMap.getWidth() ), "TerrainFile::import - Height map is not power of two!" );

+ 24 - 1
Templates/Empty PhysX/game/tools/worldEditor/gui/guiTerrainImportGui.gui

@@ -510,6 +510,26 @@
          buttonType = "PushButton";
          useMouseEvents = "0";
       };
+      new GuiCheckBoxCtrl() {
+         text = " Flip Y axis?";
+         groupNum = "-1";
+         buttonType = "ToggleButton";
+         useMouseEvents = "0";
+         position = "12 222";
+         extent = "140 30";
+         minExtent = "8 2";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "GuiCheckBoxProfile";
+         visible = "1";
+         active = "1";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         internalName = "FlipYAxis";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
    };
 };
 //--- OBJECT WRITE END ---
@@ -533,6 +553,8 @@ function TerrainImportGui::import( %this )
    %metersPerPixel = %this-->MetersPerPixel.getText();
    %heightScale = %this-->HeightScale.getText();
    
+   %flipYAxis = %this-->FlipYAxis.isStateOn();
+   
    // Grab and validate terrain object name.
    
    %terrainName = %this-->TerrainName.getText();
@@ -568,7 +590,8 @@ function TerrainImportGui::import( %this )
                                   %metersPerPixel, 
                                   %heightScale, 
                                   %opacityNames, 
-                                  %materialNames );
+                                  %materialNames,
+                                  %flipYAxis );
 
    Canvas.popDialog( %this );
 

+ 24 - 1
Templates/Empty/game/tools/worldEditor/gui/guiTerrainImportGui.gui

@@ -510,6 +510,26 @@
          buttonType = "PushButton";
          useMouseEvents = "0";
       };
+      new GuiCheckBoxCtrl() {
+         text = " Flip Y axis?";
+         groupNum = "-1";
+         buttonType = "ToggleButton";
+         useMouseEvents = "0";
+         position = "12 222";
+         extent = "140 30";
+         minExtent = "8 2";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "GuiCheckBoxProfile";
+         visible = "1";
+         active = "1";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         internalName = "FlipYAxis";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
    };
 };
 //--- OBJECT WRITE END ---
@@ -533,6 +553,8 @@ function TerrainImportGui::import( %this )
    %metersPerPixel = %this-->MetersPerPixel.getText();
    %heightScale = %this-->HeightScale.getText();
    
+   %flipYAxis = %this-->FlipYAxis.isStateOn();
+   
    // Grab and validate terrain object name.
    
    %terrainName = %this-->TerrainName.getText();
@@ -568,7 +590,8 @@ function TerrainImportGui::import( %this )
                                   %metersPerPixel, 
                                   %heightScale, 
                                   %opacityNames, 
-                                  %materialNames );
+                                  %materialNames,
+                                  %flipYAxis );
 
    Canvas.popDialog( %this );
 

+ 24 - 1
Templates/Full PhysX/game/tools/worldEditor/gui/guiTerrainImportGui.gui

@@ -510,6 +510,26 @@
          buttonType = "PushButton";
          useMouseEvents = "0";
       };
+      new GuiCheckBoxCtrl() {
+         text = " Flip Y axis?";
+         groupNum = "-1";
+         buttonType = "ToggleButton";
+         useMouseEvents = "0";
+         position = "12 222";
+         extent = "140 30";
+         minExtent = "8 2";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "GuiCheckBoxProfile";
+         visible = "1";
+         active = "1";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         internalName = "FlipYAxis";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
    };
 };
 //--- OBJECT WRITE END ---
@@ -533,6 +553,8 @@ function TerrainImportGui::import( %this )
    %metersPerPixel = %this-->MetersPerPixel.getText();
    %heightScale = %this-->HeightScale.getText();
    
+   %flipYAxis = %this-->FlipYAxis.isStateOn();
+   
    // Grab and validate terrain object name.
    
    %terrainName = %this-->TerrainName.getText();
@@ -568,7 +590,8 @@ function TerrainImportGui::import( %this )
                                   %metersPerPixel, 
                                   %heightScale, 
                                   %opacityNames, 
-                                  %materialNames );
+                                  %materialNames,
+                                  %flipYAxis );
 
    Canvas.popDialog( %this );
 

+ 24 - 1
Templates/Full/game/tools/worldEditor/gui/guiTerrainImportGui.gui

@@ -510,6 +510,26 @@
          buttonType = "PushButton";
          useMouseEvents = "0";
       };
+      new GuiCheckBoxCtrl() {
+         text = " Flip Y axis?";
+         groupNum = "-1";
+         buttonType = "ToggleButton";
+         useMouseEvents = "0";
+         position = "12 222";
+         extent = "140 30";
+         minExtent = "8 2";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "GuiCheckBoxProfile";
+         visible = "1";
+         active = "1";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         internalName = "FlipYAxis";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
    };
 };
 //--- OBJECT WRITE END ---
@@ -533,6 +553,8 @@ function TerrainImportGui::import( %this )
    %metersPerPixel = %this-->MetersPerPixel.getText();
    %heightScale = %this-->HeightScale.getText();
    
+   %flipYAxis = %this-->FlipYAxis.isStateOn();
+   
    // Grab and validate terrain object name.
    
    %terrainName = %this-->TerrainName.getText();
@@ -568,7 +590,8 @@ function TerrainImportGui::import( %this )
                                   %metersPerPixel, 
                                   %heightScale, 
                                   %opacityNames, 
-                                  %materialNames );
+                                  %materialNames,
+                                  %flipYAxis );
 
    Canvas.popDialog( %this );