Browse Source

- Added "controllers" debug option to Sandbox tools.

MelvMay-GG 12 years ago
parent
commit
b25f6cc

+ 33 - 10
modules/Sandbox/1/gui/ToolboxDialog.gui.taml

@@ -35,7 +35,7 @@
 		Profile="GuiDefaultProfile"
 		HorizSizing="relative"
 		VertSizing="relative"
-		Position="805 555"
+		Position="805 585"
 		Extent="320 160">
 		
 		<!-- Background Color -->
@@ -441,6 +441,29 @@
             groupNum="-1"
             buttonType="ToggleButton"
             useMouseEvents="0" />
+			
+		<!-- Controllers Option -->
+		<GuiButtonCtrl
+            name="ControllersOptionCheckBox"
+            Command="setControllersOption(ControllersOptionCheckBox.getStateOn());"
+            canSaveDynamicFields="0"
+            isContainer="0"
+            Profile="BlueButtonProfile"
+            HorizSizing="relative"
+            VertSizing="relative"
+            Position="0 110"
+            Extent="180 35"
+            MinExtent="8 2"
+            canSave="1"
+            Visible="1"
+            Active="1"
+            tooltipprofile="GuiToolTipProfile"
+            ToolTip="Whether to show the cdontrollers overlay or not."
+            hovertime="100"
+            text="Controllers"
+            groupNum="-1"
+            buttonType="ToggleButton"
+            useMouseEvents="0" />			
 				
 		<!-- Joints Option -->
 		<GuiButtonCtrl
@@ -451,7 +474,7 @@
             Profile="BlueButtonProfile"
             HorizSizing="relative"
             VertSizing="relative"
-            Position="0 110"
+            Position="0 155"
             Extent="180 35"
             MinExtent="8 2"
             canSave="1"
@@ -474,7 +497,7 @@
             Profile="BlueButtonProfile"
             HorizSizing="relative"
             VertSizing="relative"
-            Position="0 155"
+            Position="0 200"
             Extent="180 35"
             MinExtent="8 2"
             canSave="1"
@@ -496,7 +519,7 @@
             Profile="BlueButtonProfile"
             HorizSizing="relative"
             VertSizing="relative"
-            Position="0 200"
+            Position="0 245"
             Extent="180 35"
             MinExtent="8 2"
             canSave="1"
@@ -521,7 +544,7 @@
             Profile="BlueButtonProfile"
             HorizSizing="relative"
             VertSizing="relative"
-            Position="0 245"
+            Position="0 290"
             Extent="180 35"
             MinExtent="8 2"
             canSave="1"
@@ -546,7 +569,7 @@
             Profile="BlueButtonProfile"
             HorizSizing="relative"
             VertSizing="relative"
-            Position="0 290"
+            Position="0 335"
             Extent="180 35"
             MinExtent="8 2"
             canSave="1"
@@ -571,7 +594,7 @@
             Profile="BlueButtonProfile"
             HorizSizing="relative"
             VertSizing="relative"
-            Position="0 335"
+            Position="0 380"
             Extent="180 35"
             MinExtent="8 2"
             canSave="1"
@@ -596,7 +619,7 @@
             Profile="BlueButtonProfile"
             HorizSizing="relative"
             VertSizing="relative"
-            Position="0 380"
+            Position="0 425"
             Extent="180 35"
             MinExtent="8 2"
             canSave="1"
@@ -621,7 +644,7 @@
             Profile="BlueButtonProfile"
             HorizSizing="relative"
             VertSizing="relative"
-            Position="0 425"
+            Position="0 470"
             Extent="180 35"
             MinExtent="8 2"
             canSave="1"
@@ -646,7 +669,7 @@
             Profile="BlueButtonProfile"
             HorizSizing="relative"
             VertSizing="relative"
-            Position="0 470"
+            Position="0 515"
             Extent="180 35"
             MinExtent="8 2"
             canSave="1"

+ 1 - 0
modules/Sandbox/1/scripts/defaultPreferences.cs

@@ -30,6 +30,7 @@ $pref::Sandbox::defaultToyVersionId    = 1;
 $pref::Sandbox::defaultBackgroundColor = "Black";
 $pref::Sandbox::metricsOption   = false;
 $pref::Sandbox::fpsmetricsOption = true;
+$pref::Sandbox::controllersOption = false;
 $pref::Sandbox::jointsOption    = false;
 $pref::Sandbox::wireframeOption = false;
 $pref::Sandbox::aabbOption      = false;

+ 16 - 1
modules/Sandbox/1/scripts/toolbox.cs

@@ -310,7 +310,13 @@ function updateToolboxOptions()
         SandboxScene.setDebugOn( "fps" );
     else
         SandboxScene.setDebugOff( "fps" );
-       
+
+    // Set option.
+    if ( $pref::Sandbox::controllersOption )
+        SandboxScene.setDebugOn( "controllers" );
+    else
+        SandboxScene.setDebugOff( "controllers" );
+                    
     // Set option.
     if ( $pref::Sandbox::jointsOption )
         SandboxScene.setDebugOn( "joints" );
@@ -362,6 +368,7 @@ function updateToolboxOptions()
     // Set the options check-boxe.
     MetricsOptionCheckBox.setStateOn( $pref::Sandbox::metricsOption );
     FpsMetricsOptionCheckBox.setStateOn( $pref::Sandbox::fpsmetricsOption );
+    ControllersOptionCheckBox.setStateOn( $pref::Sandbox::controllersOption );
     JointsOptionCheckBox.setStateOn( $pref::Sandbox::jointsOption );
     WireframeOptionCheckBox.setStateOn( $pref::Sandbox::wireframeOption );
     AABBOptionCheckBox.setStateOn( $pref::Sandbox::aabbOption );
@@ -419,6 +426,14 @@ function setMetricsOption( %flag )
 
 //-----------------------------------------------------------------------------
 
+function setControllersOption( %flag )
+{
+    $pref::Sandbox::controllersOption = %flag;
+    updateToolboxOptions();
+}
+
+//-----------------------------------------------------------------------------
+
 function setJointsOption( %flag )
 {
     $pref::Sandbox::jointsOption = %flag;