Kaynağa Gözat

Merge pull request #258 from Areloch/BaseGameThemeUpdate

Updates the BaseGame UI theme
Brian Roberts 5 yıl önce
ebeveyn
işleme
4890ed8789
96 değiştirilmiş dosya ile 1669 ekleme ve 2612 silme
  1. 21 10
      Engine/source/gui/controls/guiGameListMenuCtrl.cpp
  2. 4 7
      Engine/source/gui/core/guiCanvas.cpp
  3. 6 0
      Engine/source/gui/game/guiFadeinBitmapCtrl.cpp
  4. 1 0
      Engine/source/gui/game/guiFadeinBitmapCtrl.h
  5. 16 7
      Templates/BaseGame/game/data/ExampleModule/scripts/default.keybinds.cs
  6. 4 0
      Templates/BaseGame/game/data/ExampleModule/scripts/inputCommands.cs
  7. 1 6
      Templates/BaseGame/game/data/ui/UI.cs
  8. 4 13
      Templates/BaseGame/game/data/ui/guis/chooseLevelDlg.cs
  9. 107 5
      Templates/BaseGame/game/data/ui/guis/chooseLevelDlg.gui
  10. 0 319
      Templates/BaseGame/game/data/ui/guis/guiGamepadButton.cs
  11. 0 239
      Templates/BaseGame/game/data/ui/guis/guiGamepadButton.gui
  12. 12 13
      Templates/BaseGame/game/data/ui/guis/joinServerMenu.cs
  13. 214 9
      Templates/BaseGame/game/data/ui/guis/joinServerMenu.gui
  14. 22 3
      Templates/BaseGame/game/data/ui/guis/loadingGui.gui
  15. 7 29
      Templates/BaseGame/game/data/ui/guis/mainMenu.cs
  16. 39 10
      Templates/BaseGame/game/data/ui/guis/mainMenu.gui
  17. 248 10
      Templates/BaseGame/game/data/ui/guis/messageBoxDlg.gui
  18. 15 22
      Templates/BaseGame/game/data/ui/guis/optionsMenu.cs
  19. 205 23
      Templates/BaseGame/game/data/ui/guis/optionsMenu.gui
  20. 8 14
      Templates/BaseGame/game/data/ui/guis/pauseMenu.cs
  21. 67 8
      Templates/BaseGame/game/data/ui/guis/pauseMenu.gui
  22. 3 1
      Templates/BaseGame/game/data/ui/guis/startupGui.cs
  23. 0 0
      Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Escape.png
  24. 0 0
      Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Return.png
  25. 0 0
      Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Return_Alt.png
  26. 0 0
      Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Return_Tall.png
  27. BIN
      Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Options.png
  28. BIN
      Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Share.png
  29. BIN
      Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_LB.png
  30. BIN
      Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_RB.png
  31. BIN
      Templates/BaseGame/game/data/ui/images/background-dark.png
  32. BIN
      Templates/BaseGame/game/data/ui/images/listMenuArray.png
  33. BIN
      Templates/BaseGame/game/data/ui/images/panel.png
  34. BIN
      Templates/BaseGame/game/data/ui/images/panel_low.png
  35. BIN
      Templates/BaseGame/game/data/ui/images/scrollBar.png
  36. 0 200
      Templates/BaseGame/game/data/ui/scripts/audioMenu.cs
  37. 0 103
      Templates/BaseGame/game/data/ui/scripts/default.keybinds.cs
  38. 0 245
      Templates/BaseGame/game/data/ui/scripts/displayMenu.cs
  39. 0 1050
      Templates/BaseGame/game/data/ui/scripts/graphicsMenu.cs
  40. 347 0
      Templates/BaseGame/game/data/ui/scripts/menuInputButtons.cs
  41. 40 27
      Templates/BaseGame/game/data/ui/scripts/messageBoxes.cs
  42. 69 30
      Templates/BaseGame/game/data/ui/scripts/profiles.cs
  43. 1 1
      Templates/BaseGame/game/tools/VerveEditor/GUI/VerveEditorGroupBuilder.gui
  44. 1 1
      Templates/BaseGame/game/tools/VerveEditor/Scripts/Groups/VGroup.cs
  45. 2 2
      Templates/BaseGame/game/tools/VerveEditor/Scripts/Persistence.cs
  46. 1 1
      Templates/BaseGame/game/tools/VerveEditor/Scripts/Tracks/VTrack.cs
  47. 2 2
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.cs
  48. 5 5
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetImport.cs
  49. 1 1
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetImportConfigEditor.cs
  50. 1 1
      Templates/BaseGame/game/tools/assetBrowser/scripts/editAsset.cs
  51. 1 1
      Templates/BaseGame/game/tools/assetBrowser/scripts/editModule.cs
  52. 3 3
      Templates/BaseGame/game/tools/assetBrowser/scripts/newAsset.cs
  53. 2 2
      Templates/BaseGame/game/tools/datablockEditor/datablockEditor.cs
  54. 2 2
      Templates/BaseGame/game/tools/decalEditor/decalEditorGui.cs
  55. 1 1
      Templates/BaseGame/game/tools/editorClasses/scripts/projects/projectInternalInterface.ed.cs
  56. 3 3
      Templates/BaseGame/game/tools/forestEditor/forestEditorGui.cs
  57. 1 1
      Templates/BaseGame/game/tools/forestEditor/main.cs
  58. 3 3
      Templates/BaseGame/game/tools/gui/materialSelector.ed.gui
  59. 47 47
      Templates/BaseGame/game/tools/gui/messageBoxes/messageBox.ed.cs
  60. 2 2
      Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxOK.ed.gui
  61. 9 9
      Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxOKBuy.ed.gui
  62. 3 3
      Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxOKCancel.ed.gui
  63. 3 3
      Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxOKCancelDetailsDlg.ed.gui
  64. 4 4
      Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxYesNo.ed.gui
  65. 5 5
      Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxYesNoCancel.ed.gui
  66. 14 14
      Templates/BaseGame/game/tools/gui/saveChangesMBDlg.ed.gui
  67. 1 1
      Templates/BaseGame/game/tools/guiEditor/scripts/EditorChooseGUI.ed.cs
  68. 1 1
      Templates/BaseGame/game/tools/guiEditor/scripts/guiEditor.ed.cs
  69. 5 5
      Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorCanvas.ed.cs
  70. 5 5
      Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorContentList.ed.cs
  71. 1 1
      Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorNewGuiDialog.ed.cs
  72. 2 2
      Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorProfiles.ed.cs
  73. 12 12
      Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.cs
  74. 1 1
      Templates/BaseGame/game/tools/missionAreaEditor/main.cs
  75. 2 2
      Templates/BaseGame/game/tools/navEditor/CreateNewNavMeshDlg.gui
  76. 1 1
      Templates/BaseGame/game/tools/navEditor/main.cs
  77. 2 2
      Templates/BaseGame/game/tools/navEditor/navEditor.cs
  78. 7 7
      Templates/BaseGame/game/tools/particleEditor/particleEmitterEditor.ed.cs
  79. 6 6
      Templates/BaseGame/game/tools/particleEditor/particleParticleEditor.ed.cs
  80. 1 1
      Templates/BaseGame/game/tools/roadEditor/main.cs
  81. 1 1
      Templates/BaseGame/game/tools/roadEditor/roadEditorGui.cs
  82. 1 1
      Templates/BaseGame/game/tools/shapeEditor/main.cs
  83. 6 6
      Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.cs
  84. 3 3
      Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditorActions.ed.cs
  85. 1 1
      Templates/BaseGame/game/tools/worldEditor/gui/CameraSettingsTab.ed.gui
  86. 1 1
      Templates/BaseGame/game/tools/worldEditor/gui/guiTerrainExportGui.gui
  87. 1 1
      Templates/BaseGame/game/tools/worldEditor/gui/guiTerrainImportGui.gui
  88. 2 2
      Templates/BaseGame/game/tools/worldEditor/gui/objectBuilderGui.ed.gui
  89. 6 6
      Templates/BaseGame/game/tools/worldEditor/scripts/AddFMODProjectDlg.ed.cs
  90. 1 1
      Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.cs
  91. 1 1
      Templates/BaseGame/game/tools/worldEditor/scripts/ManageSFXParametersWindow.ed.cs
  92. 3 3
      Templates/BaseGame/game/tools/worldEditor/scripts/SelectObjectsWindow.ed.cs
  93. 1 1
      Templates/BaseGame/game/tools/worldEditor/scripts/cameraBookmarks.ed.cs
  94. 3 3
      Templates/BaseGame/game/tools/worldEditor/scripts/editors/terrainEditor.ed.cs
  95. 3 3
      Templates/BaseGame/game/tools/worldEditor/scripts/interfaces/terrainMaterialDlg.ed.cs
  96. 11 11
      Templates/BaseGame/game/tools/worldEditor/scripts/menuHandlers.ed.cs

+ 21 - 10
Engine/source/gui/controls/guiGameListMenuCtrl.cpp

@@ -278,7 +278,7 @@ void GuiGameListMenuCtrl::onRenderSliderOption(Row* row, Point2I currentOffset)
 
    bool isRowSelected = (getSelected() != NO_ROW) && (row == mRows[getSelected()]);
    bool isRowHighlighted = (getHighlighted() != NO_ROW) ? ((row == mRows[getHighlighted()]) && (row->mEnabled)) : false;
-   if (profileHasArrows)
+   /*if (profileHasArrows)
    {
       // render the left arrow
       bool arrowOnL = (isRowSelected || isRowHighlighted) && (row->mValue > row->mRange.x);
@@ -297,7 +297,7 @@ void GuiGameListMenuCtrl::onRenderSliderOption(Row* row, Point2I currentOffset)
 
       drawer->clearBitmapModulation();
       drawer->drawBitmapStretchSR(profile->mTextureObject, RectI(arrowOffset, arrowExtent), profile->getBitmapArrayRect((U32)iconIndex));
-   }
+   }*/
 
    //Draw the slider bar
    if (row->mEnabled)
@@ -324,8 +324,8 @@ void GuiGameListMenuCtrl::onRenderSliderOption(Row* row, Point2I currentOffset)
       ColorI barOutlineColor;
       if (isRowSelected)
       {
-         barColor = profile->mFillColorHL;
-         barOutlineColor = profile->mFillColor;
+         barColor = profile->mFillColor;
+         barOutlineColor = profile->mFillColorSEL;
       }
       else
       {
@@ -818,6 +818,8 @@ bool GuiGameListMenuCtrl::onInputEvent(const InputEventInfo& event)
       {
          bool isModifier = false;
 
+         bool state = event.action == SI_MAKE;
+
          switch (event.objInst)
          {
             case KEY_LCONTROL:
@@ -837,12 +839,12 @@ bool GuiGameListMenuCtrl::onInputEvent(const InputEventInfo& event)
             if (!ActionMap::getKeyString(event.objInst, keyString))
                return false;
 
-            onInputEvent_callback(deviceString, keyString, event.action);
+            onInputEvent_callback(deviceString, keyString, state);
          }
          else
          {
             const char* actionString = ActionMap::buildActionString(&event);
-            onInputEvent_callback(deviceString, actionString, event.action);
+            onInputEvent_callback(deviceString, actionString, state);
          }
       }
       else if (event.objType == SI_AXIS || event.objType == SI_INT || event.objType == SI_FLOAT)
@@ -1159,10 +1161,22 @@ void GuiGameListMenuCtrl::changeOption(Row* row, S32 delta)
    }
    row->mSelectedOption = newSelection;
 
+   if (row->mMode == GuiGameListMenuCtrl::Row::Slider)
+   {
+      row->mValue += row->mStepSize * delta;
+
+      row->mValue = mRound(row->mValue / row->mStepSize) * row->mStepSize;
+
+      if (row->mValue < row->mRange.x)
+         row->mValue = row->mRange.x;
+      if (row->mValue > row->mRange.y)
+         row->mValue = row->mRange.y;
+   }
+
    static StringTableEntry LEFT = StringTable->insert("LEFT", true);
    static StringTableEntry RIGHT = StringTable->insert("RIGHT", true);
 
-   if (row->mScriptCallback != NULL)
+   if (row->mScriptCallback != NULL && (row->mSelectedOption != NO_OPTION && row->mMode != GuiGameListMenuCtrl::Row::Slider))
    {
       setThisControl();
       StringTableEntry direction = NULL;
@@ -1712,9 +1726,6 @@ void GuiGameListMenuProfile::initPersistFields()
 
    removeField("modal");
    removeField("opaque");
-   removeField("fillColor");
-   removeField("fillColorHL");
-   removeField("fillColorNA");
    removeField("border");
    removeField("borderThickness");
    removeField("borderColor");

+ 4 - 7
Engine/source/gui/core/guiCanvas.cpp

@@ -1075,14 +1075,12 @@ bool GuiCanvas::processGamepadEvent(InputEventInfo &inputEvent)
 
          switch (inputEvent.objInst)
          {
-         case XI_LEFT_TRIGGER:
-         case XI_RIGHT_TRIGGER:
+         case SI_ZAXIS:
+         case SI_RZAXIS:
             return mFirstResponder->onGamepadTrigger(mLastEvent);
 
-         case SI_ZAXIS:
          case SI_YAXIS:
-         case XI_THUMBLY:
-         case XI_THUMBRY:
+         case SI_RYAXIS:
             if (!negative)
             {
                return mFirstResponder->onGamepadAxisDown(mLastEvent);
@@ -1093,8 +1091,7 @@ bool GuiCanvas::processGamepadEvent(InputEventInfo &inputEvent)
             }
 
          case SI_XAXIS:
-         case XI_THUMBLX:
-         case XI_THUMBRX:
+         case SI_RXAXIS:
          default:
             if (negative)
             {

+ 6 - 0
Engine/source/gui/game/guiFadeinBitmapCtrl.cpp

@@ -132,6 +132,12 @@ bool GuiFadeinBitmapCtrl::onKeyDown(const GuiEvent &)
    return true;
 }
 
+bool GuiFadeinBitmapCtrl::onGamepadButtonDown(const GuiEvent& event)
+{
+   click_callback();
+   return true;
+}
+
 //-----------------------------------------------------------------------------
 
 bool GuiFadeinBitmapCtrl::onWake()

+ 1 - 0
Engine/source/gui/game/guiFadeinBitmapCtrl.h

@@ -72,6 +72,7 @@ class GuiFadeinBitmapCtrl : public GuiBitmapCtrl
       virtual void onPreRender();
       virtual void onMouseDown(const GuiEvent &);
       virtual bool onKeyDown(const GuiEvent &);
+      virtual bool onGamepadButtonDown(const GuiEvent& event);
       virtual bool onWake();
       virtual void onRender(Point2I offset, const RectI &updateRect);
       

+ 16 - 7
Templates/BaseGame/game/data/ExampleModule/scripts/default.keybinds.cs

@@ -97,7 +97,16 @@ ExampleMoveMap.bind(keyboard, "ctrl h", hideHUDs);
 
 ExampleMoveMap.bind(keyboard, "alt p", doScreenShotHudless);
 
-ExampleMoveMap.bindCmd(keyboard, "escape", "", "disconnect();");
+function openPauseMenu(%val)
+{
+   if(%val && PauseMenu.isAwake() == false)
+   {
+      echo("PUSHING PAUSE MENU");
+      Canvas.pushDialog(PauseMenu);
+   }
+}
+
+ExampleMoveMap.bind(keyboard, "escape", openPauseMenu);
 
 //------------------------------------------------------------------------------
 // Movement Keys
@@ -119,21 +128,21 @@ ExampleMoveMap.bind( keyboard, space, jump );
 ExampleMoveMap.bind( mouse, xaxis, yaw );
 ExampleMoveMap.bind( mouse, yaxis, pitch );
 
-ExampleMoveMap.bind( gamepad, thumbrx, "D", "-0.23 0.23", gamepadYaw );
-ExampleMoveMap.bind( gamepad, thumbry, "D", "-0.23 0.23", gamepadPitch );
-ExampleMoveMap.bind( gamepad, thumblx, "D", "-0.23 0.23", gamePadMoveX );
-ExampleMoveMap.bind( gamepad, thumbly, "D", "-0.23 0.23", gamePadMoveY );
+ExampleMoveMap.bind( gamepad, rxaxis, "D", "-0.23 0.23", gamepadYaw );
+ExampleMoveMap.bind( gamepad, ryaxis, "D", "-0.23 0.23", gamepadPitch );
+ExampleMoveMap.bind( gamepad, xaxis, "D", "-0.23 0.23", gamePadMoveX );
+ExampleMoveMap.bind( gamepad, yaxis, "D", "-0.23 0.23", gamePadMoveY );
 
 ExampleMoveMap.bind( gamepad, btn_a, jump );
 ExampleMoveMap.bind( gamepad, btn_x, moveup );
 ExampleMoveMap.bind( gamepad, btn_y, movedown );
-ExampleMoveMap.bindCmd( gamepad, btn_back, "disconnect();", "" );
+ExampleMoveMap.bindCmd( gamepad, btn_start, "Canvas.pushDialog(PauseMenu);", "" );
 
 //------------------------------------------------------------------------------
 // Misc.
 //------------------------------------------------------------------------------
 GlobalActionMap.bind(keyboard, "tilde", toggleConsole);
 GlobalActionMap.bindCmd(keyboard, "alt k", "cls();","");
-GlobalActionMap.bindCmd(keyboard, "alt enter", "", "Canvas.attemptFullscreenToggle();");
+GlobalActionMap.bindCmd(keyboard, "alt enter", "", "Canvas.toggleFullscreen();");
 GlobalActionMap.bindCmd(keyboard, "F1", "", "contextHelp();");
 ExampleMoveMap.bindCmd(keyboard, "n", "toggleNetGraph();", "");

+ 4 - 0
Templates/BaseGame/game/data/ExampleModule/scripts/inputCommands.cs

@@ -147,6 +147,8 @@ function gamePadMoveX( %val )
 
 function gamePadMoveY( %val )
 {
+   %val *= -1;
+   
    if(%val > 0)
    {
       $mvForwardAction = %val * $movementSpeed;
@@ -183,6 +185,8 @@ function gamepadYaw(%val)
 
 function gamepadPitch(%val)
 {
+   %val *= -1;
+   
    %pitchAdj = getGamepadAdjustAmount(%val);
    if(ServerConnection.isControlObjectRotDampedCamera())
    {

+ 1 - 6
Templates/BaseGame/game/data/ui/UI.cs

@@ -36,8 +36,7 @@ function UI::initClient(%this)
    exec("./scripts/profiles.cs");
    
    //Now gui files
-   exec("./guis/guiGamepadButton.cs");
-   exec("./guis/guiGamepadButton.gui");
+   exec("./scripts/menuInputButtons.cs");
    
    exec("./guis/mainMenu.cs");
    exec("./guis/mainMenu.gui");
@@ -80,10 +79,6 @@ function UI::initClient(%this)
    exec("./scripts/help.cs");
    exec("./scripts/cursors.cs");
    exec("./scripts/utility.cs");
-   exec("./scripts/default.keybinds.cs");
-   
-   exec("./guis/menuGraphics.gui");
-   exec("./guis/menuGraphics.cs");
    
    loadStartup();
 }

+ 4 - 13
Templates/BaseGame/game/data/ui/guis/chooseLevelDlg.cs

@@ -139,23 +139,14 @@ function ChooseLevelDlg::onWake( %this )
 
       %preview.levelDesc = %desc;
    }*/
+   
+   ChooseLevelButtonHolder.setActive();
 }
 
 function ChooseLevelButtonHolder::onWake(%this)
 {
-   %this.refresh();
-}
-
-function ChooseLevelButtonHolder::refresh(%this)
-{
-   ChooseLevelButtonHolder.add(GamepadButtonsGui);
-   
-   GamepadButtonsGui.clearButtons();
-   
-   GamepadButtonsGui.setButton(2, "A", "Enter", "Start Level", "ChooseLevelDlg.beginLevel();");
-   GamepadButtonsGui.setButton(3, "B", "Esc", "Back", "ChooseLevelDlg.backOut();");
-   
-   GamepadButtonsGui.refreshButtons();
+   %this-->goButton.set("btn_a", "Return", "Start Level", "ChooseLevelDlg.beginLevel();");
+   %this-->backButton.set("btn_b", "Escape", "Back", "ChooseLevelDlg.backOut();");
 }
 
 function ChooseLevelDlg::onSleep( %this )

+ 107 - 5
Templates/BaseGame/game/data/ui/guis/chooseLevelDlg.gui

@@ -32,8 +32,28 @@
       canSave = "1";
       canSaveDynamicFields = "0";
 
+      new GuiBitmapBarCtrl() {
+         percent = "100";
+         vertical = "0";
+         flipClip = "0";
+         bitmap = "data/ui/images/panel.png";
+         color = "255 255 255 255";
+         position = "0 0";
+         extent = "927 40";
+         minExtent = "8 2";
+         horizSizing = "width";
+         vertSizing = "bottom";
+         profile = "GuiDefaultProfile";
+         visible = "1";
+         active = "1";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
       new GuiTextCtrl(LevelSelectTitle) {
-         text = "CHOOSE LEVEL";
+         text = "SINGLE PLAYER";
          maxLength = "1024";
          margin = "0 0 0 0";
          padding = "0 0 0 0";
@@ -55,6 +75,26 @@
          canSave = "1";
          canSaveDynamicFields = "0";
       };
+      new GuiBitmapBarCtrl() {
+         percent = "100";
+         vertical = "0";
+         flipClip = "0";
+         bitmap = "data/ui/images/panel_low.png";
+         color = "255 255 255 255";
+         position = "0 40";
+         extent = "927 618";
+         minExtent = "8 2";
+         horizSizing = "width";
+         vertSizing = "bottom";
+         profile = "GuiDefaultProfile";
+         visible = "1";
+         active = "1";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
       new GuiBitmapCtrl() {
          bitmap = "data/ui/images/no-preview";
          color = "255 255 255 255";
@@ -76,7 +116,7 @@
             Enabled = "1";
       };
       new GuiTextCtrl() {
-         text = "EmptyLevel";
+         text = "Example Level";
          maxLength = "255";
          margin = "0 0 0 0";
          padding = "0 0 0 0";
@@ -177,7 +217,7 @@
             debugRender = "0";
             callbackOnInputs = "1";
             position = "1 1";
-            extent = "450 580";
+            extent = "450 90";
             minExtent = "8 2";
             horizSizing = "right";
             vertSizing = "bottom";
@@ -194,8 +234,8 @@
       };
    };
    new GuiControl(ChooseLevelButtonHolder) {
-      position = "189 652";
-      extent = "646 130";
+      position = "189 711";
+      extent = "646 40";
       minExtent = "8 2";
       horizSizing = "center";
       vertSizing = "top";
@@ -205,8 +245,70 @@
       tooltipProfile = "GuiToolTipProfile";
       hovertime = "1000";
       isContainer = "1";
+      class = "MenuInputButtonContainer";
       canSave = "1";
       canSaveDynamicFields = "0";
+
+      new GuiIconButtonCtrl() {
+         buttonMargin = "4 4";
+         iconBitmap = "./";
+         iconLocation = "Left";
+         sizeIconToButton = "1";
+         makeIconSquare = "1";
+         textLocation = "Right";
+         textMargin = "4";
+         autoSize = "0";
+         text = "Go";
+         groupNum = "-1";
+         buttonType = "PushButton";
+         useMouseEvents = "0";
+         position = "363 0";
+         extent = "140 40";
+         minExtent = "8 2";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "GuiMenuButtonProfile";
+         visible = "1";
+         active = "1";
+         command = "MainMenuButtonList.activateRow();";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         internalName = "goButton";
+         class = "MenuInputButton";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
+      new GuiIconButtonCtrl() {
+         buttonMargin = "4 4";
+         iconBitmap = "./";
+         iconLocation = "Left";
+         sizeIconToButton = "1";
+         makeIconSquare = "1";
+         textLocation = "Right";
+         textMargin = "4";
+         autoSize = "0";
+         text = "Back";
+         groupNum = "-1";
+         buttonType = "PushButton";
+         useMouseEvents = "0";
+         position = "507 0";
+         extent = "140 40";
+         minExtent = "8 2";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "GuiMenuButtonProfile";
+         visible = "1";
+         active = "1";
+         command = "MainMenuButtonList.activateRow();";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         internalName = "backButton";
+         class = "MenuInputButton";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
    };
 };
 //--- OBJECT WRITE END ---

+ 0 - 319
Templates/BaseGame/game/data/ui/guis/guiGamepadButton.cs

@@ -1,319 +0,0 @@
-//------------------------------------------------------------------------------
-// global vars
-//------------------------------------------------------------------------------
-
-$BUTTON_A         =  0;
-$BUTTON_B         =  1;
-$BUTTON_X         =  2;
-$BUTTON_Y         =  3;
-$BUTTON_BACK      =  4;
-$BUTTON_START     =  5;
-$BUTTON_LTRIGGER  =  6;
-$BUTTON_RTRIGGER  =  7;
-$BUTTON_LSHOULDER =  8;
-$BUTTON_RSHOULDER =  9;
-$BUTTON_LSTICK    =  10;
-$BUTTON_RSTICK    =  11;
-
-//------------------------------------------------------------------------------
-// GamepadButtonsGui methods
-//------------------------------------------------------------------------------
-
-/// Callback when this control wakes up. All buttons are set to invisible and
-/// disabled.
-function GamepadButtonsGui::onWake(%this)
-{
-   GamepadButtonsGui.controllerName = "K&M";
-}
-
-function GamepadButtonsGui::initMenuButtons(%this)
-{
-   %buttonExt = %this.extent.x / 4 SPC %this.extent.y / 2;
-   
-   for(%i=0; %i < 9; %i++)
-   {
-      %btn = new GuiIconButtonCtrl()
-      {
-         iconLocation = "Left";
-         sizeIconToButton = true;
-         makeIconSquare = true;
-         textLocation = "Right";
-         extent = %buttonExt;
-         profile="GuiMenuButtonProfile";
-         gamepadButton = "";
-         keyboardButton = "";
-      };
-   
-      GamepadButtonsGui.addGuiControl(%btn); 
-   } 
-   
-   GamepadButtonsGui.refresh();
-}
-
-/// Sets the command and text for the specified button. If %text and %command
-/// are left empty, the button will be disabled and hidden.
-/// Note: This command is not executed when the A button is pressed. That
-/// command is executed directly from the GuiGameList___Ctrl. This command is
-/// for the graphical hint and to allow a mouse equivalent.
-///
-/// \param %button (constant) The button to set. See: $BUTTON_A, _B, _X, _Y
-/// \param %text (string) The text to display next to the A button graphic.
-/// \param %command (string) The command executed when the A button is pressed.
-function GamepadButtonsGui::setButton(%this, %buttonIdx, %gamepadButton, %keyboardButton, %text, %command, %gamepadOnly)
-{
-   if(%buttonIdx >= GamepadButtonsGui.getCount())
-      return;
-      
-   %btn = GamepadButtonsGui.getObject(%buttonIdx);
-   
-   %set = (! ((%text $= "") && (%command $= "")));
-   %btn.setText(%text);
-   %btn.setActive(%set);
-   %btn.setVisible(%set);
-   
-   %btn.gamepadButton = %gamepadButton;
-   %btn.keyboardButton = %keyboardButton;
-   
-   if(%gamepadOnly $= "")
-      %gamepadOnly = false;
-      
-   %btn.gamepadOnly = %gamepadOnly;
-
-   %btn.Command = %command;
-}
-
-function GamepadButtonsGui::checkGamepad(%this)
-{
-   %controllerName = SDLInputManager::JoystickNameForIndex(0);
-   
-   GamepadButtonsGui.controllerName = %controllerName;
-}
-   
-function GamepadButtonsGui::clearButtons(%this)
-{
-   for(%i=0; %i < GamepadButtonsGui.getCount(); %i++)
-   {
-      %btn = GamepadButtonsGui.getObject(%i);
-      
-      %btn.setBitmap("");
-      %btn.text = "";
-      %btn.command = "";
-   }
-}
-
-function GamepadButtonsGui::refreshButtons(%this)
-{
-   //Set up our basic buttons
-   for(%i=0; %i < GamepadButtonsGui.getCount(); %i++)
-   {
-      %btn = GamepadButtonsGui.getObject(%i);
-      
-      %set = (! ((%btn.text $= "") && (%btn.command $= "")));
-      
-      //Special-case of where we're in keyboard+mouse mode, but the menubutton is gamepad only mode, so we early out
-      if(%btn.gamepadOnly && GamepadButtonsGui.controllerName $= "K&M")
-         %set = false;
-         
-      %btn.setActive(%set);
-      %btn.setVisible(%set);
-      
-      if(!%btn.isActive())
-         continue;
-      
-      if(GamepadButtonsGui.controllerName !$= "K&M")
-      {
-         if(%btn.gamepadButton !$= "")
-         {
-            %path = "";
-            if(GamepadButtonsGui.controllerName $= "PS4 Controller")
-            { 
-               %path = "data/ui/images/inputs/PS4/PS4_";
-               
-               if(%btn.gamepadButton $= "A")
-                  %path = %path @ "Cross";
-               else if(%btn.gamepadButton $= "B")
-                  %path = %path @ "Circle";
-               else if(%btn.gamepadButton $= "X")
-                  %path = %path @ "Square";
-               else if(%btn.gamepadButton $= "Y")
-                  %path = %path @ "Triangle";
-               else if(%btn.gamepadButton $= "LB")
-                  %path = %path @ "L1";
-               else if(%btn.gamepadButton $= "LT")
-                  %path = %path @ "L2";
-               else if(%btn.gamepadButton $= "RB")
-                  %path = %path @ "R1";
-               else if(%btn.gamepadButton $= "RT")
-                  %path = %path @ "R2";
-               else      
-                  continue;
-            }
-            else if(GamepadButtonsGui.controllerName $= "Nintendo Switch Pro Controller")
-            {
-               %path = "data/ui/images/inputs/Switch/Switch_";
-               
-               if(%btn.gamepadButton $= "A")
-                  %path = %path @ "B";
-               else if(%btn.gamepadButton $= "B")
-                  %path = %path @ "A";
-               else if(%btn.gamepadButton $= "X")
-                  %path = %path @ "Y";
-               else if(%btn.gamepadButton $= "Y")
-                  %path = %path @ "X";
-               else if(%btn.gamepadButton $= "LB")
-                  %path = %path @ "LB";
-               else if(%btn.gamepadButton $= "LT")
-                  %path = %path @ "LT";
-               else if(%btn.gamepadButton $= "RB")
-                  %path = %path @ "RB";
-               else if(%btn.gamepadButton $= "RT")
-                  %path = %path @ "RT";
-               else      
-                  continue;
-            }
-            else if(GamepadButtonsGui.controllerName !$= "")
-            {
-               %path = "data/ui/images/inputs/Xbox/Xbox_";
-               
-               %path = %path @ %btn.gamepadButton;
-            }
-         } 
-      }
-      else
-      {
-         if(%btn.keyboardButton !$= "")
-         {
-            %path = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_" @ %btn.keyboardButton;
-         }
-      }
-      
-      %btn.setBitmap(%path);
-   }
-   
-   return true;
-}
-
-function GamepadButtonsGui::processInputs(%this, %device, %action)
-{
-   //check to see if our status has changed
-   %changed = false;
-   
-   %oldDevice = GamepadButtonsGui.controllerName;
-   
-   if(startsWith(%device, "Keyboard"))
-   {
-      if(GamepadButtonsGui.controllerName !$= %device)
-         %changed = true;
-         
-      GamepadButtonsGui.controllerName = "K&M";
-      Canvas.showCursor();
-   }
-   else if(startsWith(%device, "Mouse"))
-   {
-      if(startsWith(%action, "button"))
-      {
-         if(GamepadButtonsGui.controllerName !$= %device)
-            %changed = true;
-            
-         GamepadButtonsGui.controllerName = "K&M";
-         Canvas.showCursor();
-      }
-   }
-   else
-   {
-      if(GamepadButtonsGui.checkGamepad())
-      {
-         Canvas.hideCursor();
-      }
-      
-      if(GamepadButtonsGui.controllerName !$= %device)
-         %changed = true;
-   }
-   
-   if(%changed)
-      GamepadButtonsGui.refreshButtons();
-      
-   //Now process the input for the button accelerator, if applicable
-   //Set up our basic buttons
-   for(%i=0; %i < GamepadButtonsGui.getCount(); %i++)
-   {
-      %btn = GamepadButtonsGui.getObject(%i);
-      
-      if(!%btn.isActive())
-         continue;
-      
-      if(GamepadButtonsGui.controllerName !$= "K&M")
-      {
-         if(%action $= "btn_r")
-            %action = "RB";
-         else if(%action $= "btn_l")
-            %action = "LB";
-            
-         if(%btn.gamepadButton $= %action)
-         {
-            eval(%btn.command);
-         }
-      }
-      else
-      {
-         if(%action $= "return")
-            %action = "enter";
-         else if(%action $= "escape")
-            %action = "esc";
-            
-         if(%btn.keyboardButton $= %action)
-         {
-            eval(%btn.command);
-         }
-      }
-   }
-}
-
-function GamepadButtonsGui::processAxisEvent(%this, %device, %action, %axisVal)
-{
-   %changed = false;
-   
-   %oldDevice = GamepadButtonsGui.controllerName;
-   
-   if(startsWith(%device, "Mouse"))
-   {
-      if(startsWith(%action, "button"))
-      {
-         if(GamepadButtonsGui.controllerName !$= %device)
-            %changed = true;
-            
-         GamepadButtonsGui.controllerName = "K&M";
-         Canvas.showCursor();
-      }
-   }
-   else
-   {
-      if(GamepadButtonsGui.checkGamepad())
-      {
-         Canvas.hideCursor();
-      }
-      
-      if(GamepadButtonsGui.controllerName !$= %device)
-         %changed = true;
-   }
-   
-   if(%changed)
-      GamepadButtonsGui.refreshButtons();
-}
-//
-//
-function onSDLDeviceConnected(%sdlIndex, %deviceName, %deviceType)
-{
-   /*if(GamepadButtonsGui.checkGamepad())
-   {
-      GamepadButtonsGui.hidden = false;  
-   }*/
-}
-
-function onSDLDeviceDisconnected(%sdlIndex)
-{
-   /*if(!GamepadButtonsGui.checkGamepad())
-   {
-      GamepadButtonsGui.hidden = true;
-   }*/   
-}

+ 0 - 239
Templates/BaseGame/game/data/ui/guis/guiGamepadButton.gui

@@ -1,239 +0,0 @@
-//--- OBJECT WRITE BEGIN ---
-new GuiControl(GamepadButtonsGuiCtrl) {
-   position = "0 0";
-   extent = "646 130";
-   minExtent = "8 2";
-   horizSizing = "right";
-   vertSizing = "bottom";
-   profile = "GamepadDefaultProfile";
-   visible = "1";
-   active = "1";
-   tooltipProfile = "GuiToolTipProfile";
-   hovertime = "1000";
-   isContainer = "1";
-   canSave = "1";
-   canSaveDynamicFields = "1";
-   
-   new GuiDynamicCtrlArrayControl(GamepadButtonsGui) {
-      position = "0 0";
-      extent = "640 100";
-      minExtent = "8 2";
-      horizSizing = "right";
-      vertSizing = "bottom";
-      profile = "GamepadDefaultProfile";
-      visible = "1";
-      active = "1";
-      tooltipProfile = "GuiToolTipProfile";
-      hovertime = "1000";
-      isContainer = "1";
-      canSave = "1";
-      canSaveDynamicFields = "1";
-      colSize = "155";
-      rowSize = "45";
-      rowSpacing = 5;
-      colSpacing = 5;
-      frozen = true;
-
-      /*new GuiBitmapCtrl(ButtonBImg) {
-         canSaveDynamicFields = "0";
-         Enabled = "1";
-         isContainer = "0";
-         Profile = "GamepadDefaultProfile";
-         HorizSizing = "left";
-         VertSizing = "relative";
-         position = "416 16";
-         Extent = "32 32";
-         MinExtent = "8 2";
-         canSave = "1";
-         Visible = "1";
-         hovertime = "1000";
-         bitmap = "data/ui/images/Inputs/Xbox/Xbox_B";
-         wrap = "0";
-      };
-      new GuiTextCtrl(ButtonBLabel) {
-         canSaveDynamicFields = "0";
-         Enabled = "1";
-         isContainer = "0";
-         Profile = "GamepadButtonTextRight";
-         HorizSizing = "relative";
-         VertSizing = "relative";
-         position = "248 16";
-         Extent = "160 32";
-         MinExtent = "8 2";
-         canSave = "1";
-         Visible = "1";
-         hovertime = "1000";
-         text = "Button B Label";
-         maxLength = "1024";
-      };
-      new GuiButtonBaseCtrl(ButtonBButton) {
-         canSaveDynamicFields = "0";
-         Enabled = "1";
-         isContainer = "0";
-         Profile = "GamepadDefaultProfile";
-         HorizSizing = "relative";
-         VertSizing = "relative";
-         position = "248 16";
-         Extent = "200 32";
-         MinExtent = "8 2";
-         canSave = "1";
-         Visible = "1";
-         hovertime = "1000";
-         text = "Button";
-         groupNum = "-1";
-         buttonType = "PushButton";
-         useMouseEvents = "0";
-      };
-      new GuiBitmapCtrl(ButtonAImg) {
-         canSaveDynamicFields = "0";
-         Enabled = "1";
-         isContainer = "0";
-         Profile = "GamepadDefaultProfile";
-         HorizSizing = "left";
-         VertSizing = "relative";
-         position = "400 64";
-         Extent = "32 32";
-         MinExtent = "8 2";
-         canSave = "1";
-         Visible = "1";
-         hovertime = "1000";
-         bitmap = "data/ui/images/Inputs/Xbox/Xbox_A";
-         wrap = "0";
-      };
-      new GuiTextCtrl(ButtonALabel) {
-         canSaveDynamicFields = "0";
-         Enabled = "1";
-         isContainer = "0";
-         Profile = "GamepadButtonTextRight";
-         HorizSizing = "relative";
-         VertSizing = "relative";
-         position = "232 64";
-         Extent = "160 32";
-         MinExtent = "8 2";
-         canSave = "1";
-         Visible = "1";
-         hovertime = "1000";
-         text = "Button B Label";
-         maxLength = "1024";
-      };
-      new GuiButtonBaseCtrl(ButtonAButton) {
-         canSaveDynamicFields = "0";
-         Enabled = "1";
-         isContainer = "0";
-         Profile = "GamepadDefaultProfile";
-         HorizSizing = "relative";
-         VertSizing = "relative";
-         position = "232 64";
-         Extent = "200 32";
-         MinExtent = "8 2";
-         canSave = "1";
-         Visible = "1";
-         hovertime = "1000";
-         text = "Button";
-         groupNum = "-1";
-         buttonType = "PushButton";
-         useMouseEvents = "0";
-      };
-      new GuiBitmapCtrl(ButtonXImg) {
-         canSaveDynamicFields = "0";
-         Enabled = "1";
-         isContainer = "0";
-         Profile = "GamepadDefaultProfile";
-         HorizSizing = "right";
-         VertSizing = "relative";
-         position = "32 64";
-         Extent = "32 32";
-         MinExtent = "8 2";
-         canSave = "1";
-         Visible = "1";
-         hovertime = "1000";
-         bitmap = "data/ui/images/Inputs/Xbox/Xbox_X";
-         wrap = "0";
-      };
-      new GuiTextCtrl(ButtonXLabel) {
-         canSaveDynamicFields = "0";
-         Enabled = "1";
-         isContainer = "0";
-         Profile = "GamepadButtonTextLeft";
-         HorizSizing = "relative";
-         VertSizing = "relative";
-         position = "72 64";
-         Extent = "160 32";
-         MinExtent = "8 2";
-         canSave = "1";
-         Visible = "1";
-         hovertime = "1000";
-         text = "Button X Label";
-         maxLength = "1024";
-      };
-      new GuiButtonBaseCtrl(ButtonXButton) {
-         canSaveDynamicFields = "0";
-         Enabled = "1";
-         isContainer = "0";
-         Profile = "GamepadDefaultProfile";
-         HorizSizing = "relative";
-         VertSizing = "relative";
-         position = "32 64";
-         Extent = "200 32";
-         MinExtent = "8 2";
-         canSave = "1";
-         Visible = "1";
-         hovertime = "1000";
-         text = "Button";
-         groupNum = "-1";
-         buttonType = "PushButton";
-         useMouseEvents = "0";
-      };
-      new GuiBitmapCtrl(ButtonYImg) {
-         canSaveDynamicFields = "0";
-         Enabled = "1";
-         isContainer = "0";
-         Profile = "GamepadDefaultProfile";
-         HorizSizing = "right";
-         VertSizing = "relative";
-         position = "16 16";
-         Extent = "32 32";
-         MinExtent = "8 2";
-         canSave = "1";
-         Visible = "1";
-         hovertime = "1000";
-         bitmap = "data/ui/images/Inputs/Xbox/Xbox_Y";
-         wrap = "0";
-      };
-      new GuiTextCtrl(ButtonYLabel) {
-         canSaveDynamicFields = "0";
-         Enabled = "1";
-         isContainer = "0";
-         Profile = "GamepadButtonTextLeft";
-         HorizSizing = "relative";
-         VertSizing = "relative";
-         position = "55 16";
-         Extent = "164 32";
-         MinExtent = "8 2";
-         canSave = "1";
-         Visible = "1";
-         hovertime = "1000";
-         text = "Button Y Label";
-         maxLength = "1024";
-      };
-      new GuiButtonBaseCtrl(ButtonYButton) {
-         canSaveDynamicFields = "0";
-         Enabled = "1";
-         isContainer = "0";
-         Profile = "GamepadDefaultProfile";
-         HorizSizing = "relative";
-         VertSizing = "relative";
-         position = "16 16";
-         Extent = "208 32";
-         MinExtent = "8 2";
-         canSave = "1";
-         Visible = "1";
-         hovertime = "1000";
-         text = "Button";
-         groupNum = "-1";
-         buttonType = "PushButton";
-         useMouseEvents = "0";
-      };*/
-   };
-};
-//--- OBJECT WRITE END ---

+ 12 - 13
Templates/BaseGame/game/data/ui/guis/joinServerMenu.cs

@@ -4,26 +4,25 @@ function JoinServerMenu::onWake()
    // Double check the status. Tried setting this the control
    // inactive to start with, but that didn't seem to work.
    JoinServerJoinBtn.setActive(JS_serverList.rowCount() > 0);
+   
+   JoinServerButtonHolder.setActive();
+   
+   JoinServerMenuInputHandler.setFirstResponder();
 }   
 
 function JoinServerButtonHolder::onWake(%this)
 {
-   %this.refresh();
+   %this-->joinButton.set("btn_start", "Return", "Join", "JoinServerMenu.join();");
+   %this-->backButton.set("btn_b", "Escape", "Back", "JoinServerMenu.backOut();");
+   %this-->refreshButton.set("btn_y", "R", "Refresh", "JoinServerMenu.refresh();");
+   %this-->queryLANButton.set("btn_a", "Q", "Query LAN", "JoinServerMenu.queryLan();");
+   %this-->queryInternetButton.set("btn_x", "E", "Query Internet", "JoinServerMenu.query();");
 }
 
-function JoinServerButtonHolder::refresh(%this)
+function JoinServerMenuInputHandler::onInputEvent(%this, %device, %action, %state)
 {
-   JoinServerButtonHolder.add(GamepadButtonsGui);
-   
-   GamepadButtonsGui.clearButtons();
-   
-   GamepadButtonsGui.setButton(1, "A", "", "Query LAN", "JoinServerMenu.queryLan();");
-   GamepadButtonsGui.setButton(2, "X", "", "Query Internet", "JoinServerMenu.query();");
-   GamepadButtonsGui.setButton(3, "B", "", "Refresh", "JoinServerMenu.refresh();");
-   GamepadButtonsGui.setButton(6, "Start", "Enter", "Join", "JoinServerMenu.join();");
-   GamepadButtonsGui.setButton(7, "B", "Esc", "Back", "JoinServerMenu.backOut();");
-   
-   GamepadButtonsGui.refreshButtons();
+   if(%state)
+      $activeMenuButtonContainer.processInputs(%device, %action);
 }
 
 //----------------------------------------

+ 214 - 9
Templates/BaseGame/game/data/ui/guis/joinServerMenu.gui

@@ -13,9 +13,22 @@
    isContainer = "1";
    canSave = "1";
    canSaveDynamicFields = "1";
+      returnGui = "MainMenuGui";
+      
+   new GuiInputCtrl(JoinServerMenuInputHandler){
+      profile = "GuiInputCtrlProfile";
+      visible = "1";
+      active = "1";
+      position = "0 0";
+      extent = "1024 768";
+      minExtent = "8 2";
+      horizSizing = "width";
+      vertSizing = "height";
+      sendBreakEvents="1";
+   };
 
    new GuiControl(JoinServerWindow) {
-      position = "45 56";
+      position = "48 56";
       extent = "928 655";
       minExtent = "8 2";
       horizSizing = "center";
@@ -29,14 +42,16 @@
       canSave = "1";
       canSaveDynamicFields = "0";
 
-      new GuiBitmapCtrl() {
-         bitmap = "data/ui/images/hudfill.png";
+      new GuiBitmapBarCtrl() {
+         percent = "100";
+         vertical = "0";
+         flipClip = "0";
+         bitmap = "data/ui/images/panel.png";
          color = "255 255 255 255";
-         wrap = "0";
          position = "0 0";
-         extent = "928 655";
+         extent = "927 40";
          minExtent = "8 2";
-         horizSizing = "right";
+         horizSizing = "width";
          vertSizing = "bottom";
          profile = "GuiDefaultProfile";
          visible = "1";
@@ -70,6 +85,26 @@
          canSave = "1";
          canSaveDynamicFields = "0";
       };
+      new GuiBitmapBarCtrl() {
+         percent = "100";
+         vertical = "0";
+         flipClip = "0";
+         bitmap = "data/ui/images/panel_low.png";
+         color = "255 255 255 255";
+         position = "0 40";
+         extent = "927 618";
+         minExtent = "8 2";
+         horizSizing = "width";
+         vertSizing = "bottom";
+         profile = "GuiDefaultProfile";
+         visible = "1";
+         active = "1";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
       new GuiTextCtrl() {
          text = "Player Name:";
          maxLength = "255";
@@ -99,6 +134,7 @@
          sinkAllKeyEvents = "0";
          password = "0";
          passwordMask = "*";
+         text = "Visitor";
          maxLength = "255";
          margin = "0 0 0 0";
          padding = "0 0 0 0";
@@ -111,7 +147,7 @@
          minExtent = "8 8";
          horizSizing = "right";
          vertSizing = "bottom";
-         profile = "GuiTextEditProfile";
+         profile = "GuiMenuTextEditProfile";
          visible = "1";
          active = "1";
          variable = "$pref::Player::Name";
@@ -294,7 +330,7 @@
             clipColumnText = "0";
             rowHeightPadding = "2";
             position = "1 1";
-            extent = "765 8";
+            extent = "888 8";
             minExtent = "8 8";
             horizSizing = "right";
             vertSizing = "bottom";
@@ -498,7 +534,7 @@
          canSaveDynamicFields = "0";
       };
    };
-   new GuiControl(JoinServerButtonHolder) {
+   new GuiControl() {
       position = "189 652";
       extent = "646 130";
       minExtent = "8 2";
@@ -513,5 +549,174 @@
       canSave = "1";
       canSaveDynamicFields = "0";
    };
+   new GuiControl(JoinServerButtonHolder) {
+      position = "109 711";
+      extent = "791 40";
+      minExtent = "8 2";
+      horizSizing = "center";
+      vertSizing = "top";
+      profile = "GuiDefaultProfile";
+      visible = "1";
+      active = "1";
+      tooltipProfile = "GuiToolTipProfile";
+      hovertime = "1000";
+      isContainer = "1";
+      class = "MenuInputButtonContainer";
+      canSave = "1";
+      canSaveDynamicFields = "0";
+
+      new GuiIconButtonCtrl() {
+         buttonMargin = "4 4";
+         iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
+         iconLocation = "Left";
+         sizeIconToButton = "1";
+         makeIconSquare = "1";
+         textLocation = "Right";
+         textMargin = "4";
+         autoSize = "0";
+         text = "Join";
+         groupNum = "-1";
+         buttonType = "PushButton";
+         useMouseEvents = "0";
+         position = "507 0";
+         extent = "140 40";
+         minExtent = "8 2";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "GuiMenuButtonProfile";
+         visible = "1";
+         active = "1";
+         command = "OptionsMenu.apply();";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         internalName = "joinButton";
+         class = "MenuInputButton";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
+      new GuiIconButtonCtrl() {
+         buttonMargin = "4 4";
+         iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Esc";
+         iconLocation = "Left";
+         sizeIconToButton = "1";
+         makeIconSquare = "1";
+         textLocation = "Right";
+         textMargin = "4";
+         autoSize = "0";
+         text = "Back";
+         groupNum = "-1";
+         buttonType = "PushButton";
+         useMouseEvents = "0";
+         position = "651 0";
+         extent = "140 40";
+         minExtent = "8 2";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "GuiMenuButtonProfile";
+         visible = "1";
+         active = "1";
+         command = "OptionsMenu.backOut();";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         internalName = "backButton";
+         class = "MenuInputButton";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
+      new GuiIconButtonCtrl() {
+         buttonMargin = "4 4";
+         iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
+         iconLocation = "Left";
+         sizeIconToButton = "1";
+         makeIconSquare = "1";
+         textLocation = "Right";
+         textMargin = "4";
+         autoSize = "0";
+         text = "Prev Tab";
+         groupNum = "-1";
+         buttonType = "PushButton";
+         useMouseEvents = "0";
+         position = "0 0";
+         extent = "140 40";
+         minExtent = "8 2";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "GuiMenuButtonProfile";
+         visible = "0";
+         active = "0";
+         command = "OptionsMenu.prevTab();";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         internalName = "queryLANButton";
+         class = "MenuInputButton";
+         hidden = "1";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
+      new GuiIconButtonCtrl() {
+         buttonMargin = "4 4";
+         iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Esc";
+         iconLocation = "Left";
+         sizeIconToButton = "1";
+         makeIconSquare = "1";
+         textLocation = "Right";
+         textMargin = "4";
+         autoSize = "0";
+         text = "Next Tab";
+         groupNum = "-1";
+         buttonType = "PushButton";
+         useMouseEvents = "0";
+         position = "144 0";
+         extent = "140 40";
+         minExtent = "8 2";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "GuiMenuButtonProfile";
+         visible = "0";
+         active = "0";
+         command = "OptionsMenu.nextTab();";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         internalName = "queryInternetButton";
+         class = "MenuInputButton";
+         hidden = "1";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
+      new GuiIconButtonCtrl() {
+         buttonMargin = "4 4";
+         iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_R";
+         iconLocation = "Left";
+         sizeIconToButton = "1";
+         makeIconSquare = "1";
+         textLocation = "Right";
+         textMargin = "4";
+         autoSize = "0";
+         text = "Reset";
+         groupNum = "-1";
+         buttonType = "PushButton";
+         useMouseEvents = "0";
+         position = "325 0";
+         extent = "140 40";
+         minExtent = "8 2";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "GuiMenuButtonProfile";
+         visible = "1";
+         active = "1";
+         command = "OptionsMenu.resetToDefaults();";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         internalName = "refreshButton";
+         class = "MenuInputButton";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
+   };
 };
 //--- OBJECT WRITE END ---

+ 22 - 3
Templates/BaseGame/game/data/ui/guis/loadingGui.gui

@@ -4,7 +4,7 @@
    useVariable = "0";
    tile = "0";
    position = "0 0";
-   extent = "1600 838";
+   extent = "1024 768";
    minExtent = "8 8";
    horizSizing = "width";
    vertSizing = "height";
@@ -19,7 +19,7 @@
       Enabled = "1";
 
    new GuiControl() {
-      position = "391 429";
+      position = "263 301";
       extent = "497 166";
       minExtent = "8 8";
       horizSizing = "center";
@@ -35,8 +35,27 @@
       canSave = "1";
       canSaveDynamicFields = "0";
 
+      new GuiBitmapCtrl() {
+         bitmap = "data/ui/images/panel.png";
+         color = "255 255 255 255";
+         wrap = "0";
+         position = "0 0";
+         extent = "497 166";
+         minExtent = "8 2";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "GuiDefaultProfile";
+         visible = "1";
+         active = "1";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
       new GuiBitmapCtrl(LoadingLogo) {
-         bitmap = "data/ui/images/Torque-3D-logo.png";
+         bitmap = "data/ui/images/Torque-3D-logo_alt.png";
+         color = "255 255 255 255";
          wrap = "0";
          position = "27 6";
          extent = "443 139";

+ 7 - 29
Templates/BaseGame/game/data/ui/guis/mainMenu.cs

@@ -1,32 +1,22 @@
 function MainMenuGui::onAdd(%this)
 {
-   GamepadButtonsGui.initMenuButtons();
+   $activeControllerName = "K&M"; //default input type
 }
 
 function MainMenuGui::onWake(%this)
 {
    MainMenuButtonList.hidden = false; 
+   MainMenuButtonHolder.setActive();
 }
 
 function MainMenuGui::onSleep(%this)
 {
+   MainMenuButtonHolder.hidden = true;
 }
 
 function MainMenuButtonHolder::onWake(%this)
 {
-   %this.refresh();
-}
-
-function MainMenuButtonHolder::refresh(%this)
-{
-   %this.add(GamepadButtonsGui);
-   
-   GamepadButtonsGui.clearButtons();
-   
-   //GamepadButtonsGui.setButton(2, "A", "Select", "Go", "echo(\"FART\");");
-   //GamepadButtonsGui.setButton(3, "B", "Esc", "Back", "");
-   
-   GamepadButtonsGui.refreshButtons();
+   %this-->goButton.set("btn_a", "Return", "Go", "MainMenuButtonList.activateRow();");
 }
 
 function MainMenuButtonList::onAdd(%this)
@@ -40,24 +30,13 @@ function MainMenuButtonList::onAdd(%this)
    MainMenuButtonList.addRow("Exit Game", "quit", 8, -15);
 }
 
-function UIMenuButtonList::onInputEvent(%this, %device, %action, %state)
-{
-   if(%state)
-      GamepadButtonsGui.processInputs(%device, %action);
-}
-
-function UIMenuButtonList::onAxisEvent(%this, %device, %action, %axisVal)
-{
-   GamepadButtonsGui.processAxisEvent(%device, %action);
-}
-
 function openSinglePlayerMenu()
 {
    $pref::HostMultiPlayer=false;
    Canvas.pushDialog(ChooseLevelDlg);
    ChooseLevelDlg.returnGui = MainMenuGui; 
    MainMenuButtonList.hidden = true; 
-   MainMenuAppLogo.setBitmap("data/ui/images/Torque-3D-logo");
+   MainMenuButtonHolder.hidden = true;
 }
 
 function openMultiPlayerMenu()
@@ -66,7 +45,6 @@ function openMultiPlayerMenu()
    Canvas.pushDialog(ChooseLevelDlg);
    ChooseLevelDlg.returnGui = MainMenuGui; 
    MainMenuButtonList.hidden = true; 
-   MainMenuAppLogo.setBitmap("data/ui/images/Torque-3D-logo");
 }
 
 function openJoinServerMenu()
@@ -81,7 +59,6 @@ function openOptionsMenu()
    Canvas.pushDialog(OptionsMenu);
    OptionsMenu.returnGui = MainMenuGui; 
    MainMenuButtonList.hidden = true; 
-   MainMenuAppLogo.setBitmap("data/ui/images/Torque-3D-logo");
 }
 
 function openWorldEditorBtn()
@@ -97,5 +74,6 @@ function openGUIEditorBtn()
 function MainMenuGui::onReturnTo(%this)
 {
    MainMenuButtonList.hidden = false;
-   MainMenuAppLogo.setBitmap("data/ui/images/Torque-3D-logo-shortcut");
+   MainMenuButtonList.setFirstResponder();
+   MainMenuButtonHolder.setActive();
 }

+ 39 - 10
Templates/BaseGame/game/data/ui/guis/mainMenu.gui

@@ -21,17 +21,15 @@ exec( "tools/gui/profiles.ed.cs" );
       Enabled = "1";
       isDecoy = "0";
       navigationIndex = "-1";
-
-   new GuiBitmapButtonCtrl(MainMenuAppLogo) {
-      bitmap = "data/ui/images/Torque-3D-logo";
+      
+   new GuiBitmapCtrl(MainMenuAppLogo) {
+      bitmap = "data/ui/images/Torque-3D-logo_alt.png";
       bitmapMode = "Stretched";
       autoFitExtents = "0";
       useModifiers = "0";
       useStates = "1";
       masked = "0";
       groupNum = "-1";
-      buttonType = "PushButton";
-      useMouseEvents = "0";
       position = "550 30";
       extent = "443 139";
       minExtent = "8 2";
@@ -40,7 +38,6 @@ exec( "tools/gui/profiles.ed.cs" );
       profile = "GuiDefaultProfile";
       visible = "1";
       active = "1";
-      command = "gotoWebPage(\"forums.torque3d.org\");";
       tooltipProfile = "GuiToolTipProfile";
       hovertime = "1000";
       isContainer = "0";
@@ -48,10 +45,9 @@ exec( "tools/gui/profiles.ed.cs" );
       canSaveDynamicFields = "1";
          navigationIndex = "-1";
    };
+
    new GuiGameListMenuCtrl(MainMenuButtonList) {
-      class = "UIMenuButtonList";
       debugRender = "0";
-      callbackOnA = "MainMenuButtonList.activateRow();";
       callbackOnInputs = "1";
       position = "292 103";
       extent = "439 561";
@@ -64,12 +60,13 @@ exec( "tools/gui/profiles.ed.cs" );
       tooltipProfile = "GuiToolTipProfile";
       hovertime = "1000";
       isContainer = "0";
+      class = "UIMenuButtonList";
       canSave = "1";
       canSaveDynamicFields = "0";
    };
    new GuiControl(MainMenuButtonHolder) {
-      position = "190 652";
-      extent = "646 130";
+      position = "189 711";
+      extent = "646 40";
       minExtent = "8 2";
       horizSizing = "center";
       vertSizing = "top";
@@ -79,8 +76,40 @@ exec( "tools/gui/profiles.ed.cs" );
       tooltipProfile = "GuiToolTipProfile";
       hovertime = "1000";
       isContainer = "1";
+      class = "MenuInputButtonContainer";
       canSave = "1";
       canSaveDynamicFields = "0";
+
+      new GuiIconButtonCtrl() {
+         buttonMargin = "4 4";
+         iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
+         iconLocation = "Left";
+         sizeIconToButton = "1";
+         makeIconSquare = "1";
+         textLocation = "Right";
+         textMargin = "4";
+         autoSize = "0";
+         text = "Go";
+         groupNum = "-1";
+         buttonType = "PushButton";
+         useMouseEvents = "0";
+         position = "507 0";
+         extent = "140 40";
+         minExtent = "8 2";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "GuiMenuButtonProfile";
+         visible = "1";
+         active = "1";
+         command = "MainMenuButtonList.activateRow();";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         internalName = "goButton";
+         class = "MenuInputButton";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
    };
 };
 //--- OBJECT WRITE END ---

+ 248 - 10
Templates/BaseGame/game/data/ui/guis/messageBoxDlg.gui

@@ -30,15 +30,17 @@
       canSave = "1";
       canSaveDynamicFields = "0";
 
-      new GuiBitmapCtrl() {
-         bitmap = "data/ui/images/hudfill.png";
+      new GuiBitmapBarCtrl() {
+         percent = "100";
+         vertical = "0";
+         flipClip = "0";
+         bitmap = "data/ui/images/panel.png";
          color = "255 255 255 255";
-         wrap = "0";
          position = "0 0";
-         extent = "1156 704";
+         extent = "641 40";
          minExtent = "8 2";
          horizSizing = "width";
-         vertSizing = "height";
+         vertSizing = "bottom";
          profile = "GuiDefaultProfile";
          visible = "1";
          active = "1";
@@ -57,7 +59,7 @@
          anchorBottom = "0";
          anchorLeft = "1";
          anchorRight = "0";
-         position = "32 10";
+         position = "32 7";
          extent = "577 28";
          minExtent = "8 2";
          horizSizing = "right";
@@ -71,13 +73,33 @@
          canSave = "1";
          canSaveDynamicFields = "0";
       };
+      new GuiBitmapBarCtrl() {
+         percent = "100";
+         vertical = "0";
+         flipClip = "0";
+         bitmap = "data/ui/images/panel_low.png";
+         color = "255 255 255 255";
+         position = "0 40";
+         extent = "641 341";
+         minExtent = "8 2";
+         horizSizing = "width";
+         vertSizing = "bottom";
+         profile = "GuiDefaultProfile";
+         visible = "1";
+         active = "1";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
       new GuiMLTextCtrl(MessageBoxText) {
          lineSpacing = "2";
          allowColorChars = "0";
          maxChars = "-1";
          useURLMouseCursor = "0";
          position = "81 83";
-         extent = "481 14";
+         extent = "481 19";
          minExtent = "8 8";
          horizSizing = "center";
          vertSizing = "center";
@@ -90,9 +112,9 @@
          canSave = "1";
          canSaveDynamicFields = "0";
       };
-      new GuiControl(MessageBoxButtonHolder) {
-         position = "0 237";
-         extent = "641 130";
+      new GuiControl(MessageBoxOKButtonHolder) {
+         position = "0 285";
+         extent = "642 40";
          minExtent = "8 2";
          horizSizing = "center";
          vertSizing = "top";
@@ -102,8 +124,224 @@
          tooltipProfile = "GuiToolTipProfile";
          hovertime = "1000";
          isContainer = "1";
+         class = "MenuInputButtonContainer";
          canSave = "1";
          canSaveDynamicFields = "0";
+
+         new GuiIconButtonCtrl() {
+            buttonMargin = "4 4";
+            iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
+            iconLocation = "Left";
+            sizeIconToButton = "1";
+            makeIconSquare = "1";
+            textLocation = "Right";
+            textMargin = "4";
+            autoSize = "0";
+            text = "Go";
+            groupNum = "-1";
+            buttonType = "PushButton";
+            useMouseEvents = "0";
+            position = "251 0";
+            extent = "140 40";
+            minExtent = "8 2";
+            horizSizing = "right";
+            vertSizing = "bottom";
+            profile = "GuiMenuButtonProfile";
+            visible = "1";
+            active = "1";
+            command = "MainMenuButtonList.activateRow();";
+            tooltipProfile = "GuiToolTipProfile";
+            hovertime = "1000";
+            isContainer = "0";
+            internalName = "OKButton";
+            class = "MenuInputButton";
+            canSave = "1";
+            canSaveDynamicFields = "0";
+         };
+      };
+      new GuiControl(MessageBoxOCButtonHolder) {
+         position = "0 285";
+         extent = "642 40";
+         minExtent = "8 2";
+         horizSizing = "center";
+         vertSizing = "top";
+         profile = "GuiDefaultProfile";
+         visible = "1";
+         active = "1";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "1";
+         class = "MenuInputButtonContainer";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+
+         new GuiIconButtonCtrl() {
+            buttonMargin = "4 4";
+            iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
+            iconLocation = "Left";
+            sizeIconToButton = "1";
+            makeIconSquare = "1";
+            textLocation = "Right";
+            textMargin = "4";
+            autoSize = "0";
+            text = "Go";
+            groupNum = "-1";
+            buttonType = "PushButton";
+            useMouseEvents = "0";
+            position = "171 0";
+            extent = "140 40";
+            minExtent = "8 2";
+            horizSizing = "right";
+            vertSizing = "bottom";
+            profile = "GuiMenuButtonProfile";
+            visible = "1";
+            active = "1";
+            command = "MainMenuButtonList.activateRow();";
+            tooltipProfile = "GuiToolTipProfile";
+            hovertime = "1000";
+            isContainer = "0";
+            internalName = "OKButton";
+            class = "MenuInputButton";
+            canSave = "1";
+            canSaveDynamicFields = "0";
+         };
+         new GuiIconButtonCtrl() {
+            buttonMargin = "4 4";
+            iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
+            iconLocation = "Left";
+            sizeIconToButton = "1";
+            makeIconSquare = "1";
+            textLocation = "Right";
+            textMargin = "4";
+            autoSize = "0";
+            text = "Go";
+            groupNum = "-1";
+            buttonType = "PushButton";
+            useMouseEvents = "0";
+            position = "323 0";
+            extent = "140 40";
+            minExtent = "8 2";
+            horizSizing = "right";
+            vertSizing = "bottom";
+            profile = "GuiMenuButtonProfile";
+            visible = "1";
+            active = "1";
+            command = "MainMenuButtonList.activateRow();";
+            tooltipProfile = "GuiToolTipProfile";
+            hovertime = "1000";
+            isContainer = "0";
+            internalName = "CancelButton";
+            class = "MenuInputButton";
+            canSave = "1";
+            canSaveDynamicFields = "0";
+         };
+      };
+      new GuiControl(MessageBoxYNCButtonHolder) {
+         position = "0 285";
+         extent = "642 40";
+         minExtent = "8 2";
+         horizSizing = "center";
+         vertSizing = "top";
+         profile = "GuiDefaultProfile";
+         visible = "1";
+         active = "1";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "1";
+         class = "MenuInputButtonContainer";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+
+         new GuiIconButtonCtrl() {
+            buttonMargin = "4 4";
+            iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
+            iconLocation = "Left";
+            sizeIconToButton = "1";
+            makeIconSquare = "1";
+            textLocation = "Right";
+            textMargin = "4";
+            autoSize = "0";
+            text = "Go";
+            groupNum = "-1";
+            buttonType = "PushButton";
+            useMouseEvents = "0";
+            position = "99 0";
+            extent = "140 40";
+            minExtent = "8 2";
+            horizSizing = "right";
+            vertSizing = "bottom";
+            profile = "GuiMenuButtonProfile";
+            visible = "1";
+            active = "1";
+            command = "MainMenuButtonList.activateRow();";
+            tooltipProfile = "GuiToolTipProfile";
+            hovertime = "1000";
+            isContainer = "0";
+            internalName = "yesButton";
+            class = "MenuInputButton";
+            canSave = "1";
+            canSaveDynamicFields = "0";
+         };
+         new GuiIconButtonCtrl() {
+            buttonMargin = "4 4";
+            iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
+            iconLocation = "Left";
+            sizeIconToButton = "1";
+            makeIconSquare = "1";
+            textLocation = "Right";
+            textMargin = "4";
+            autoSize = "0";
+            text = "Go";
+            groupNum = "-1";
+            buttonType = "PushButton";
+            useMouseEvents = "0";
+            position = "251 0";
+            extent = "140 40";
+            minExtent = "8 2";
+            horizSizing = "right";
+            vertSizing = "bottom";
+            profile = "GuiMenuButtonProfile";
+            visible = "1";
+            active = "1";
+            command = "MainMenuButtonList.activateRow();";
+            tooltipProfile = "GuiToolTipProfile";
+            hovertime = "1000";
+            isContainer = "0";
+            internalName = "noButton";
+            class = "MenuInputButton";
+            canSave = "1";
+            canSaveDynamicFields = "0";
+         };
+         new GuiIconButtonCtrl() {
+            buttonMargin = "4 4";
+            iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
+            iconLocation = "Left";
+            sizeIconToButton = "1";
+            makeIconSquare = "1";
+            textLocation = "Right";
+            textMargin = "4";
+            autoSize = "0";
+            text = "Go";
+            groupNum = "-1";
+            buttonType = "PushButton";
+            useMouseEvents = "0";
+            position = "403 0";
+            extent = "140 40";
+            minExtent = "8 2";
+            horizSizing = "right";
+            vertSizing = "bottom";
+            profile = "GuiMenuButtonProfile";
+            visible = "1";
+            active = "1";
+            command = "MainMenuButtonList.activateRow();";
+            tooltipProfile = "GuiToolTipProfile";
+            hovertime = "1000";
+            isContainer = "0";
+            internalName = "CancelButton";
+            class = "MenuInputButton";
+            canSave = "1";
+            canSaveDynamicFields = "0";
+         };
       };
    };
 };

+ 15 - 22
Templates/BaseGame/game/data/ui/guis/optionsMenu.cs

@@ -57,26 +57,17 @@ function OptionsMenu::onWake(%this)
    %this.pageTabIndex = 0;
    %tab = %this.getTab();
    %tab.performClick();
+   
+   OptionsButtonHolder.setActive();
 }
 
 function OptionsButtonHolder::onWake(%this)
 {
-   %this.refresh();
-}
-
-function OptionsButtonHolder::refresh(%this)
-{
-   OptionsButtonHolder.add(GamepadButtonsGui);
-   
-   GamepadButtonsGui.clearButtons();
-   
-   GamepadButtonsGui.setButton(0, "LB", "", "Prev Tab", "OptionsMenu.prevTab();", true);
-   GamepadButtonsGui.setButton(1, "RB", "", "Next Tab", "OptionsMenu.nextTab();", true);
-   GamepadButtonsGui.setButton(2, "Start", "Enter", "Apply", "OptionsMenu.apply();");
-   GamepadButtonsGui.setButton(3, "B", "Esc", "Back", "OptionsMenu.backOut();");
-   GamepadButtonsGui.setButton(7, "Back", "R", "Reset", "OptionsMenu.resetToDefaults();");
-   
-   GamepadButtonsGui.refreshButtons();
+   %this-->prevTabButton.set("btn_l", "", "Prev Tab", "OptionsMenu.prevTab();", true);
+   %this-->nextTabButton.set("btn_r", "", "Next Tab", "OptionsMenu.nextTab();", true);
+   %this-->resetButton.set("btn_back", "R", "Reset", "OptionsMenu.resetToDefaults();");
+   %this-->applyButton.set("btn_start", "Return", "Apply", "OptionsMenu.apply();");
+   %this-->backButton.set("btn_b", "Escape", "Back", "OptionsMenu.backOut();");
 }
 
 function OptionsMenu::apply(%this)
@@ -224,18 +215,19 @@ function OptionsMenu::populateDisplaySettingsList(%this)
 
 function OptionsMenu::applyDisplaySettings(%this)
 {
-   %newAdapter    = GraphicsMenuDriver.getText();
-	%numAdapters   = GFXInit::getAdapterCount();
+   //%newAdapter    = GraphicsMenuDriver.getText();
+	//%numAdapters   = GFXInit::getAdapterCount();
 	%newDevice     = OptionsMenuSettingsList.getCurrentOption(0);
 							
-	for( %i = 0; %i < %numAdapters; %i ++ )
+	/*for( %i = 0; %i < %numAdapters; %i ++ )
 	{
-	   if( GFXInit::getAdapterName( %i ) $= %newAdapter )
+	   %targetAdapter = GFXInit::getAdapterName( %i );
+	   if( GFXInit::getAdapterName( %i ) $= %newDevice )
 	   {
 	      %newDevice = GFXInit::getAdapterType( %i );
 	      break;
 	   }
-	}
+	}*/
 	   
    // Change the device.
    if ( %newDevice !$= $pref::Video::displayDevice )
@@ -267,6 +259,7 @@ function OptionsMenu::populateGraphicsSettingsList(%this)
    %onOffList = "Off\tOn";
    %highMedLow = "Low\tMedium\tHigh";
    %anisoFilter = "Off\t4\t8\t16";
+   %aaFilter = "Off\t1\t2\t4";
    OptionsMenuSettingsList.addOptionRow("Shadow Quality", getQualityLevels(ShadowQualityList), false, "", -1, -30, true, "Shadow revolution quality", getCurrentQualityLevel(ShadowQualityList));
    OptionsMenuSettingsList.addOptionRow("Soft Shadow Quality", getQualityLevels(SoftShadowList), false, "", -1, -30, true, "Amount of softening applied to shadowmaps", getCurrentQualityLevel(SoftShadowList));
    OptionsMenuSettingsList.addOptionRow("Mesh Quality", getQualityLevels(MeshQualityGroup), false, "", -1, -30, true, "Fidelity of rendering of mesh objects", getCurrentQualityLevel(MeshQualityGroup));
@@ -276,7 +269,7 @@ function OptionsMenu::populateGraphicsSettingsList(%this)
    OptionsMenuSettingsList.addOptionRow("Ground Cover Density", getQualityLevels(GroundCoverDensityGroup), false, "", -1, -30, true, "Density of ground cover items, such as grass", getCurrentQualityLevel(GroundCoverDensityGroup));
    OptionsMenuSettingsList.addOptionRow("Shader Quality", getQualityLevels(ShaderQualityGroup), false, "", -1, -30, true, "Dictates the overall shader quality level, adjusting what features are enabled.", getCurrentQualityLevel(ShaderQualityGroup));
    OptionsMenuSettingsList.addOptionRow("Anisotropic Filtering", %anisoFilter, false, "", -1, -30, true, "Amount of Anisotropic Filtering on textures, which dictates their sharpness at a distance", $pref::Video::defaultAnisotropy);
-   OptionsMenuSettingsList.addOptionRow("Anti-Aliasing", "4\t2\t1\tOff", false, "", -1, -30, true, "Amount of Post-Processing Anti-Aliasing applied to rendering", $pref::Video::AA);
+   OptionsMenuSettingsList.addOptionRow("Anti-Aliasing", %aaFilter, false, "", -1, -30, true, "Amount of Post-Processing Anti-Aliasing applied to rendering", $pref::Video::AA);
    OptionsMenuSettingsList.addOptionRow("Parallax", %onOffList, false, "", -1, -30, true, "Whether the surface parallax shader effect is enabled", convertBoolToOnOff(!$pref::Video::disableParallaxMapping));
    OptionsMenuSettingsList.addOptionRow("Water Reflections", %onOffList, false, "", -1, -30, true, "Whether water reflections are enabled", convertBoolToOnOff(!$pref::Water::disableTrueReflections));
    OptionsMenuSettingsList.addOptionRow("SSAO", %onOffList, false, "", -1, -30, true, "Whether Screen-Space Ambient Occlusion is enabled", convertBoolToOnOff($pref::PostFX::EnableSSAO));

+ 205 - 23
Templates/BaseGame/game/data/ui/guis/optionsMenu.gui

@@ -13,6 +13,8 @@
    isContainer = "1";
    canSave = "1";
    canSaveDynamicFields = "1";
+      pageTabIndex = "0";
+      returnGui = "MainMenuGui";
       tamlReader = "20088";
       tile = "0";
       useVariable = "0";
@@ -32,6 +34,26 @@
       canSave = "1";
       canSaveDynamicFields = "0";
 
+      new GuiBitmapBarCtrl() {
+         percent = "100";
+         vertical = "0";
+         flipClip = "0";
+         bitmap = "data/ui/images/panel.png";
+         color = "255 255 255 255";
+         position = "0 0";
+         extent = "927 40";
+         minExtent = "8 2";
+         horizSizing = "width";
+         vertSizing = "bottom";
+         profile = "GuiDefaultProfile";
+         visible = "1";
+         active = "1";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
       new GuiTextCtrl() {
          text = "OPTIONS";
          maxLength = "1024";
@@ -41,7 +63,7 @@
          anchorBottom = "0";
          anchorLeft = "1";
          anchorRight = "0";
-         position = "22 10";
+         position = "22 7";
          extent = "120 28";
          minExtent = "8 2";
          horizSizing = "right";
@@ -59,20 +81,19 @@
          percent = "100";
          vertical = "0";
          flipClip = "0";
-         bitmap = "data/ui/images/hudfill.png";
+         bitmap = "data/ui/images/panel_low.png";
          color = "255 255 255 255";
          position = "0 40";
-         extent = "846 618";
+         extent = "927 618";
          minExtent = "8 2";
-         horizSizing = "right";
+         horizSizing = "width";
          vertSizing = "bottom";
          profile = "GuiDefaultProfile";
-         visible = "0";
+         visible = "1";
          active = "1";
          tooltipProfile = "GuiToolTipProfile";
          hovertime = "1000";
          isContainer = "0";
-         hidden = "1";
          canSave = "1";
          canSaveDynamicFields = "0";
       };
@@ -89,13 +110,13 @@
          profile = "GuiMenuButtonProfile";
          visible = "1";
          active = "1";
+         command = "OptionsMenu.populateDisplaySettingsList();";
          tooltipProfile = "GuiToolTipProfile";
          hovertime = "1000";
          isContainer = "0";
+         internalName = "DisplayButton";
          canSave = "1";
          canSaveDynamicFields = "0";
-         internalName = "DisplayButton";
-         command="OptionsMenu.populateDisplaySettingsList();";
       };
       new GuiButtonCtrl() {
          text = "Graphics";
@@ -110,13 +131,13 @@
          profile = "GuiMenuButtonProfile";
          visible = "1";
          active = "1";
+         command = "OptionsMenu.populateGraphicsSettingsList();";
          tooltipProfile = "GuiToolTipProfile";
          hovertime = "1000";
          isContainer = "0";
+         internalName = "GraphicsButton";
          canSave = "1";
          canSaveDynamicFields = "0";
-         internalName = "GraphicsButton";
-         command="OptionsMenu.populateGraphicsSettingsList();";
       };
       new GuiButtonCtrl() {
          text = "Audio";
@@ -131,13 +152,13 @@
          profile = "GuiMenuButtonProfile";
          visible = "1";
          active = "1";
+         command = "OptionsMenu.populateAudioSettingsList();";
          tooltipProfile = "GuiToolTipProfile";
          hovertime = "1000";
          isContainer = "0";
+         internalName = "AudioButton";
          canSave = "1";
          canSaveDynamicFields = "0";
-         internalName = "AudioButton";
-         command="OptionsMenu.populateAudioSettingsList();";
       };
       new GuiButtonCtrl() {
          text = "Keyboard + Mouse";
@@ -152,13 +173,13 @@
          profile = "GuiMenuButtonProfile";
          visible = "1";
          active = "1";
+         command = "OptionsMenu.populateKeyboardMouseSettingsList();";
          tooltipProfile = "GuiToolTipProfile";
          hovertime = "1000";
          isContainer = "0";
+         internalName = "KBMButton";
          canSave = "1";
          canSaveDynamicFields = "0";
-         internalName = "KBMButton";
-         command="OptionsMenu.populateKeyboardMouseSettingsList();";
       };
       new GuiButtonCtrl() {
          text = "Gamepad";
@@ -173,13 +194,13 @@
          profile = "GuiMenuButtonProfile";
          visible = "1";
          active = "1";
+         command = "OptionsMenu.populateGamepadSettingsList();";
          tooltipProfile = "GuiToolTipProfile";
          hovertime = "1000";
          isContainer = "0";
+         internalName = "gamepadButton";
          canSave = "1";
          canSaveDynamicFields = "0";
-         internalName = "GamepadButton";
-         command="OptionsMenu.populateGamepadSettingsList();";
       };
       new GuiScrollCtrl() {
          willFirstRespond = "1";
@@ -211,13 +232,10 @@
          canSaveDynamicFields = "0";
 
          new GuiGameListMenuCtrl(OptionsMenuSettingsList) {
-            class = "UIMenuButtonList";
             debugRender = "0";
-            callbackOnA = "OptionsMenuSettingsList.activateRow();";
-            callbackOnB = "OptionsMenuSettingsList.backOut();";
             callbackOnInputs = "1";
             position = "1 1";
-            extent = "621 141";
+            extent = "621 510";
             minExtent = "8 2";
             horizSizing = "width";
             vertSizing = "bottom";
@@ -227,12 +245,12 @@
             tooltipProfile = "GuiToolTipProfile";
             hovertime = "1000";
             isContainer = "0";
+            class = "UIMenuButtonList";
             canSave = "1";
             canSaveDynamicFields = "0";
          };
       };
       new GuiTextCtrl(OptionName) {
-         text = "Option";
          maxLength = "1024";
          margin = "0 0 0 0";
          padding = "0 0 0 0";
@@ -265,7 +283,7 @@
          minExtent = "8 2";
          horizSizing = "right";
          vertSizing = "bottom";
-         profile = "GuiMLWhiteTextProfile";
+         profile = "GuiMLTextProfile";
          visible = "1";
          active = "1";
          tooltipProfile = "GuiToolTipProfile";
@@ -275,7 +293,7 @@
          canSaveDynamicFields = "0";
       };
    };
-   new GuiControl(OptionsButtonHolder) {
+   new GuiControl() {
       position = "189 652";
       extent = "646 130";
       minExtent = "8 2";
@@ -290,5 +308,169 @@
       canSave = "1";
       canSaveDynamicFields = "0";
    };
+   new GuiControl(OptionsButtonHolder) {
+      position = "109 711";
+      extent = "791 40";
+      minExtent = "8 2";
+      horizSizing = "center";
+      vertSizing = "top";
+      profile = "GuiDefaultProfile";
+      visible = "1";
+      active = "1";
+      tooltipProfile = "GuiToolTipProfile";
+      hovertime = "1000";
+      isContainer = "1";
+      class = "MenuInputButtonContainer";
+      canSave = "1";
+      canSaveDynamicFields = "0";
+
+      new GuiIconButtonCtrl() {
+         buttonMargin = "4 4";
+         iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
+         iconLocation = "Left";
+         sizeIconToButton = "1";
+         makeIconSquare = "1";
+         textLocation = "Right";
+         textMargin = "4";
+         autoSize = "0";
+         text = "Apply";
+         groupNum = "-1";
+         buttonType = "PushButton";
+         useMouseEvents = "0";
+         position = "507 0";
+         extent = "140 40";
+         minExtent = "8 2";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "GuiMenuButtonProfile";
+         visible = "1";
+         active = "1";
+         command = "ChooseLevelDlg.beginLevel();";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         internalName = "applyButton";
+         class = "MenuInputButton";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
+      new GuiIconButtonCtrl() {
+         buttonMargin = "4 4";
+         iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Esc";
+         iconLocation = "Left";
+         sizeIconToButton = "1";
+         makeIconSquare = "1";
+         textLocation = "Right";
+         textMargin = "4";
+         autoSize = "0";
+         text = "Back";
+         groupNum = "-1";
+         buttonType = "PushButton";
+         useMouseEvents = "0";
+         position = "651 0";
+         extent = "140 40";
+         minExtent = "8 2";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "GuiMenuButtonProfile";
+         visible = "1";
+         active = "1";
+         command = "ChooseLevelDlg.backOut();";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         internalName = "backButton";
+         class = "MenuInputButton";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
+      new GuiIconButtonCtrl() {
+         buttonMargin = "4 4";
+         iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
+         iconLocation = "Left";
+         sizeIconToButton = "1";
+         makeIconSquare = "1";
+         textLocation = "Right";
+         textMargin = "4";
+         autoSize = "0";
+         text = "Prev Tab";
+         groupNum = "-1";
+         buttonType = "PushButton";
+         useMouseEvents = "0";
+         position = "0 0";
+         extent = "140 40";
+         minExtent = "8 2";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "GuiMenuButtonProfile";
+         visible = "1";
+         active = "1";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         internalName = "prevTabButton";
+         class = "MenuInputButton";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
+      new GuiIconButtonCtrl() {
+         buttonMargin = "4 4";
+         iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Esc";
+         iconLocation = "Left";
+         sizeIconToButton = "1";
+         makeIconSquare = "1";
+         textLocation = "Right";
+         textMargin = "4";
+         autoSize = "0";
+         text = "Next Tab";
+         groupNum = "-1";
+         buttonType = "PushButton";
+         useMouseEvents = "0";
+         position = "144 0";
+         extent = "140 40";
+         minExtent = "8 2";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "GuiMenuButtonProfile";
+         visible = "1";
+         active = "1";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         internalName = "nextTabButton";
+         class = "MenuInputButton";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
+      new GuiIconButtonCtrl() {
+         buttonMargin = "4 4";
+         iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Esc";
+         iconLocation = "Left";
+         sizeIconToButton = "1";
+         makeIconSquare = "1";
+         textLocation = "Right";
+         textMargin = "4";
+         autoSize = "0";
+         text = "Reset";
+         groupNum = "-1";
+         buttonType = "PushButton";
+         useMouseEvents = "0";
+         position = "325 0";
+         extent = "140 40";
+         minExtent = "8 2";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "GuiMenuButtonProfile";
+         visible = "1";
+         active = "1";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         internalName = "resetButton";
+         class = "MenuInputButton";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
+   };
 };
 //--- OBJECT WRITE END ---

+ 8 - 14
Templates/BaseGame/game/data/ui/guis/pauseMenu.cs

@@ -8,6 +8,10 @@ function PauseMenuList::onAdd(%this)
 function PauseMenu::onWake(%this)
 {
    $timescale = 0;
+   
+   PauseMenuList.hidden = false;
+   PauseMenuList.setFirstResponder();
+   PauseButtonHolder.setActive();
 }
 
 
@@ -19,7 +23,8 @@ function PauseMenu::onSleep(%this)
 function PauseMenu::onReturnTo(%this)
 {
    PauseMenuList.hidden = false;
-   PauseButtonHolder.refresh();
+   PauseMenuList.setFirstResponder();
+   PauseButtonHolder.setActive();
 }
 
 function openPauseMenuOptions()
@@ -43,17 +48,6 @@ function pauseMenuExitToDesktop()
 
 function PauseButtonHolder::onWake(%this)
 {
-   %this.refresh();
-}
-
-function PauseButtonHolder::refresh(%this)
-{
-   PauseButtonHolder.add(GamepadButtonsGui);
-   
-   GamepadButtonsGui.clearButtons();
-   
-   GamepadButtonsGui.setButton(2, "A", "", "", "", true);
-   GamepadButtonsGui.setButton(3, "B", "Esc", "Back", "Canvas.popDialog();");
-   
-   GamepadButtonsGui.refreshButtons();
+   %this-->goButton.set("btn_a", "Return", "OK", "PauseMenuList.activateRow();", true);
+   %this-->backButton.set("btn_b", "Escape", "Back", "Canvas.popDialog();");
 }

+ 67 - 8
Templates/BaseGame/game/data/ui/guis/pauseMenu.gui

@@ -36,7 +36,7 @@
       canSaveDynamicFields = "1";
    };
    new GuiControl() {
-      position = "155 118";
+      position = "162 125";
       extent = "700 518";
       minExtent = "8 2";
       horizSizing = "center";
@@ -49,12 +49,9 @@
       isContainer = "1";
       canSave = "1";
       canSaveDynamicFields = "0";
-      
+
       new GuiGameListMenuCtrl(PauseMenuList) {
-         class = "UIMenuButtonList";
          debugRender = "0";
-         callbackOnA = "OptionsMenuSettingsList.activateRow();";
-         callbackOnB = "OptionsMenuSettingsList.backOut();";
          callbackOnInputs = "1";
          position = "0 0";
          extent = "700 320";
@@ -67,14 +64,14 @@
          tooltipProfile = "GuiToolTipProfile";
          hovertime = "1000";
          isContainer = "0";
+         class = "UIMenuButtonList";
          canSave = "1";
          canSaveDynamicFields = "0";
       };
    };
-   
    new GuiControl(PauseButtonHolder) {
-      position = "189 652";
-      extent = "646 130";
+      position = "189 711";
+      extent = "646 40";
       minExtent = "8 2";
       horizSizing = "center";
       vertSizing = "top";
@@ -84,8 +81,70 @@
       tooltipProfile = "GuiToolTipProfile";
       hovertime = "1000";
       isContainer = "1";
+      class = "MenuInputButtonContainer";
       canSave = "1";
       canSaveDynamicFields = "0";
+
+      new GuiIconButtonCtrl() {
+         buttonMargin = "4 4";
+         iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
+         iconLocation = "Left";
+         sizeIconToButton = "1";
+         makeIconSquare = "1";
+         textLocation = "Right";
+         textMargin = "4";
+         autoSize = "0";
+         text = "OK";
+         groupNum = "-1";
+         buttonType = "PushButton";
+         useMouseEvents = "0";
+         position = "363 0";
+         extent = "140 40";
+         minExtent = "8 2";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "GuiMenuButtonProfile";
+         visible = "1";
+         active = "1";
+         command = "PauseMenuList.activateRow();";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         internalName = "goButton";
+         class = "MenuInputButton";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
+      new GuiIconButtonCtrl() {
+         buttonMargin = "4 4";
+         iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Esc";
+         iconLocation = "Left";
+         sizeIconToButton = "1";
+         makeIconSquare = "1";
+         textLocation = "Right";
+         textMargin = "4";
+         autoSize = "0";
+         text = "Back";
+         groupNum = "-1";
+         buttonType = "PushButton";
+         useMouseEvents = "0";
+         position = "507 0";
+         extent = "140 40";
+         minExtent = "8 2";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "GuiMenuButtonProfile";
+         visible = "1";
+         active = "1";
+         command = "Canvas.popDialog();";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         internalName = "backButton";
+         class = "MenuInputButton";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
    };
 };
 //--- OBJECT WRITE END ---

+ 3 - 1
Templates/BaseGame/game/data/ui/guis/startupGui.cs

@@ -33,13 +33,15 @@ function loadStartup()
    // to cycle through. Note that they have to
    // be in consecutive numerical order
    StartupGui.bitmap[0]     = "data/ui/images/background-dark";
-   StartupGui.logo[0]       = "data/ui/images/Torque-3D-logo";
+   StartupGui.logo[0]       = "data/ui/images/Torque-3D-logo_alt";
    StartupGui.logoPos[0]    = "178 251";
    StartupGui.logoExtent[0] = "443 139";
 
    // Call the next() function to set our firt
    // splash screen
    StartupGui.next();
+   
+   StartupGui.setFirstResponder();
 
    // Play our startup sound
    //SFXPlayOnce(AudioGui, "data/ui/sounds/startup");//SFXPlay(startsnd);

+ 0 - 0
Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Esc.png → Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Escape.png


+ 0 - 0
Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter.png → Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Return.png


+ 0 - 0
Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter_Alt.png → Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Return_Alt.png


+ 0 - 0
Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter_Tall.png → Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Return_Tall.png


BIN
Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Options.png


BIN
Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Share.png


BIN
Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_LB.png


BIN
Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_RB.png


BIN
Templates/BaseGame/game/data/ui/images/background-dark.png


BIN
Templates/BaseGame/game/data/ui/images/listMenuArray.png


BIN
Templates/BaseGame/game/data/ui/images/panel.png


BIN
Templates/BaseGame/game/data/ui/images/panel_low.png


BIN
Templates/BaseGame/game/data/ui/images/scrollBar.png


+ 0 - 200
Templates/BaseGame/game/data/ui/scripts/audioMenu.cs

@@ -1,200 +0,0 @@
-// =============================================================================
-// AUDIO MENU
-// =============================================================================
-$AudioTestHandle = 0;
-// Description to use for playing the volume test sound.  This isn't
-// played with the description of the channel that has its volume changed
-// because we know nothing about the playback state of the channel.  If it
-// is paused or stopped, the test sound would not play then.
-$AudioTestDescription = new SFXDescription()
-{
-   sourceGroup = AudioChannelMaster;
-};
-
-function AudioMenu::loadSettings(%this)
-{
-   // Audio
-   //OptAudioHardwareToggle.setStateOn($pref::SFX::useHardware);
-   //OptAudioHardwareToggle.setActive( true );
-   
-   /*%this-->OptAudioVolumeMaster.setValue( $pref::SFX::masterVolume );
-   %this-->OptAudioVolumeShell.setValue( $pref::SFX::channelVolume[ $GuiAudioType] );
-   %this-->OptAudioVolumeSim.setValue( $pref::SFX::channelVolume[ $SimAudioType ] );
-   %this-->OptAudioVolumeMusic.setValue( $pref::SFX::channelVolume[ $MusicAudioType ] );
-   
-   AudioMenuSoundDriver.clear();
-   %buffer = sfxGetAvailableDevices();
-   %count = getRecordCount( %buffer );   
-   for(%i = 0; %i < %count; %i++)
-   {
-      %record = getRecord(%buffer, %i);
-      %provider = getField(%record, 0);
-      
-      if ( AudioMenuSoundDriver.findText( %provider ) == -1 )
-            AudioMenuSoundDriver.add( %provider, %i );
-   }
-   
-   AudioMenuSoundDriver.sort();
-
-   %selId = AudioMenuSoundDriver.findText($pref::SFX::provider);
-	if ( %selId == -1 )
-		AudioMenuSoundDriver.setFirstSelected();
-   else
-	   AudioMenuSoundDriver.setSelected( %selId );*/
-	   
-   OptionsSettingStack.clear();
-   
-   OptionsMenu.addSliderOption(OptionsSettingStack, "Master Volume", $pref::Video::Brightness, "0 1", 10, 5);
-   OptionsMenu.addSliderOption(OptionsSettingStack, "Menu Volume", $pref::Video::Brightness, "0 1", 10, 5);
-   OptionsMenu.addSliderOption(OptionsSettingStack, "Effects Volume", $pref::Video::Brightness, "0 1", 10, 5);
-   OptionsMenu.addSliderOption(OptionsSettingStack, "Music Volume", $pref::Video::Brightness, "0 1", 10, 5);
-}
-
-function AudioMenu::loadDevices(%this)
-{
-   if(!isObject(SoundDeviceGroup))
-   {
-      new SimGroup( SoundDeviceGroup );
-   }
-   else
-   {
-      SoundDeviceGroup.clear();
-   }
-   
-   %buffer = sfxGetAvailableDevices();
-   %count = getRecordCount( %buffer );
-   for (%i = 0; %i < %count; %i++)
-   {
-      %record = getRecord(%buffer, %i);
-      %provider = getField(%record, 0);
-      %device = getField(%record, 1);
-         
-      if($pref::SFX::provider !$= %provider)
-         continue;
-      
-      %setting = new ArrayObject()
-      {
-         class = "OptionsMenuSettingLevel";
-         caseSensitive = true;
-         
-         displayName = %device;
-         
-         key["$pref::SFX::Device"] = %device;
-      };
-      
-      SoundDeviceGroup.add(%setting);
-   }
-}
-
-function AudioMenu::apply(%this)
-{
-   sfxSetMasterVolume( $pref::SFX::masterVolume );
-   
-   sfxSetChannelVolume( $GuiAudioType, $pref::SFX::channelVolume[ $GuiAudioType ] );
-   sfxSetChannelVolume( $SimAudioType, $pref::SFX::channelVolume[ $SimAudioType ] );
-   sfxSetChannelVolume( $MusicAudioType, $pref::SFX::channelVolume[ $MusicAudioType ] );
-   
-   if ( !sfxCreateDevice(  $pref::SFX::provider, 
-                           $pref::SFX::device, 
-                           $pref::SFX::useHardware,
-                           -1 ) )                              
-      error( "Unable to create SFX device: " @ $pref::SFX::provider 
-                                             SPC $pref::SFX::device 
-                                             SPC $pref::SFX::useHardware );        
-
-   if( !isObject( $AudioTestHandle ) )
-   {
-      sfxPlay(menuButtonPressed);
-   }
-}
-
-function AudioMenuOKButton::onClick(%this)
-{
-   //save the settings and then back out
-    AudioMenu.apply();
-    OptionsMenu.backOut();
-}
-
-function AudioMenuDefaultsButton::onClick(%this)
-{
-   sfxInit();
-   AudioMenu.loadSettings();
-}
-
-function OptAudioUpdateMasterVolume( %volume )
-{
-   if( %volume == $pref::SFX::masterVolume )
-      return;
-      
-   sfxSetMasterVolume( %volume );
-   $pref::SFX::masterVolume = %volume;
-   
-   if( !isObject( $AudioTestHandle ) )
-      $AudioTestHandle = sfxPlayOnce( AudioChannel, "data/ui/sounds/volumeTest.wav" );
-}
-
-function OptAudioUpdateChannelVolume( %description, %volume )
-{
-   %channel = sfxGroupToOldChannel( %description.sourceGroup );
-   
-   if( %volume == $pref::SFX::channelVolume[ %channel ] )
-      return;
-
-   sfxSetChannelVolume( %channel, %volume );
-   $pref::SFX::channelVolume[ %channel ] = %volume;
-   
-   if( !isObject( $AudioTestHandle ) )
-   {
-      $AudioTestDescription.volume = %volume;
-      $AudioTestHandle = sfxPlayOnce( $AudioTestDescription, "data/ui/sounds/volumeTest.wav" );
-   }
-}
-
-function AudioMenuSoundDriver::onSelect( %this, %id, %text )
-{
-   // Skip empty provider selections.   
-   if ( %text $= "" )
-      return;
-      
-   $pref::SFX::provider = %text;
-   AudioMenuSoundDevice.clear();
-   
-   %buffer = sfxGetAvailableDevices();
-   %count = getRecordCount( %buffer );   
-   for(%i = 0; %i < %count; %i++)
-   {
-      %record = getRecord(%buffer, %i);
-      %provider = getField(%record, 0);
-      %device = getField(%record, 1);
-      
-      if (%provider !$= %text)
-         continue;
-            
-       if ( AudioMenuSoundDevice.findText( %device ) == -1 )
-            AudioMenuSoundDevice.add( %device, %i );
-   }
-
-   // Find the previous selected device.
-   %selId = AudioMenuSoundDevice.findText($pref::SFX::device);
-   if ( %selId == -1 )
-      AudioMenuSoundDevice.setFirstSelected();
-   else
-   AudioMenuSoundDevice.setSelected( %selId );
-}
-
-function AudioMenuSoundDevice::onSelect( %this, %id, %text )
-{
-   // Skip empty selections.
-   if ( %text $= "" )
-      return;
-      
-   $pref::SFX::device = %text;
-   
-   if ( !sfxCreateDevice(  $pref::SFX::provider, 
-                           $pref::SFX::device, 
-                           $pref::SFX::useHardware,
-                           -1 ) )                              
-      error( "Unable to create SFX device: " @ $pref::SFX::provider 
-                                             SPC $pref::SFX::device 
-                                             SPC $pref::SFX::useHardware );                                             
-}

+ 0 - 103
Templates/BaseGame/game/data/ui/scripts/default.keybinds.cs

@@ -1,103 +0,0 @@
-$movementSpeed = 1; // m/s
-
-function moveleft(%val)
-{
-   $mvLeftAction = %val * $movementSpeed;
-}
-
-function moveright(%val)
-{
-   $mvRightAction = %val * $movementSpeed;
-}
-
-function moveforward(%val)
-{
-   $mvForwardAction = %val * $movementSpeed;
-}
-
-function movebackward(%val)
-{
-   $mvBackwardAction = %val * $movementSpeed;
-}
-
-function gamePadMoveX( %val )
-{
-   if(%val > 0)
-   {
-      $mvRightAction = %val * $movementSpeed;
-      $mvLeftAction = 0;
-   }
-   else
-   {
-      $mvRightAction = 0;
-      $mvLeftAction = -%val * $movementSpeed;
-   }
-}
-
-function gamePadMoveY( %val )
-{
-   if(%val > 0)
-   {
-      $mvForwardAction = %val * $movementSpeed;
-      $mvBackwardAction = 0;
-   }
-   else
-   {
-      $mvForwardAction = 0;
-      $mvBackwardAction = -%val * $movementSpeed;
-   }
-}
-
-function gamepadYaw(%val)
-{
-   %yawAdj = getGamepadAdjustAmount(%val);
-   if(ServerConnection.isControlObjectRotDampedCamera())
-   {
-      // Clamp and scale
-      %yawAdj = mClamp(%yawAdj, -m2Pi()+0.01, m2Pi()-0.01);
-      %yawAdj *= 0.5;
-   }
-
-   if(%yawAdj > 0)
-   {
-      $mvYawLeftSpeed = %yawAdj;
-      $mvYawRightSpeed = 0;
-   }
-   else
-   {
-      $mvYawLeftSpeed = 0;
-      $mvYawRightSpeed = -%yawAdj;
-   }
-}
-
-function gamepadPitch(%val)
-{
-   %pitchAdj = getGamepadAdjustAmount(%val);
-   if(ServerConnection.isControlObjectRotDampedCamera())
-   {
-      // Clamp and scale
-      %pitchAdj = mClamp(%pitchAdj, -m2Pi()+0.01, m2Pi()-0.01);
-      %pitchAdj *= 0.5;
-   }
-
-   if(%pitchAdj > 0)
-   {
-      $mvPitchDownSpeed = %pitchAdj;
-      $mvPitchUpSpeed = 0;
-   }
-   else
-   {
-      $mvPitchDownSpeed = 0;
-      $mvPitchUpSpeed = -%pitchAdj;
-   }
-}
-
-moveMap.bind( keyboard, a, moveleft );
-moveMap.bind( keyboard, d, moveright );
-moveMap.bind( keyboard, w, moveforward );
-moveMap.bind( keyboard, s, movebackward );
-
-moveMap.bind( gamepad, thumbrx, "D", "-0.23 0.23", gamepadYaw );
-moveMap.bind( gamepad, thumbry, "D", "-0.23 0.23", gamepadPitch );
-moveMap.bind( gamepad, thumblx, "D", "-0.23 0.23", gamePadMoveX );
-moveMap.bind( gamepad, thumbly, "D", "-0.23 0.23", gamePadMoveY );

+ 0 - 245
Templates/BaseGame/game/data/ui/scripts/displayMenu.cs

@@ -1,245 +0,0 @@
-function DisplayMenu::loadSettings()
-{
-   OptionsMenu.currentMenu = "DisplayMenu";
-   OptionsSettingStack.clear();
-   
-   %APICount = getTokenCount(GraphicsDriverSetting::getList(),",");
-   if(%APICount > 1)
-      OptionsMenu.addSettingOption(OptionsSettingStack, "Diplay API", "", "GraphicsDriverSetting");
-   
-   OptionsMenu.addSettingOption(OptionsSettingStack, "Screen Resolution", "", "ScreenResolutionSetting");
-   OptionsMenu.addSettingOption(OptionsSettingStack, "Fullscreen", "", "FullscreenSetting");
-   OptionsMenu.addSettingOption(OptionsSettingStack, "VSync", "", "VSyncSetting");
-   
-   OptionsMenu.addSliderOption(OptionsSettingStack, "Field of View", $pref::Video::FOV, "65 120", 55, 75);
-   
-   OptionsMenu.addSliderOption(OptionsSettingStack, "Brightness", $pref::Video::Brightness, "0 1", 10, 5);
-   OptionsMenu.addSliderOption(OptionsSettingStack, "Contrast", $pref::Video::Contrast, "0 1", 10, 5);
-   
-   GraphicsSettingsCache.empty();
-}
-
-function DisplayMenu::apply(%this)
-{
-   //Loop through the settings cache and actually apply the values
-   %cachedSettingCount = GraphicsSettingsCache.count();
-   
-   for(%i=0; %i < %cachedSettingCount; %i++)
-   {
-      %var = GraphicsSettingsCache.getKey(%i);  
-      %val = GraphicsSettingsCache.getValue(%i);
-      
-      if(%var $= "$pref::Video::displayDevice")
-      {
-         MessageBoxOK( "Change requires restart", "Please restart the game for a display device change to take effect." );
-      }
-      
-      setVariable(%var, %val);
-   }
-      
-   //Update the display settings now
-   if (getWord( $pref::Video::Resolution, 2) $= "")
-   {
-      $pref::Video::Resolution = getWord( $pref::Video::Resolution, 0 ) SPC getWord( $pref::Video::Resolution, 1 );
-   }
-   else
-   {
-      $pref::Video::Resolution = getWord( $pref::Video::Resolution, 0 ) SPC getWord( $pref::Video::Resolution, 2 );
-   }
-	
-   /*if ( %newFullScreen $= "false" )
-	{
-      // If we're in windowed mode switch the fullscreen check
-      // if the resolution is bigger than the desktop.
-      %deskRes    = getDesktopResolution();      
-      %deskResX   = getWord(%deskRes, $WORD::RES_X);
-      %deskResY   = getWord(%deskRes, $WORD::RES_Y);
-	   if (  getWord( %newRes, $WORD::RES_X ) > %deskResX || 
-	         getWord( %newRes, $WORD::RES_Y ) > %deskResY )
-      {
-         $pref::Video::FullScreen = "true";
-         GraphicsMenuFullScreen.setStateOn( true );
-      }
-	}*/
-
-   // Build the final mode string.
-	%newMode = $pref::Video::Resolution SPC $pref::Video::FullScreen SPC 32 SPC $pref::Video::RefreshRate SPC $pref::Video::AA;
-	
-   // Change the video mode.   
-   /*if (  %newMode !$= $pref::Video::mode || 
-         %newVsync != $pref::Video::disableVerticalSync )
-   {
-      if ( %testNeedApply )
-         return true;*/
-
-      $pref::Video::mode = %newMode;
-      //$pref::Video::disableVerticalSync = %newVsync;      
-      configureCanvas();
-   //}
-   
-   echo("Exporting client prefs");
-   %prefPath = getPrefpath();
-   export("$pref::*", %prefPath @ "/clientPrefs.cs", false);
-}
-//
-function GraphicsDriverSetting::set(%setting)
-{
-   switch$(%setting)
-   {
-      case "D3D11":
-         GraphicsMenu::set("$pref::Video::displayDevice", "D3D11");
-      case "OpenGL":
-         GraphicsMenu::set("$pref::Video::displayDevice", "OpenGL");
-      default:
-         GraphicsMenu::set("$pref::Video::displayDevice", "OpenGL");
-   }
-}
-
-function GraphicsDriverSetting::get()
-{
-   if($pref::Video::displayDevice $= "D3D11")
-      return "D3D11";
-   else if($pref::Video::displayDevice $= "OpenGL")
-      return "OpenGL";
-   else
-      return "Unknown";
-}
-
-function GraphicsDriverSetting::getList()
-{
-   %returnsList = "";
-   %buffer = getDisplayDeviceList();
-   %deviceCount = getFieldCount( %buffer );   
-   %numAdapters = GFXInit::getAdapterCount();
-   
-   %count = 0;
-   for(%i = 0; %i < %deviceCount; %i++)
-   {
-      %deviceDesc = getField(%buffer, %i);
-      
-      if(%deviceDesc $= "GFX Null Device")
-         continue;
-         
-      for( %i = 0; %i < %numAdapters; %i ++ )
-      {
-         if( GFXInit::getAdapterName( %i ) $= %deviceDesc )
-         {
-            %deviceName = GFXInit::getAdapterType( %i );
-            break;
-         }
-      }
-         
-      if(%count != 0)
-         %returnsList = %returnsList @ "," @ %deviceName;
-      else
-         %returnsList = %deviceName;
-         
-      %count++;
-   }
-
-   return %returnsList;
-}
-
-//
-function ScreenResolutionSetting::set(%setting)
-{
-   GraphicsMenu::set("$pref::Video::Resolution", %setting);
-}
-
-function ScreenResolutionSetting::get()
-{
-   return _makePrettyResString( $pref::Video::Resolution );
-}
-
-function ScreenResolutionSetting::getList()
-{
-   %returnsList = "";
-   
-   %resCount = Canvas.getModeCount();
-   for (%i = 0; %i < %resCount; %i++)
-   {
-      %testResString = Canvas.getMode( %i );
-      %testRes = _makePrettyResString( %testResString );
-      
-      //sanitize
-      %found = false;
-      %retCount = getTokenCount(%returnsList, ",");
-      for (%x = 0; %x < %retCount; %x++)
-      {
-         %existingEntry = getToken(%returnsList, ",", %x);
-         if(%existingEntry $= %testRes)
-         {
-            %found = true;
-            break;  
-         }
-      }
-      
-      if(%found)
-         continue;
-                     
-      if(%i != 0)
-         %returnsList = %returnsList @ "," @ %testRes;
-      else
-         %returnsList = %testRes;
-   }
-   
-   return %returnsList;
-}
-
-//
-function FullscreenSetting::set(%setting)
-{
-   switch$(%setting)
-   {
-      case "On":
-         GraphicsMenu::set("$pref::Video::FullScreen", "1");
-      case "Off":
-         GraphicsMenu::set("$pref::Video::FullScreen", "0");
-      default:
-         GraphicsMenu::set("$pref::Video::FullScreen", "0");
-   }
-}
-
-function FullscreenSetting::get()
-{
-   if($pref::Video::FullScreen == 1)
-      return "On";
-   else if($pref::Video::FullScreen == 0)
-      return "Off";
-   else
-      return "Custom";
-}
-
-function FullscreenSetting::getList()
-{
-   return "Off,On";
-}
-
-//
-function VSyncSetting::set(%setting)
-{
-   switch$(%setting)
-   {
-      case "On":
-         GraphicsMenu::set("$pref::Video::disableVerticalSync", "0");
-      case "Off":
-         GraphicsMenu::set("$pref::Video::disableVerticalSync", "1");
-      default:
-         GraphicsMenu::set("$pref::Video::disableVerticalSync", "1");
-   }
-}
-
-function VSyncSetting::get()
-{
-   if($pref::Video::disableVerticalSync == 0)
-      return "On";
-   else if($pref::Video::disableVerticalSync == 1)
-      return "Off";
-   else
-      return "Custom";
-}
-
-function VSyncSetting::getList()
-{
-   return "Off,On";
-}

+ 0 - 1050
Templates/BaseGame/game/data/ui/scripts/graphicsMenu.cs

@@ -1,1050 +0,0 @@
-// =============================================================================
-// GRAPHICS MENU
-// =============================================================================
-function GraphicsMenu::refresh(%this)
-{
-   //
-   // Display Menu
-   GraphicsMenuFullScreen.setStateOn( Canvas.isFullScreen() );
-   GraphicsMenuVSync.setStateOn( !$pref::Video::disableVerticalSync );
-   
-   %this.initResMenu();
-   %resSelId = GraphicsMenuResolution.findText( _makePrettyResString( $pref::Video::mode ) );
-   if( %resSelId != -1 )
-      GraphicsMenuResolution.setSelected( %resSelId );
-   
-   GraphicsMenuDriver.clear();
-   
-   %buffer = getDisplayDeviceList();
-   %count = getFieldCount( %buffer );   
-   for(%i = 0; %i < %count; %i++)
-      GraphicsMenuDriver.add(getField(%buffer, %i), %i);
-
-   %selId = GraphicsMenuDriver.findText( getDisplayDeviceInformation() );
-	if ( %selId == -1 )
-		GraphicsMenuDriver.setFirstSelected();
-   else
-	   GraphicsMenuDriver.setSelected( %selId );
-   //
-
-   //
-   // General Graphics menu
-   GraphicsMenuShadowQlty.init(ShadowQualityList);
-   GraphicsMenuSoftShadow.init(SoftShadowList);
-   
-   GraphicsMenuModelDtl.init(MeshQualityGroup);
-   GraphicsMenuTextureDtl.init(TextureQualityGroup);
-   GraphicsMenuTerrainDtl.init(TerrainQualityGroup);
-   GraphicsMenuDecalLife.init(DecalLifetimeGroup);
-   GraphicsMenuGroundClutter.init(GroundCoverDensityGroup);
-   
-   GraphicsMenuMaterialQlty.init(ShaderQualityGroup);
-   
-   // Setup the anisotropic filtering menu.
-   %ansioCtrl = GraphicsMenuAniso;
-   %ansioCtrl.clear();
-   %ansioCtrl.add( "16X", 16 );
-   %ansioCtrl.add( "8X", 8 );
-   %ansioCtrl.add( "4X", 4 );
-   %ansioCtrl.add( "Off", 0 );
-   %ansioCtrl.setSelected( $pref::Video::defaultAnisotropy, false );
-            
-   // set up the Refresh Rate menu.
-   %refreshMenu = GraphicsMenuRefreshRate;
-   %refreshMenu.clear();
-   // %refreshMenu.add("Auto", 60);
-   %refreshMenu.add("60", 60);
-   %refreshMenu.add("75", 75);
-   %refreshMenu.setSelected( $pref::Video::RefreshRate );
-	   
-   // Populate the Anti-aliasing popup.
-   %aaMenu = GraphicsMenuAA;
-   %aaMenu.clear();
-   %aaMenu.Add( "4x", 4 );
-   %aaMenu.Add( "2x", 2 );
-   %aaMenu.Add( "1x", 1 );
-   %aaMenu.Add( "Off", 0 );
-   %aaMenu.setSelected( $pref::Video::AA );
-   
-   //Parallax
-   GraphicsMenuParallax.setStateOn(!$pref::Video::disableParallaxMapping);
-   
-   //water reflections
-   GraphicsMenuWaterRefl.setStateOn(!$pref::Water::disableTrueReflections);
-   
-   GraphicsMenuParallax.setStateOn(!$pref::Video::disableParallaxMapping);
-      
-   GraphicsMenuAO.setStateOn($pref::PostFX::EnableSSAO);
-   GraphicsMenuHDR.setStateOn($pref::PostFX::EnableHDR);
-   GraphicsMenuDOF.setStateOn($pref::PostFX::EnableDOF);
-   GraphicsMenuVignette.setStateOn($pref::PostFX::EnableVignette);
-   GraphicsMenuLightRay.setStateOn($pref::PostFX::EnableLightRays);
-}
-
-function GraphicsMenu::initResMenu( %this )
-{
-   // Clear out previous values
-   %resMenu = GraphicsMenuResolution;	   
-   %resMenu.clear();
-   
-   // If we are in a browser then we can't change our resolution through
-   // the options dialog
-   if (getWebDeployment())
-   {
-      %count = 0;
-      %currRes = getWords(Canvas.getVideoMode(), $WORD::RES_X, $WORD::RES_Y);
-      %resMenu.add(%currRes, %count);
-      %count++;
-
-      return;
-   }
-   
-   // Loop through all and add all valid resolutions
-   %count = 0;
-   %resCount = Canvas.getModeCount();
-   for (%i = 0; %i < %resCount; %i++)
-   {
-      %testResString = Canvas.getMode( %i );
-      %testRes = _makePrettyResString( %testResString );
-                     
-      // Only add to list if it isn't there already.
-      if (%resMenu.findText(%testRes) == -1)
-      {
-         %resMenu.add(%testRes, %i);
-         %count++;
-      }
-   }
-   
-   %resMenu.sort();
-}
-
-//
-function GraphicsMenu::Autodetect(%this)
-{
-   $pref::Video::autoDetect = false;
-   
-   %shaderVer = getPixelShaderVersion();
-   %intel = ( strstr( strupr( getDisplayDeviceInformation() ), "INTEL" ) != -1 ) ? true : false;
-   %videoMem = GFXCardProfilerAPI::getVideoMemoryMB();
-   
-   return %this.Autodetect_Apply( %shaderVer, %intel, %videoMem );
-}
-
-function GraphicsMenu::Autodetect_Apply(%this, %shaderVer, %intel, %videoMem )
-{
-   if ( %shaderVer < 2.0 )
-   {      
-      return "Your video card does not meet the minimum requirment of shader model 2.0.";
-   }
-   
-   if ( %shaderVer < 3.0 || %intel )
-   {
-      // Allow specular and normals for 2.0a and 2.0b
-      if ( %shaderVer > 2.0 )
-      {
-         MeshQualityGroup.applySetting("Lowest");
-         TextureQualityGroup.applySetting("Lowest");
-         GroundCoverDensityGroup.applySetting("Lowest");
-         DecalLifetimeGroup.applySetting("None");
-         TerrainQualityGroup.applySetting("Lowest");
-         ShaderQualityGroup.applySetting("High");
-         
-         ShadowQualityList.applySetting("None");
-         
-         SoftShadowList.applySetting("Off");
-         
-         $pref::Shadows::useShadowCaching = true;
-         
-         $pref::Water::disableTrueReflections = true;
-         $pref::Video::disableParallaxMapping = true;
-         $pref::PostFX::EnableSSAO = false;
-         $pref::PostFX::EnableHDR = false;
-         $pref::PostFX::EnableDOF = false;
-         $pref::PostFX::EnableLightRays = false;
-         $pref::PostFX::EnableVignette = false;
-         
-         $pref::Video::AA = 0;
-         $pref::Video::disableVerticalSync = 0;
-      }
-      else
-      {
-         MeshQualityGroup.applySetting("Lowest");
-         TextureQualityGroup.applySetting("Lowest");
-         GroundCoverDensityGroup.applySetting("Lowest");
-         DecalLifetimeGroup.applySetting("None");
-         TerrainQualityGroup.applySetting("Lowest");
-         ShaderQualityGroup.applySetting("Low");
-         
-         ShadowQualityList.applySetting("None");
-         
-         SoftShadowList.applySetting("Off");
-         
-         $pref::Shadows::useShadowCaching = true;
-         
-         $pref::Water::disableTrueReflections = true;
-         $pref::Video::disableParallaxMapping = true;
-         $pref::PostFX::EnableSSAO = false;
-         $pref::PostFX::EnableHDR = false;
-         $pref::PostFX::EnableDOF = false;
-         $pref::PostFX::EnableLightRays = false;
-         $pref::PostFX::EnableVignette = false;
-         
-         $pref::Video::AA = 0;
-         $pref::Video::disableVerticalSync = 0;
-      }
-   }   
-   else
-   {
-      if ( %videoMem > 1000 )
-      {
-         MeshQualityGroup.applySetting("High");
-         TextureQualityGroup.applySetting("High");
-         GroundCoverDensityGroup.applySetting("High");
-         DecalLifetimeGroup.applySetting("High");
-         TerrainQualityGroup.applySetting("High");
-         ShaderQualityGroup.applySetting("High");
-         
-         ShadowQualityList.applySetting("High");
-         
-         SoftShadowList.applySetting("High");
-         
-         //Should this default to on in ultra settings?
-         $pref::Shadows::useShadowCaching = true;
-         
-         $pref::Water::disableTrueReflections = false;
-         $pref::Video::disableParallaxMapping = false;
-         $pref::PostFX::EnableSSAO = true;
-         $pref::PostFX::EnableHDR = true;
-         $pref::PostFX::EnableDOF = true;
-         $pref::PostFX::EnableLightRays = true;
-         $pref::PostFX::EnableVignette = true;
-         
-         $pref::Video::AA = 4;
-         $pref::Video::disableVerticalSync = 16;
-      }
-      else if ( %videoMem > 400 || %videoMem == 0 )
-      {
-         MeshQualityGroup.applySetting("Medium");
-         TextureQualityGroup.applySetting("Medium");
-         GroundCoverDensityGroup.applySetting("Medium");
-         DecalLifetimeGroup.applySetting("Medium");
-         TerrainQualityGroup.applySetting("Medium");
-         ShaderQualityGroup.applySetting("High");
-         
-         ShadowQualityList.applySetting("Medium");
-         
-         SoftShadowList.applySetting("Low");
-         
-         $pref::Shadows::useShadowCaching = true;
-         
-         $pref::Water::disableTrueReflections = false;
-         $pref::Video::disableParallaxMapping = true;
-         $pref::PostFX::EnableSSAO = false;
-         $pref::PostFX::EnableHDR = true;
-         $pref::PostFX::EnableDOF = true;
-         $pref::PostFX::EnableLightRays = true;
-         $pref::PostFX::EnableVignette = true;
-         
-         $pref::Video::AA = 4;
-         $pref::Video::disableVerticalSync = 4;
-         
-         if ( %videoMem == 0 )
-            return "Torque was unable to detect available video memory. Applying 'Medium' quality.";
-      }
-      else
-      {
-         MeshQualityGroup.applySetting("Low");
-         TextureQualityGroup.applySetting("Low");
-         GroundCoverDensityGroup.applySetting("Low");
-         DecalLifetimeGroup.applySetting("Low");
-         TerrainQualityGroup.applySetting("Low");
-         ShaderQualityGroup.applySetting("Low");
-         
-         ShadowQualityList.applySetting("None");
-         
-         SoftShadowList.applySetting("Off");
-         
-         $pref::Shadows::useShadowCaching = true;
-         
-         $pref::Water::disableTrueReflections = false;
-         $pref::Video::disableParallaxMapping = true;
-         $pref::PostFX::EnableSSAO = false;
-         $pref::PostFX::EnableHDR = false;
-         $pref::PostFX::EnableDOF = false;
-         $pref::PostFX::EnableLightRays = false;
-         $pref::PostFX::EnableVignette = false;
-         
-         $pref::Video::AA = 0;
-         $pref::Video::disableVerticalSync = 0;
-      }
-   }
-   
-   %this.refresh();
-   
-   %this.apply();
-   
-   //force postFX updates
-   PostFXManager.settingsEffectSetEnabled(SSAOPostFx, $pref::PostFX::EnableSSAO);
-   PostFXManager.settingsEffectSetEnabled(HDRPostFX, $pref::PostFX::EnableHDR);
-   PostFXManager.settingsEffectSetEnabled(DOFPostEffect, $pref::PostFX::EnableDOF);
-   PostFXManager.settingsEffectSetEnabled(LightRayPostFX, $pref::PostFX::EnableLightRays);
-   PostFXManager.settingsEffectSetEnabled(VignettePostEffect, $pref::PostFX::EnableVignette);
-   
-   return "Graphics quality settings have been auto detected.";
-}
-
-function _makePrettyResString( %resString, %giveAspectRation )
-{
-   %width = getWord( %resString, $WORD::RES_X );
-   %height = getWord( %resString, $WORD::RES_Y );
-   
-   %aspect = %width / %height;
-   %aspect = mRound( %aspect * 100 ) * 0.01;            
-   
-   switch$( %aspect )
-   {
-      case "1.33":
-         %aspect = "4:3";
-      case "1.78":
-         %aspect = "16:9";
-      default:
-         %aspect = "";
-   }
-   
-   %outRes = %width @ " x " @ %height;
-   if ( %giveAspectRation && %aspect !$= "" )
-      %outRes = %outRes @ "  (" @ %aspect @ ")";
-      
-   return %outRes;   
-}
-
-function GraphicsMenu::apply(%this)
-{
-   //Loop through the settings cache and actually apply the values
-   %cachedSettingCount = GraphicsSettingsCache.count();
-   %canvasUpdate = false;
-   
-   for(%i=0; %i < %cachedSettingCount; %i++)
-   {
-      %var = GraphicsSettingsCache.getKey(%i);  
-      %val = GraphicsSettingsCache.getValue(%i);
-      
-      if(%var $= "$pref::Video::AA")
-      {
-         %canvasUpdate = true;
-      }
-      
-      setVariable(%var, %val);
-   }
-   
-   //Update Textures
-   reloadTextures();
-
-   //Update lighting
-   // Set the light manager.  This should do nothing 
-   // if its already set or if its not compatible.   
-   //setLightManager( $pref::lightManager );   
-   
-   PostFXManager.settingsEffectSetEnabled("SSAO", $pref::PostFX::EnableSSAO);
-   PostFXManager.settingsEffectSetEnabled("HDR", $pref::PostFX::EnableHDR);
-   PostFXManager.settingsEffectSetEnabled("DOF", $pref::PostFX::EnableDOF);
-   PostFXManager.settingsEffectSetEnabled("LightRays", $pref::PostFX::EnableLightRays);
-   PostFXManager.settingsEffectSetEnabled("Vignette", $pref::PostFX::EnableVignette);
-
-   if (  %canvasUpdate )
-   {
-      // Change the video mode.   
-      configureCanvas();
-   }
-   
-   echo("Exporting client prefs");
-   %prefPath = getPrefpath();
-   export("$pref::*", %prefPath @ "/clientPrefs.cs", false);
-}
-
-function GraphicsMenu::loadSettings()
-{
-   OptionsMenu.currentMenu = "GraphicsMenu";
-   OptionsSettingStack.clear();
-   
-   OptionsMenu.addSettingOption(OptionsSettingStack, "Shadow Quality", "", "ShadowQuality");
-   //OptionsMenu.addSettingOption(OptionsSettingStack, "Shadow Caching", "", "ShadowCaching");
-   OptionsMenu.addSettingOption(OptionsSettingStack, "Soft Shadows", "", "SoftShadow");
-   
-   OptionsMenu.addSettingOption(OptionsSettingStack, "Model Detail", "", "MeshQuality");
-   OptionsMenu.addSettingOption(OptionsSettingStack, "Texture Detail", "", "TextureQuality");
-   OptionsMenu.addSettingOption(OptionsSettingStack, "Terrain Detail", "", "TerrainQuality");
-   OptionsMenu.addSettingOption(OptionsSettingStack, "Decal Lifetime", "", "DecalLifetime");
-   OptionsMenu.addSettingOption(OptionsSettingStack, "Ground Clutter Density", "", "GroundCoverDensity");
-   
-   OptionsMenu.addSettingOption(OptionsSettingStack, "Material Quality", "", "ShaderQuality");
-   OptionsMenu.addSettingOption(OptionsSettingStack, "Parallax", "", "ParallaxSetting");
-   OptionsMenu.addSettingOption(OptionsSettingStack, "Ambient Occlusion", "", "AmbientOcclusionSetting");
-   OptionsMenu.addSettingOption(OptionsSettingStack, "Light Rays", "", "LightRaysSetting");
-   OptionsMenu.addSettingOption(OptionsSettingStack, "Depth of Field", "", "DOFSetting");
-   OptionsMenu.addSettingOption(OptionsSettingStack, "Vignetting", "", "VignetteSetting");
-   OptionsMenu.addSettingOption(OptionsSettingStack, "Water Reflections", "", "WaterReflectionSetting");
-   OptionsMenu.addSettingOption(OptionsSettingStack, "Anti Aliasing", "", "AASetting");
-   OptionsMenu.addSettingOption(OptionsSettingStack, "Anisotropic Filtering", "", "AnisotropicFilteringSetting");
-   
-   GraphicsSettingsCache.empty();
-}
-
-function GraphicsMenu::set(%var, %val)
-{
-   %ex = GraphicsSettingsCache.getIndexFromKey(%var);
-   if(%ex != -1)
-      GraphicsSettingsCache.erase(%ex);
-      
-   GraphicsSettingsCache.add(%var, %val);
-}
-
-//
-//
-//
-function MeshQuality::set(%setting)
-{
-   switch$(%setting)
-   {
-      case "High":
-         GraphicsMenu::set("$pref::TS::detailAdjust", "1.5");
-         GraphicsMenu::set("$pref::TS::skipRenderDLs", "0");
-      case "Medium":
-         GraphicsMenu::set("$pref::TS::detailAdjust", "1.0");
-         GraphicsMenu::set("$pref::TS::skipRenderDLs", "0");
-      case "Low":
-         GraphicsMenu::set("$pref::TS::detailAdjust", "0.75");
-         GraphicsMenu::set("$pref::TS::skipRenderDLs", "0");
-      case "Lowest":
-         GraphicsMenu::set("$pref::TS::detailAdjust", "0.5");
-         GraphicsMenu::set("$pref::TS::skipRenderDLs", "0");
-      default:
-         GraphicsMenu::set("$pref::TS::detailAdjust", "1.0");
-         GraphicsMenu::set("$pref::TS::skipRenderDLs", "0");
-   }
-}
-
-function MeshQuality::get()
-{
-   if($pref::TS::detailAdjust == 1.5)
-      return "High";
-   else if($pref::TS::detailAdjust == 1.0)
-      return "Medium";
-   else if($pref::TS::detailAdjust == 0.75)
-      return "Low";
-   else if($pref::TS::detailAdjust == 0.5)
-      return "Lowest";
-   else
-      return "Custom";
-}
-
-function MeshQuality::getList()
-{
-   return "Lowest,Low,Medium,High";
-}
-
-//
-function TextureQuality::set(%setting)
-{
-   switch$(%setting)
-   {
-      case "High":
-         GraphicsMenu::set("$pref::Video::textureReductionLevel", "0");
-         GraphicsMenu::set("$pref::Reflect::refractTexScale", "1.25");
-      case "Medium":
-         GraphicsMenu::set("$pref::Video::textureReductionLevel", "0");
-         GraphicsMenu::set("$pref::Reflect::refractTexScale", "1");
-      case "Low":
-         GraphicsMenu::set("$pref::Video::textureReductionLevel", "1");
-         GraphicsMenu::set("$pref::Reflect::refractTexScale", "0.75");
-      case "Lowest":
-         GraphicsMenu::set("$pref::Video::textureReductionLevel", "2");
-         GraphicsMenu::set("$pref::Reflect::refractTexScale", "0.5");
-      default:
-         GraphicsMenu::set("$pref::Video::textureReductionLevel", "0");
-         GraphicsMenu::set("$pref::Reflect::refractTexScale", "1");
-   }
-}
-
-function TextureQuality::get()
-{
-   if($pref::Video::textureReductionLevel == 0 && $pref::Reflect::refractTexScale == 1.25)
-      return "High";
-   else if($pref::Video::textureReductionLevel == 0 && $pref::Reflect::refractTexScale == 1)
-      return "Medium";
-   else if($pref::Video::textureReductionLevel == 1 && $pref::Reflect::refractTexScale == 0.75)
-      return "Low";
-   else if($pref::Video::textureReductionLevel == 2 && $pref::Reflect::refractTexScale == 0.5)
-      return "Lowest";
-   else
-      return "Custom";
-}
-
-function TextureQuality::getList()
-{
-   return "Lowest,Low,Medium,High";
-}
-
-//
-function GroundCoverDensity::set(%setting)
-{
-   switch$(%setting)
-   {
-      case "High":
-         GraphicsMenu::set("$pref::GroundCover::densityScale", "1");
-      case "Medium":
-         GraphicsMenu::set("$pref::GroundCover::densityScale", "0.75");
-      case "Low":
-         GraphicsMenu::set("$pref::GroundCover::densityScale", "0.5");
-      case "Lowest":
-         GraphicsMenu::set("$pref::GroundCover::densityScale", "0.25");
-      default:
-         GraphicsMenu::set("$pref::GroundCover::densityScale", "0.75");
-   }
-}
-
-function GroundCoverDensity::get()
-{
-   if($pref::GroundCover::densityScale == 1)
-      return "High";
-   else if($pref::GroundCover::densityScale == 0.75)
-      return "Medium";
-   else if($pref::GroundCover::densityScale == 0.5)
-      return "Low";
-   else if($pref::GroundCover::densityScale == 0.25)
-      return "Lowest";
-   else
-      return "Custom";
-}
-
-function GroundCoverDensity::getList()
-{
-   return "Lowest,Low,Medium,High";
-}
-
-//
-function DecalLifetime::set(%setting)
-{
-   switch$(%setting)
-   {
-      case "High":
-         GraphicsMenu::set("$pref::decalMgr::enabled", "true");
-         GraphicsMenu::set("$pref::Decals::lifeTimeScale", "1");
-      case "Medium":
-         GraphicsMenu::set("$pref::decalMgr::enabled", "true");
-         GraphicsMenu::set("$pref::Decals::lifeTimeScale", "0.5");
-      case "Low":
-         GraphicsMenu::set("$pref::decalMgr::enabled", "true");
-         GraphicsMenu::set("$pref::Decals::lifeTimeScale", "0.25");
-      case "None":
-         GraphicsMenu::set("$pref::decalMgr::enabled", "false");
-      default:
-         GraphicsMenu::set("$pref::decalMgr::enabled", "true");
-         GraphicsMenu::set("$pref::Decals::lifeTimeScale", "0.5");
-   }
-}
-
-function DecalLifetime::get()
-{
-   if($pref::decalMgr::enabled == true && $pref::Decals::lifeTimeScale == 1)
-      return "High";
-   else if($pref::decalMgr::enabled == true && $pref::Decals::lifeTimeScale == 0.5)
-      return "Medium";
-   else if($pref::decalMgr::enabled == true && $pref::Decals::lifeTimeScale == 0.25)
-      return "Low";
-   else if($pref::decalMgr::enabled == true )
-      return "None";
-   else
-      return "Custom";
-}
-
-function DecalLifetime::getList()
-{
-   return "None,Low,Medium,High";
-}
-
-//
-function TerrainQuality::set(%setting)
-{
-   switch$(%setting)
-   {
-      case "High":
-         GraphicsMenu::set("$pref::Terrain::lodScale", "0.75");
-         GraphicsMenu::set("$pref::Terrain::detailScale", "1.5");
-      case "Medium":
-         GraphicsMenu::set("$pref::Terrain::lodScale", "1");
-         GraphicsMenu::set("$pref::Terrain::detailScale", "1");
-      case "Low":
-         GraphicsMenu::set("$pref::Terrain::lodScale", "1.5");
-         GraphicsMenu::set("$pref::Terrain::detailScale", "0.75");
-      case "Lowest":
-         GraphicsMenu::set("$pref::Terrain::lodScale", "2");
-         GraphicsMenu::set("$pref::Terrain::detailScale", "0.5");
-      default:
-         GraphicsMenu::set("$pref::decalMgr::enabled", "1");
-         GraphicsMenu::set("$pref::Decals::lifeTimeScale", "1");
-   }
-}
-
-function TerrainQuality::get()
-{
-   if($pref::Terrain::lodScale == 0.75 && $pref::Terrain::detailScale == 1.5)
-      return "High";
-   else if($pref::Terrain::lodScale == 1 && $pref::Terrain::detailScale == 1)
-      return "Medium";
-   else if($pref::Terrain::lodScale == 1.5 && $pref::Terrain::detailScale == 0.75)
-      return "Low";
-   else if($pref::Terrain::lodScale == 2 && $pref::Terrain::detailScale == 0.5)
-      return "Lowest";
-   else
-      return "Custom";
-}
-
-function TerrainQuality::getList()
-{
-   return "Lowest,Low,Medium,High";
-}
-
-//
-function ShadowQuality::set(%setting)
-{
-   switch$(%setting)
-   {
-      case "High":
-         GraphicsMenu::set("$pref::Shadows::disable", "false");
-         GraphicsMenu::set("$pref::Shadows::textureScalar", "1.0");
-      case "Medium":
-         GraphicsMenu::set("$pref::Shadows::disable", "false");
-         GraphicsMenu::set("$pref::Shadows::textureScalar", "0.5");
-      case "Low":
-         GraphicsMenu::set("$pref::Shadows::disable", "false");
-         GraphicsMenu::set("$pref::Shadows::textureScalar", "0.25");
-      case "None":
-         GraphicsMenu::set("$pref::Shadows::disable", "true");
-         GraphicsMenu::set("$pref::Shadows::textureScalar", "0.5");
-      default:
-         GraphicsMenu::set("$pref::Shadows::disable", "false");
-         GraphicsMenu::set("$pref::Shadows::textureScalar", "0.5");
-   }
-}
-
-function ShadowQuality::get()
-{
-   if($pref::Shadows::disable == false && $pref::Shadows::textureScalar == 1.0)
-      return "High";
-   else if($pref::Shadows::disable == false && $pref::Shadows::textureScalar == 0.5)
-      return "Medium";
-   else if($pref::Shadows::disable == false && $pref::Shadows::textureScalar == 0.25)
-      return "Low";
-   else if($pref::Shadows::disable == true)
-      return "None";
-   else
-      return "Custom";
-}
-
-function ShadowQuality::getList()
-{
-   return "None,Low,Medium,High";
-}
-
-//
-function ShadowDistance::set(%setting)
-{
-   switch$(%setting)
-   {
-      case "Highest":
-         GraphicsMenu::set("$pref::Shadows::drawDistance", "1.0");
-      case "High":
-         GraphicsMenu::set("$pref::Shadows::drawDistance", "0.75");
-      case "Medium":
-         GraphicsMenu::set("$pref::Shadows::drawDistance", "0.5");
-      case "Low":
-         GraphicsMenu::set("$pref::Shadows::drawDistance", "0.25");
-      default:
-         GraphicsMenu::set("$pref::Shadows::drawDistance", "0.5");
-   }
-}
-
-function ShadowDistance::get()
-{
-   if($pref::Shadows::drawDistance == 1.0)
-      return "Highest";
-   else if($pref::Shadows::drawDistance == 0.75)
-      return "High";
-   else if($pref::Shadows::drawDistance == 0.5)
-      return "Medium";
-   else if($pref::Shadows::drawDistance == 0.25)
-      return "Low";
-   else
-      return "Custom";
-}
-
-function ShadowDistance::getList()
-{
-   return "Low,Medium,High,Highest";
-}
-
-//
-function SoftShadow::set(%setting)
-{
-   switch$(%setting)
-   {
-      case "High":
-         GraphicsMenu::set("$pref::Shadows::filterMode", "SoftShadowHighQuality");
-      case "Low":
-         GraphicsMenu::set("$pref::Shadows::filterMode", "SoftShadow");
-      case "Off":
-         GraphicsMenu::set("$pref::Shadows::filterMode", "None");
-      default:
-         GraphicsMenu::set("$pref::Shadows::filterMode", "SoftShadow");
-   }
-}
-
-function SoftShadow::get()
-{
-   if($pref::Shadows::filterMode $= "SoftShadowHighQuality")
-      return "High";
-   else if($pref::Shadows::filterMode $= "SoftShadow")
-      return "Low";
-   else if($pref::Shadows::filterMode $= "None")
-      return "Off";
-   else
-      return "Custom";
-}
-
-function SoftShadow::getList()
-{
-   return "Off,Low,High";
-}
-
-//
-function LightDistance::set(%setting)
-{
-   switch$(%setting)
-   {
-      case "High":
-         GraphicsMenu::set("$pref::Lights::drawDistance", "1");
-      case "Medium":
-         GraphicsMenu::set("$pref::Lights::drawDistance", "0.75");
-      case "Low":
-         GraphicsMenu::set("$pref::Lights::drawDistance", "0.5");
-      case "Lowest":
-         GraphicsMenu::set("$pref::Lights::drawDistance", "0.25");
-      default:
-         GraphicsMenu::set("$pref::Lights::drawDistance", "0.75");
-   }
-}
-
-function LightDistance::get()
-{
-   if($pref::Lights::drawDistance == 1)
-      return "High";
-   else if($pref::Lights::drawDistance == 0.75)
-      return "Medium";
-   else if($pref::Lights::drawDistance == 0.5)
-      return "Low";
-   else if($pref::Lights::drawDistance == 0.25)
-      return "Lowest";
-   else
-      return "Custom";
-}
-
-function LightDistance::getList()
-{
-   return "Lowest,Low,Medium,High";
-}
-
-//
-function ShaderQuality::set(%setting)
-{
-   switch$(%setting)
-   {
-      case "High":
-         GraphicsMenu::set("$pref::Video::disablePixSpecular", "false");
-         GraphicsMenu::set("$pref::Video::disableNormalmapping", "false");
-      case "Low":
-         GraphicsMenu::set("$pref::Video::disablePixSpecular", "true");
-         GraphicsMenu::set("$pref::Video::disableNormalmapping", "true");
-      default:
-         GraphicsMenu::set("$pref::Video::disablePixSpecular", "false");
-         GraphicsMenu::set("$pref::Video::disableNormalmapping", "false");
-   }
-}
-
-function ShaderQuality::get()
-{
-   if($pref::Video::disablePixSpecular == false || $pref::Video::disableNormalmapping == false)
-      return "High";
-   else if($pref::Video::disablePixSpecular == true || $pref::Video::disableNormalmapping == true)
-      return "Low";
-   else
-      return "Custom";
-}
-
-function ShaderQuality::getList()
-{
-   return "Low,High";
-}
-
-//
-function ShadowCaching::set(%setting)
-{
-   switch$(%setting)
-   {
-      case "On":
-         GraphicsMenu::set("$pref::Shadows::useShadowCaching", "true");
-      case "Off":
-         GraphicsMenu::set("$pref::Shadows::useShadowCaching", "false");
-      default:
-         GraphicsMenu::set("$pref::Shadows::useShadowCaching", "true");
-   }
-}
-
-function ShadowCaching::get()
-{
-   if($pref::Shadows::useShadowCaching == true)
-      return "On";
-   else 
-      return "Off";
-}
-
-function ShadowCaching::getList()
-{
-   return "Off,On";
-}
-
-//
-function ParallaxSetting::set(%setting)
-{
-   switch$(%setting)
-   {
-      case "On":
-         GraphicsMenu::set("$pref::Video::disableParallaxMapping", "false");
-      case "Off":
-         GraphicsMenu::set("$pref::Video::disableParallaxMapping", "true");
-      default:
-         GraphicsMenu::set("$pref::Video::disableParallaxMapping", "false");
-   }
-}
-
-function ParallaxSetting::get()
-{
-   if($pref::Video::disableParallaxMapping == false)
-      return "On";
-   else 
-      return "Off";
-}
-
-function ParallaxSetting::getList()
-{
-   return "Off,On";
-}
-
-//
-function AmbientOcclusionSetting::set(%setting)
-{
-   switch$(%setting)
-   {
-      case "On":
-         GraphicsMenu::set("$pref::PostFX::EnableSSAO", "true");
-      case "Off":
-         GraphicsMenu::set("$pref::PostFX::EnableSSAO", "false");
-      default:
-         GraphicsMenu::set("$pref::PostFX::EnableSSAO", "true");
-   }
-}
-
-function AmbientOcclusionSetting::get()
-{
-   if($pref::PostFX::EnableSSAO == true)
-      return "On";
-   else 
-      return "Off";
-}
-
-function AmbientOcclusionSetting::getList()
-{
-   return "Off,On";
-}
-
-//
-function LightRaysSetting::set(%setting)
-{
-   switch$(%setting)
-   {
-      case "On":
-         GraphicsMenu::set("$pref::PostFX::EnableLightRays", "true");
-      case "Off":
-         GraphicsMenu::set("$pref::PostFX::EnableLightRays", "false");
-      default:
-         GraphicsMenu::set("$pref::PostFX::EnableLightRays", "true");
-   }
-}
-
-function LightRaysSetting::get()
-{
-   if($pref::PostFX::EnableLightRays == true)
-      return "On";
-   else 
-      return "Off";
-}
-
-function LightRaysSetting::getList()
-{
-   return "Off,On";
-}
-
-//
-function DOFSetting::set(%setting)
-{
-   switch$(%setting)
-   {
-      case "On":
-         GraphicsMenu::set("$pref::PostFX::EnableDOF", "true");
-      case "Off":
-         GraphicsMenu::set("$pref::PostFX::EnableDOF", "false");
-      default:
-         GraphicsMenu::set("$pref::PostFX::EnableDOF", "true");
-   }
-}
-
-function DOFSetting::get()
-{
-   if($pref::PostFX::EnableLightRays == true)
-      return "On";
-   else 
-      return "Off";
-}
-
-function DOFSetting::getList()
-{
-   return "Off,On";
-}
-
-//
-function WaterReflectionSetting::set(%setting)
-{
-   switch$(%setting)
-   {
-      case "On":
-         GraphicsMenu::set("$pref::Water::disableTrueReflections", "false");
-      case "Off":
-         GraphicsMenu::set("$pref::Water::disableTrueReflections", "true");
-      default:
-         GraphicsMenu::set("$pref::Water::disableTrueReflections", "false");
-   }
-}
-
-function WaterReflectionSetting::get()
-{
-   if($pref::Water::disableTrueReflections == false)
-      return "On";
-   else 
-      return "Off";
-}
-
-function WaterReflectionSetting::getList()
-{
-   return "Off,On";
-}
-
-//
-function VignetteSetting::set(%setting)
-{
-   switch$(%setting)
-   {
-      case "On":
-         GraphicsMenu::set("$pref::PostFX::EnableVignette", "true");
-      case "Off":
-         GraphicsMenu::set("$pref::PostFX::EnableVignette", "false");
-      default:
-         GraphicsMenu::set("$pref::PostFX::EnableVignette", "true");
-   }
-}
-
-function VignetteSetting::get()
-{
-   if($pref::PostFX::EnableVignette == true)
-      return "On";
-   else 
-      return "Off";
-}
-
-function VignetteSetting::getList()
-{
-   return "Off,On";
-}
-
-//
-function AASetting::set(%setting)
-{
-   switch$(%setting)
-   {
-      case "4x":
-         GraphicsMenu::set("$pref::Video::AA", "4");
-      case "2x":
-         GraphicsMenu::set("$pref::Video::AA", "2");
-      case "1x":
-         GraphicsMenu::set("$pref::Video::AA", "1");
-      case "Off":
-         GraphicsMenu::set("$pref::Video::AA", "0");
-      default:
-         GraphicsMenu::set("$pref::Video::AA", "0");
-   }
-}
-
-function AASetting::get()
-{
-   if($pref::Video::AA == 4)
-      return "4x";
-   else if($pref::Video::AA == 2)
-      return "2x";
-   else if($pref::Video::AA == 1)
-      return "1x";
-   else if($pref::Video::AA == 0)
-      return "Off";
-   else
-      return "Custom";
-}
-
-function AASetting::getList()
-{
-   return "Off,1x,2x,4x";
-}
-
-//
-function AnisotropicFilteringSetting::set(%setting)
-{
-   switch$(%setting)
-   {
-      case "16x":
-         GraphicsMenu::set("$pref::Video::defaultAnisotropy", "16");
-      case "8x":
-         GraphicsMenu::set("$pref::Video::defaultAnisotropy", "8");
-      case "4x":
-         GraphicsMenu::set("$pref::Video::defaultAnisotropy", "4");
-      case "Off":
-         GraphicsMenu::set("$pref::Video::defaultAnisotropy", "0");
-      default:
-         GraphicsMenu::set("$pref::Video::defaultAnisotropy", "0");
-   }
-}
-
-function AnisotropicFilteringSetting::get()
-{
-   if($pref::Video::defaultAnisotropy == 16)
-      return "16x";
-   else if($pref::Video::defaultAnisotropy == 8)
-      return "8x";
-   else if($pref::Video::defaultAnisotropy == 4)
-      return "4x";
-   else if($pref::Video::defaultAnisotropy == 0)
-      return "Off";
-   else
-      return "Custom";
-}
-
-function AnisotropicFilteringSetting::getList()
-{
-   return "Off,4x,8x,16x";
-}

+ 347 - 0
Templates/BaseGame/game/data/ui/scripts/menuInputButtons.cs

@@ -0,0 +1,347 @@
+//==============================================================================
+// Menu Input Buttons
+// This file manages the Menu Input Buttons stuff
+// Any time you have a GUI button that should be clickable AND map to a key input
+// such as a gamepad button, or enter, etc, this stuff can be used
+//==============================================================================
+/*
+Gamepad input reference for 360 controller
+btn_a = A
+btn_b = B
+btn_x = X
+btn_y = Y
+btn_r = Right Bumper
+btn_l = Right Bumper
+upov = Dpad Up
+dpov = Dpad Down
+lpov = Dpad Left
+rpov = Dpad Right
+xaxis = Left Stick | + values = up, - values = down
+yaxis = Left Stick | + values = up, - values = down
+rxaxis = Right Stick | + values = up, - values = down
+ryaxis = Right Stick | + values = up, - values = down
+zaxis = Left Trigger
+rzaxis = Right Trigger
+btn_start = Start
+btn_back = Back/Select
+*/
+
+/// This is used with the main UI menu lists, when a non-axis input event is called
+/// such as pressing a button
+/// It is called from the engine
+function UIMenuButtonList::onInputEvent(%this, %device, %action, %state)
+{
+   if(%state)
+      $activeMenuButtonContainer.processInputs(%device, %action);
+}
+
+/// This is used with the main UI menu lists, when an axis input event is called
+/// such as moving a joystick
+/// It is called from the engine
+function UIMenuButtonList::onAxisEvent(%this, %device, %action, %axisVal)
+{
+   //Skip out of the value is too low as it could just be noise or miscalibrated defaults
+   if(%axisVal < 0.02)
+      return;
+      
+   $activeMenuButtonContainer.processAxisEvent(%device, %action);
+}
+
+/// Sets the command and text for the specified button. If %text and %command
+/// are left empty, the button will be disabled and hidden.
+///
+/// \param %gamepadButton (string) The button to set for when using gamepad input. See the input map reference comment at the top of the file
+/// \param %keyboardButton (string) The button to set for when using keyboard/mouse input.
+/// \param %text (string) The text to display next to the A button graphic.
+/// \param %command (string) The command executed when the A button is pressed.
+/// \param %gamepadOnly (bool) If true, will only show the button when working in the gamepad input mode
+function MenuInputButton::set(%this, %gamepadButton, %keyboardButton, %text, %command, %gamepadOnly)
+{
+   %set = (! ((%text $= "") && (%command $= "")));
+   %this.setText(%text);
+   %this.setActive(%set);
+   %this.setVisible(%set);
+   
+   %this.gamepadButton = %gamepadButton;
+   %this.keyboardButton = %keyboardButton;
+   
+   if(%gamepadOnly $= "")
+      %gamepadOnly = false;
+      
+   %this.gamepadOnly = %gamepadOnly;
+
+   %this.Command = %command;
+}
+
+/// Refreshes the specific button, updating it's visbility status and the displayed input image
+function MenuInputButton::refresh(%this)
+{
+   %set = (! ((%this.text $= "") && (%this.command $= "")));
+   
+   //Special-case of where we're in keyboard+mouse mode, but the menubutton is gamepad only mode, so we early out
+   if(%this.gamepadOnly && $activeControllerType !$= "gamepad")
+      %set = false;
+      
+   %this.setActive(%set);
+   %this.setVisible(%set);
+   
+   if(!%this.isActive())
+      return;
+   
+   if($activeControllerType $= "gamepad")
+   {
+      if(%this.gamepadButton !$= "")
+      {
+         %path = "";
+         if($activeControllerName $= "PS4 Controller")
+         { 
+            %path = "data/ui/images/inputs/PS4/PS4_";
+            
+            if(%this.gamepadButton $= "btn_a")
+               %path = %path @ "Cross";
+            else if(%this.gamepadButton $= "btn_b")
+               %path = %path @ "Circle";
+            else if(%this.gamepadButton $= "btn_x")
+               %path = %path @ "Square";
+            else if(%this.gamepadButton $= "btn_y")
+               %path = %path @ "Triangle";
+            else if(%this.gamepadButton $= "btn_l")
+               %path = %path @ "L1";
+            else if(%this.gamepadButton $= "zaxis")
+               %path = %path @ "L2";
+            else if(%this.gamepadButton $= "btn_r")
+               %path = %path @ "R1";
+            else if(%this.gamepadButton $= "rzaxis")
+               %path = %path @ "R2";
+            else if(%this.gamepadButton $= "btn_start")
+               %path = %path @ "Options";
+            else if(%this.gamepadButton $= "btn_back")
+               %path = %path @ "Share";
+            else      
+               continue;
+         }
+         else if($activeControllerName $= "Nintendo Switch Pro Controller")
+         {
+            %path = "data/ui/images/inputs/Switch/Switch_";
+            
+            if(%this.gamepadButton $= "btn_a")
+               %path = %path @ "B";
+            else if(%this.gamepadButton $= "btn_b")
+               %path = %path @ "A";
+            else if(%this.gamepadButton $= "btn_x")
+               %path = %path @ "Y";
+            else if(%this.gamepadButton $= "btn_y")
+               %path = %path @ "X";
+            else if(%this.gamepadButton $= "btn_l")
+               %path = %path @ "LB";
+            else if(%this.gamepadButton $= "zaxis")
+               %path = %path @ "LT";
+            else if(%this.gamepadButton $= "btn_r")
+               %path = %path @ "RB";
+            else if(%this.gamepadButton $= "rzaxis")
+               %path = %path @ "RT";
+            else if(%this.gamepadButton $= "btn_start")
+               %path = %path @ "Plus";
+            else if(%this.gamepadButton $= "btn_back")
+               %path = %path @ "Minus";
+            else      
+               continue;
+         }
+         else if($activeControllerName !$= "")
+         {
+            %path = "data/ui/images/inputs/Xbox/Xbox_";
+            
+            if(%this.gamepadButton $= "btn_a")
+               %path = %path @ "A";
+            else if(%this.gamepadButton $= "btn_b")
+               %path = %path @ "B";
+            else if(%this.gamepadButton $= "btn_x")
+               %path = %path @ "X";
+            else if(%this.gamepadButton $= "btn_y")
+               %path = %path @ "Y";
+            else if(%this.gamepadButton $= "btn_l")
+               %path = %path @ "LB";
+            else if(%this.gamepadButton $= "zaxis")
+               %path = %path @ "LT";
+            else if(%this.gamepadButton $= "btn_r")
+               %path = %path @ "RB";
+            else if(%this.gamepadButton $= "rzaxis")
+               %path = %path @ "RT";
+            else if(%this.gamepadButton $= "btn_start")
+               %path = %path @ "Menu";
+            else if(%this.gamepadButton $= "btn_back")
+               %path = %path @ "Windows";
+            else      
+               continue;
+         }
+      } 
+   }
+   else
+   {
+      if(%this.keyboardButton !$= "")
+      {
+         %path = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_" @ %this.keyboardButton;
+      }
+   }
+   
+   %this.setBitmap(%path);
+
+   return true;
+}
+
+/// Refreshes a menu input container, updating the buttons inside it
+function MenuInputButtonContainer::refresh(%this)
+{
+   %count = %this.getCount();
+   for(%i=0; %i < %count; %i++)
+   {
+      %btn = %this.getObject(%i);
+      
+      %btn.refresh();
+   }
+}
+
+/// Sets the given MenuInputButtonContainer as the active one. This directs input events
+/// to it's buttons, ensures it's visible, and auto-hides the old active container if it was set
+function MenuInputButtonContainer::setActive(%this)
+{
+   if(isObject($activeMenuButtonContainer))
+      $activeMenuButtonContainer.hidden = true;
+      
+   $activeMenuButtonContainer = %this;
+   $activeMenuButtonContainer.hidden = false;
+   $activeMenuButtonContainer.refresh();
+}
+
+/// Checks the input manager for if we have a gamepad active and gets it's name
+/// If we have one, also sets the active input type to gamepad
+function MenuInputButtonContainer::checkGamepad(%this)
+{
+   %controllerName = SDLInputManager::JoystickNameForIndex(0);
+   
+   $activeControllerName = %controllerName;
+   
+   if($activeControllerName $= "")
+      $activeControllerType = "K&M";
+   else
+      $activeControllerType = "gamepad";     
+}
+   
+/// This is called by the earlier inputs callback that comes from the menu list
+/// this allows us to first check what the input type is, and if the device is different
+/// (such as going from keyboard and mouse to gamepad) we can refresh the buttons to update
+/// the display
+/// Then we process the input to see if it matches to any of the button maps for our 
+/// MenuInputButtons. If we have a match, we execute it's command.
+function MenuInputButtonContainer::processInputs(%this, %device, %action)
+{
+   //check to see if our status has changed
+   %changed = false;
+   
+   %oldDevice = $activeControllerName;
+   
+   %deviceName = stripTrailingNumber(%device);
+   
+   if(%deviceName $= "keyboard" || %deviceName $= "mouse")
+   {
+      if($activeControllerName !$= "K&M")
+         %changed = true;
+         
+      $activeControllerName = "K&M";
+      $activeControllerType = "K&M";
+      Canvas.showCursor();
+   }
+   else
+   {
+      if(%this.checkGamepad())
+      {
+         Canvas.hideCursor();
+      }
+      
+      if($activeControllerType !$= %oldDevice)
+         %changed = true;
+   }
+   
+   if(%changed)
+      %this.refresh();
+      
+   //Now process the input for the button accelerator, if applicable
+   //Set up our basic buttons
+   for(%i=0; %i < %this.getCount(); %i++)
+   {
+      %btn = %this.getObject(%i);
+      
+      if(!%btn.isActive())
+         continue;
+      
+      if($activeControllerType !$= "K&M")
+      {
+         if(%btn.gamepadButton $= %action)
+         {
+            eval(%btn.command);
+         }
+      }
+      else
+      {
+         if(%btn.keyboardButton $= %action)
+         {
+            eval(%btn.command);
+         }
+      }
+   }
+}
+
+/// This is called by the earlier inputs callback that comes from the menu list
+/// this allows us to first check what the input type is, and if the device is different
+/// (such as going from keyboard and mouse to gamepad) we can refresh the buttons to update
+/// the display
+function MenuInputButtonContainer::processAxisEvent(%this, %device, %action, %axisVal)
+{
+   //check to see if our status has changed
+   %changed = false;
+   
+   %oldDevice = $activeControllerName;
+   
+   %deviceName = stripTrailingNumber(%device);
+   
+   if(%deviceName $= "mouse")
+   {
+      if($activeControllerName !$= "K&M")
+         %changed = true;
+         
+      $activeControllerName = "K&M";
+      $activeControllerType = "K&M";
+      Canvas.showCursor();
+   }
+   else
+   {
+      if(%this.checkGamepad())
+      {
+         Canvas.hideCursor();
+      }
+      
+      if($activeControllerType !$= %oldDevice)
+         %changed = true;
+   }
+   
+   if(%changed)
+      %this.refresh();
+}
+
+//
+//
+function onSDLDeviceConnected(%sdlIndex, %deviceName, %deviceType)
+{
+   /*if(GamepadButtonsGui.checkGamepad())
+   {
+      GamepadButtonsGui.hidden = false;  
+   }*/
+}
+
+function onSDLDeviceDisconnected(%sdlIndex)
+{
+   /*if(!GamepadButtonsGui.checkGamepad())
+   {
+      GamepadButtonsGui.hidden = true;
+   }*/   
+}

+ 40 - 27
Templates/BaseGame/game/data/ui/scripts/messageBoxes.cs

@@ -44,9 +44,6 @@ new SFXProfile(messageBoxBeep)
 //---------------------------------------------------------------------------------------------
 function messageCallback(%dlg, %callback)
 {
-   MessageBoxDlg.originalMenubuttonContainer.add(GamepadButtonsGui);
-   MessageBoxDlg.originalMenubuttonContainer.refresh();
-   
    Canvas.popDialog(%dlg);
    eval(%callback);
 }
@@ -85,6 +82,10 @@ function MBSetText(%text, %frame, %msg)
    //sfxPlayOnce( messageBoxBeep );
 }
 
+function MessageBoxCtrl::onWake(%this)
+{
+}
+
 //---------------------------------------------------------------------------------------------
 // Various message box display functions. Each one takes a window title, a message, and a
 // callback for each button.
@@ -96,12 +97,14 @@ function MessageBoxOK(%title, %message, %callback)
    Canvas.pushDialog(MessageBoxDlg);
    MessageBoxTitleText.text = %title;
    
-   MessageBoxDlg.originalMenubuttonContainer = GamepadButtonsGui.getParent();
+   MessageBoxOCButtonHolder.hidden = true;
+   MessageBoxYNCButtonHolder.hidden = true;
+   MessageBoxOKButtonHolder.hidden = false;
    
-   MessageBoxButtonHolder.add(GamepadButtonsGui);
-   GamepadButtonsGui.clearButtons();
-   GamepadButtonsGui.setButton(7, "A", "", "OK", "MessageCallback(MessageBoxDlg,MessageBoxDlg.callback);");
-   GamepadButtonsGui.refreshButtons();
+   MessageBoxOKButtonHolder-->OKButton.set("btn_a", "Return", "OK", "MessageCallback(MessageBoxDlg,MessageBoxDlg.callback);");
+   
+   MessageBoxCtrl.originalMenuInputContainer = $activeMenuButtonContainer;
+   MessageBoxOKButtonHolder.setActive();
    
    MBSetText(MessageBoxText, MessageBoxCtrl, %message);
    MessageBoxDlg.callback = %callback;
@@ -110,6 +113,7 @@ function MessageBoxOK(%title, %message, %callback)
 function MessageBoxOKDlg::onSleep( %this )
 {
    %this.callback = "";
+   MessageBoxCtrl.originalMenuInputContainer.setActive();
 }
 
 function MessageBoxOKCancel(%title, %message, %callback, %cancelCallback)
@@ -117,13 +121,15 @@ function MessageBoxOKCancel(%title, %message, %callback, %cancelCallback)
    Canvas.pushDialog(MessageBoxDlg);
    MessageBoxTitleText.text = %title;
    
-   MessageBoxDlg.originalMenubuttonContainer = GamepadButtonsGui.getParent();
+   MessageBoxOCButtonHolder.hidden = false;
+   MessageBoxYNCButtonHolder.hidden = true;
+   MessageBoxOKButtonHolder.hidden = true;
    
-   MessageBoxButtonHolder.add(GamepadButtonsGui);
-   GamepadButtonsGui.clearButtons();
-   GamepadButtonsGui.setButton(5, "A", "", "OK", "MessageCallback(MessageBoxDlg,MessageBoxDlg.callback);");
-   GamepadButtonsGui.setButton(6, "B", "", "Cancel", "MessageCallback(MessageBoxDlg,MessageBoxDlg.cancelCallback);");
-   GamepadButtonsGui.refreshButtons();
+   MessageBoxOCButtonHolder-->OKButton.set("btn_a", "Return", "OK", "MessageCallback(MessageBoxDlg,MessageBoxDlg.callback);");
+   MessageBoxOCButtonHolder-->CancelButton.set("btn_b", "Escape", "Cancel", "MessageCallback(MessageBoxDlg,MessageBoxDlg.cancelCallback);");
+
+   MessageBoxCtrl.originalMenuInputContainer = $activeMenuButtonContainer;
+   MessageBoxOCButtonHolder.setActive();
    
    MBSetText(MessageBoxText, MessageBoxCtrl, %message);
    MessageBoxDlg.callback = %callback;
@@ -133,6 +139,7 @@ function MessageBoxOKCancel(%title, %message, %callback, %cancelCallback)
 function MessageBoxOKCancelDlg::onSleep( %this )
 {
    %this.callback = "";
+   MessageBoxCtrl.originalMenuInputContainer.setActive();
 }
 
 function MessageBoxOKCancelDetails(%title, %message, %details, %callback, %cancelCallback)
@@ -204,6 +211,7 @@ function MBOKCancelDetailsToggleInfoFrame()
 function MessageBoxOKCancelDetailsDlg::onSleep( %this )
 {
    %this.callback = "";
+   MessageBoxCtrl.originalMenuInputContainer.setActive();
 }
 
 function MessageBoxYesNo(%title, %message, %yesCallback, %noCallback)
@@ -211,13 +219,15 @@ function MessageBoxYesNo(%title, %message, %yesCallback, %noCallback)
    Canvas.pushDialog(MessageBoxDlg);
    MessageBoxTitleText.text = %title;
    
-   MessageBoxDlg.originalMenubuttonContainer = GamepadButtonsGui.getParent();
+   MessageBoxOCButtonHolder.hidden = false;
+   MessageBoxYNCButtonHolder.hidden = true;
+   MessageBoxOKButtonHolder.hidden = true;
    
-   MessageBoxButtonHolder.add(GamepadButtonsGui);
-   GamepadButtonsGui.clearButtons();
-   GamepadButtonsGui.setButton(5, "A", "", "Yes", "MessageCallback(MessageBoxDlg,MessageBoxDlg.yesCallBack);");
-   GamepadButtonsGui.setButton(6, "B", "", "No", "MessageCallback(MessageBoxDlg,MessageBoxDlg.noCallback);");
-   GamepadButtonsGui.refreshButtons();
+   MessageBoxOCButtonHolder-->OKButton.set("btn_a", "Return", "Yes", "MessageCallback(MessageBoxDlg,MessageBoxDlg.yesCallBack);");
+   MessageBoxOCButtonHolder-->CancelButton.set("btn_b", "Escape", "No", "MessageCallback(MessageBoxDlg,MessageBoxDlg.noCallback);");
+   
+   MessageBoxCtrl.originalMenuInputContainer = $activeMenuButtonContainer;
+   MessageBoxOCButtonHolder.setActive();
    
    MBSetText(MessageBoxText, MessageBoxCtrl, %message);
    MessageBoxDlg.yesCallBack = %yesCallback;
@@ -229,14 +239,16 @@ function MessageBoxYesNoCancel(%title, %message, %yesCallback, %noCallback, %can
    Canvas.pushDialog(MessageBoxDlg);
    MessageBoxTitleText.text = %title;
    
-   MessageBoxDlg.originalMenubuttonContainer = GamepadButtonsGui.getParent();
+   MessageBoxOCButtonHolder.hidden = true;
+   MessageBoxYNCButtonHolder.hidden = false;
+   MessageBoxOKButtonHolder.hidden = true;
+   
+   MessageBoxYNCButtonHolder-->yesButton.set("btn_a", "Return", "Yes", "MessageCallback(MessageBoxDlg,MessageBoxDlg.yesCallBack);");
+   MessageBoxYNCButtonHolder-->noButton.set("btn_x", "backspace", "No", "MessageCallback(MessageBoxDlg,MessageBoxDlg.noCallback);");
+   MessageBoxYNCButtonHolder-->cancelButton.set("btn_b", "Escape", "No", "MessageCallback(MessageBoxDlg,MessageBoxDlg.cancelCallback);");
    
-   MessageBoxButtonHolder.add(GamepadButtonsGui);
-   GamepadButtonsGui.clearButtons();
-   GamepadButtonsGui.setButton(5, "A", "", "Yes", "MessageCallback(MessageBoxDlg,MessageBoxDlg.yesCallBack);");
-   GamepadButtonsGui.setButton(6, "B", "", "No", "MessageCallback(MessageBoxDlg,MessageBoxDlg.noCallback);");
-   GamepadButtonsGui.setButton(7, "Back", "", "Cancel", "MessageCallback(MessageBoxDlg,MessageBoxDlg.cancelCallback);");
-   GamepadButtonsGui.refreshButtons();
+   MessageBoxCtrl.originalMenuInputContainer = $activeMenuButtonContainer;
+   MessageBoxYNCButtonHolder.setActive();
    
    MBSetText(MessageBoxText, MessageBoxCtrl, %message);
    MessageBoxDlg.yesCallBack = %yesCallback;
@@ -251,6 +263,7 @@ function MessageBoxDlg::onSleep( %this )
    %this.yesCallback = "";
    %this.noCallback = "";
    %this.cancelCallback = "";
+   MessageBoxCtrl.originalMenuInputContainer.setActive();
 }
 
 //---------------------------------------------------------------------------------------------

+ 69 - 30
Templates/BaseGame/game/data/ui/scripts/profiles.cs

@@ -1,12 +1,20 @@
+$TextMediumEmphasisColor = "200 200 200";
+$TextHighEmphasisColor = "224 224 224";
+$TextDisabledColor = "108 108 108";
 
 new GuiGameListMenuProfile(DefaultListMenuProfile)
 {
    fontType = "Arial Bold";
    fontSize = 20;
-   fontColor = "120 120 120";
-   fontColorSEL = "16 16 16";
-   fontColorNA = "200 200 200";
-   fontColorHL = "100 100 120";
+   fontColor = $TextMediumEmphasisColor;
+   fontColorSEL = $TextMediumEmphasisColor;
+   fontColorNA = $TextDisabledColor;
+   fontColorHL = $TextMediumEmphasisColor;
+   
+   fillColor = "108 108 108";
+   fillColorHL = "140 140 140";
+   fillColorSEL = "180 180 180";
+   
    HitAreaUpperLeft = "16 20";
    HitAreaLowerRight = "503 74";
    IconOffset = "40 0";
@@ -40,7 +48,7 @@ new GuiControlProfile(MenuHeaderText)
 {
    fontType = "Arial Bold";
    fontSize = 30;
-   fontColor = "255 255 255";
+   fontColor = $TextHighEmphasisColor;
    justify = "left";
 };
 
@@ -48,7 +56,7 @@ new GuiControlProfile(MenuHeaderTextCenter)
 {
    fontType = "Arial Bold";
    fontSize = 30;
-   fontColor = "255 255 255";
+   fontColor = $TextHighEmphasisColor;
    justify = "center";
 };
 
@@ -56,7 +64,7 @@ new GuiControlProfile(MenuSubHeaderText)
 {
    fontType = "Arial Bold";
    fontSize = 20;
-   fontColor = "255 255 255";
+   fontColor = $TextMediumEmphasisColor;
    justify = "left";
 };
 
@@ -64,7 +72,7 @@ new GuiControlProfile(MenuMLSubHeaderText)
 {
    fontType = "Arial Bold";
    fontSize = 20;
-   fontColor = "255 255 255";
+   fontColor = $TextMediumEmphasisColor;
    justify = "left";
    autoSizeWidth = true;
    autoSizeHeight = true;  
@@ -74,23 +82,23 @@ if( !isObject( GuiMenuButtonProfile ) )
 new GuiControlProfile( GuiMenuButtonProfile )
 {
    opaque = true;
-   border = false;
+   border = true;
    fontSize = 18;
    fontType = "Arial Bold";
-   fontColor = "200 200 200";
-   fontColorHL = "80 80 80";
-   fontColorNA = "0 0 0";
-   fontColorSEL = "0 0 0";
-   fillColor = "255 255 255 120";
-   fillColorHL = "100 100 100 50";
-   fillColorNA = "0 0 0 50";
-   borderColor = "0 0 0 0";
-   borderColorNA = "0 0 0 0";
-   borderColorHL = "0 0 0 0";
+   fontColor = $TextMediumEmphasisColor;
+   fontColorHL = $TextMediumEmphasisColor;
+   fontColorNA = $TextDisabledColor;
+   fontColorSEL = $TextMediumEmphasisColor;
+   fillColor = "40 40 40";
+   fillColorHL = "56 56 56";
+   fillColorNA = "40 40 40";
+   borderColor = "87 87 87";
+   borderColorNA = "0 0 0";
+   borderColorHL = "255 255 255";
    fixedExtent = false;
    justify = "center";
    canKeyFocus = false;
-   bitmap = "data/ui/images/menu-button";
+   //bitmap = "data/ui/images/menu-button";
    hasBitmapArray = false;
    soundButtonDown = menuButtonPressed;
    soundButtonOver = menuButtonHover;
@@ -255,8 +263,13 @@ new GuiControlProfile( GuiBigTextProfile : GuiTextProfile )
 if( !isObject( GuiMLTextProfile ) )
 new GuiControlProfile( GuiMLTextProfile )
 {
+   fontColor = $TextMediumEmphasisColor;
+   fontColorHL = $TextMediumEmphasisColor;
+   fontColorSEL = $TextMediumEmphasisColor;
+   fontColorNA = $TextDisabledColor;
+   
    fontColorLink = "100 100 100";
-   fontColorLinkHL = "255 255 255";
+   fontColorLinkHL = $TextMediumEmphasisColor;
    autoSizeWidth = true;
    autoSizeHeight = true;  
    border = false;
@@ -267,7 +280,7 @@ if( !isObject( GuiMLWhiteTextProfile ) )
 new GuiControlProfile( GuiMLWhiteTextProfile )
 {
    fontColor = "220 220 220";
-   fontColorHL = "255 255 255";
+   fontColorHL = $TextMediumEmphasisColor;
    autoSizeWidth = true;
    autoSizeHeight = true;  
    border = false;
@@ -277,17 +290,43 @@ new GuiControlProfile( GuiMLWhiteTextProfile )
 if( !isObject( GuiTextArrayProfile ) )
 new GuiControlProfile( GuiTextArrayProfile : GuiTextProfile )
 {
-   fontColor = "250 250 250";
-   fontColorHL = " 0 0 0";
-   fontColorSEL = "0 0 0";
-   fillColor ="50 50 50";
-   fillColorHL = "125 125 125";
-   fillColorSEL = "180 180 180";
-   border = false;
+   fontColor = $TextMediumEmphasisColor;
+   fontColorHL = $TextMediumEmphasisColor;
+   fontColorSEL = $TextMediumEmphasisColor;
+   fontColorNA = $TextDisabledColor;
+   
+   fillColor = "22 22 22 255";
+   fillColorHL = "22 22 22 255"; 
+   fillColorSEL = "56 56 56 255";
+   
+   border = true;
+   borderColor ="87 87 87";
+   borderColorHL = "87 87 87";
+   borderColorSEL = "255 255 255";
+   
    category = "Core";
    canKeyFocus = true;
 };
 
+if( !isObject( GuiMenuTextEditProfile ) )
+new GuiControlProfile( GuiMenuTextEditProfile : GuiTextEditProfile )
+{
+   fontColor = $TextMediumEmphasisColor;
+   fontColorHL = $TextMediumEmphasisColor;
+   fontColorSEL = $TextMediumEmphasisColor;
+   fontColorNA = $TextDisabledColor;
+   
+   fillColor = "22 22 22 255";
+   fillColorHL = "22 22 22 255";   
+   
+   border = true;
+   borderColor ="87 87 87";
+   borderColorHL = "87 87 87";
+   borderColorSEL = "255 255 255";
+   
+   category = "Core";
+};
+
 // ----------------------------------------------------------------------------
 // TODO: Revisit Popupmenu
 // ----------------------------------------------------------------------------
@@ -484,7 +523,7 @@ if(!isObject(GuiMenuScrollProfile))
 new GuiControlProfile(GuiMenuScrollProfile)
 {
    opaque = false;
-   fillcolor = "50 50 50";
+   fillcolor = "22 22 22";
    fontColor = "200 200 200";
    fontColorHL = "250 250 250";
    border = false;

+ 1 - 1
Templates/BaseGame/game/tools/VerveEditor/GUI/VerveEditorGroupBuilder.gui

@@ -283,7 +283,7 @@ function VerveEditorGroupBuilderGUI::_Build( %this, %groupLabel )
 {
     if ( %groupLabel $= "" )
     {
-        messageBox( "Warning", "You must provide a Valid Group Label.", "Ok" );
+        toolsMessageBox( "Warning", "You must provide a Valid Group Label.", "Ok" );
         return;
     }
     

+ 1 - 1
Templates/BaseGame/game/tools/VerveEditor/Scripts/Groups/VGroup.cs

@@ -30,7 +30,7 @@ function VGroup::OnAdd( %this )
             if ( %groupObject.isMemberOfClass( %ourClass ) )
             {
                 // Alert Message.
-                messageBox( "Verve Editor", "You cannot have more than one \"" @ %ourClass @ "\" in your sequence.", "Ok", "Warning" );
+                toolsMessageBox( "Verve Editor", "You cannot have more than one \"" @ %ourClass @ "\" in your sequence.", "Ok", "Warning" );
                 
                 // Invalid.
                 return false;

+ 2 - 2
Templates/BaseGame/game/tools/VerveEditor/Scripts/Persistence.cs

@@ -172,7 +172,7 @@ function VerveEditor::SavePrompt()
         return true;
     }
     
-    %result = messageBox( "Verve Editor", "Save Changes to your sequence?", "SaveDontSave", "Warning" );
+    %result = toolsMessageBox( "Verve Editor", "Save Changes to your sequence?", "SaveDontSave", "Warning" );
     if ( %result $= $MROk )
     {
         // Save.
@@ -189,7 +189,7 @@ function VerveEditor::SavePromptCancel()
         return true;
     }
     
-    %result = messageBox( "Verve Editor", "Save Changes to your sequence?", "SaveDontSaveCancel", "Warning" );
+    %result = toolsMessageBox( "Verve Editor", "Save Changes to your sequence?", "SaveDontSaveCancel", "Warning" );
     if ( %result $= $MRCancel )
     {
         return false;

+ 1 - 1
Templates/BaseGame/game/tools/VerveEditor/Scripts/Tracks/VTrack.cs

@@ -30,7 +30,7 @@ function VTrack::OnAdd( %this )
             if ( %trackObject.isMemberOfClass( %ourClass ) )
             {
                 // Alert Message.
-                messageBox( "Verve Editor", "You cannot have more than one \"" @ %ourClass @ "\" in a group.", "Ok", "Warning" );
+                toolsMessageBox( "Verve Editor", "You cannot have more than one \"" @ %ourClass @ "\" in a group.", "Ok", "Warning" );
                 
                 // Invalid.
                 return false;

+ 2 - 2
Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.cs

@@ -928,7 +928,7 @@ function AssetBrowser::showDeleteDialog( %this )
    
    if( isObject( %material ) )
    {
-      MessageBoxYesNoCancel("Delete Material?", 
+      toolsMessageBoxYesNoCancel("Delete Material?", 
          "Are you sure you want to delete<br><br>" @ %material.getName() @ "<br><br> Material deletion won't take affect until the engine is quit.", 
          "AssetBrowser.deleteMaterial( " @ %material @ ", " @ %secondFilter @ ", " @ %secondFilterName @" );", 
          "", 
@@ -2320,7 +2320,7 @@ function AssetBrowserFilterTree::onControlDropped( %this, %payload, %position )
       if(%path !$= AssetBrowser.dirHandler.CurrentAddress)
       {
          //we're trying to move the asset to a different module!
-         //MessageBoxYesNo( "Move Asset", "Do you wish to move asset " @ %assetName @ " to " @ %path @ "?", 
+         //toolsMessageBoxYesNo( "Move Asset", "Do you wish to move asset " @ %assetName @ " to " @ %path @ "?", 
          //      "AssetBrowser.moveAsset(\""@ %moduleName @ ":" @ %assetName @"\", \""@%path@"\");", ""); 
          
          if(%assetType $= "Folder")

+ 5 - 5
Templates/BaseGame/game/tools/assetBrowser/scripts/assetImport.cs

@@ -422,19 +422,19 @@ function ImportAssetWindow::reloadImportOptionConfigs(%this)
       EditorSettings.value("Assets/AssetImporDefaultConfig") $= "" || 
       EditorSettings.value("Assets/AutoImport", false) == false)
       {
-         MessageBoxOK("Unable to AutoImport", "Attempted to import a loose file " @ %filePath @ " with AutoImport but was unable to either due to lacking a valid import config, or the editor settings are not set to auto import.");
+         toolsMessageBoxOK("Unable to AutoImport", "Attempted to import a loose file " @ %filePath @ " with AutoImport but was unable to either due to lacking a valid import config, or the editor settings are not set to auto import.");
          return false;      
       }
       
       if(%assetType $= "folder" || %assetType $= "zip")
       {
-         MessageBoxOK("Unable to AutoImport", "Unable to auto import folders or zips at this time");
+         toolsMessageBoxOK("Unable to AutoImport", "Unable to auto import folders or zips at this time");
          return false; 
       }
       
       if(%assetType $= "")
       {
-         MessageBoxOK("Unable to AutoImport", "Unable to auto import unknown file type for file " @ %filePath);
+         toolsMessageBoxOK("Unable to AutoImport", "Unable to auto import unknown file type for file " @ %filePath);
          return false; 
       }
    }
@@ -706,7 +706,7 @@ function ImportAssetWindow::doRefresh(%this)
 
    if(ImportAssetWindow.importConfigsList.count() == 0)
    {
-      MessageBoxOK( "Warning", "No base import config. Please create an import configuration set to simplify asset importing.");
+      toolsMessageBoxOK( "Warning", "No base import config. Please create an import configuration set to simplify asset importing.");
    }
    
    %this.dirty = false;
@@ -978,7 +978,7 @@ function ImportAssetWindow::ImportAssets(%this)
       
       if(!isObject(%module))
       {
-         MessageBoxOK( "Error!", "No module selected. You must select or create a module for the assets to be added to.");
+         toolsMessageBoxOK( "Error!", "No module selected. You must select or create a module for the assets to be added to.");
          return;
       }
       

+ 1 - 1
Templates/BaseGame/game/tools/assetBrowser/scripts/assetImportConfigEditor.cs

@@ -168,7 +168,7 @@ function AssetImportConfigEditor::createNewImportConfig(%this)
 function AssetImportConfigEditor::deleteConfig(%this)
 {
    %callback = "AssetImportConfigEditor.onDeleteConfig();";
-   MessageBoxOKCancel("Delete Import Config", "This will delete the " @ AssetImportConfigList.currentConfig @ " config. Continue?", %callback, "");
+   toolsMessageBoxOKCancel("Delete Import Config", "This will delete the " @ AssetImportConfigList.currentConfig @ " config. Continue?", %callback, "");
 }
 
 function AssetImportConfigEditor::onDeleteConfig(%this)

+ 1 - 1
Templates/BaseGame/game/tools/assetBrowser/scripts/editAsset.cs

@@ -349,7 +349,7 @@ function AssetBrowser::deleteAsset(%this)
    //%assetDef = AssetDatabase.acquireAsset(EditAssetPopup.assetId);
    //%assetType = %assetDef.getClassName();
    
-   MessageBoxOKCancel("Warning!", "This will delete the selected content and the files associated to it, do you wish to continue?", 
+   toolsMessageBoxOKCancel("Warning!", "This will delete the selected content and the files associated to it, do you wish to continue?", 
       "AssetBrowser.confirmDeleteAsset();", "");
 }
 

+ 1 - 1
Templates/BaseGame/game/tools/assetBrowser/scripts/editModule.cs

@@ -20,7 +20,7 @@ function AssetBrowser::CreateNewModule(%this)
 
 function AssetBrowser::promptNewModuleFolders(%this)
 {
-   MessageBoxYesNo("Create Folders?", 
+   toolsMessageBoxYesNo("Create Folders?", 
          "Do you want to create some common folders for organization of your new Module?", 
          "AssetBrowser.makeModuleFolders();",  //if yes, make the foldesr
          "AssetBrowser.loadDirectories();");  //if no, just refresh

+ 3 - 3
Templates/BaseGame/game/tools/assetBrowser/scripts/newAsset.cs

@@ -157,7 +157,7 @@ function CreateNewAsset()
    
    if(%assetName $= "")
 	{
-	   MessageBoxOK( "Error", "Attempted to make a new asset with no name!");
+	   toolsMessageBoxOK( "Error", "Attempted to make a new asset with no name!");
 		return;
 	}
 	
@@ -166,7 +166,7 @@ function CreateNewAsset()
    
    if(%moduleName $= "")
 	{
-	   MessageBoxOK( "Error", "Attempted to make a new asset with no module!");
+	   toolsMessageBoxOK( "Error", "Attempted to make a new asset with no module!");
 		return;
 	}
 	
@@ -175,7 +175,7 @@ function CreateNewAsset()
    %assetType = AssetBrowser.newAssetSettings.assetType;
 	if(%assetType $= "")
 	{
-	   MessageBoxOK( "Error", "Attempted to make a new asset with no type!");
+	   toolsMessageBoxOK( "Error", "Attempted to make a new asset with no type!");
 		return;
 	}
 	

+ 2 - 2
Templates/BaseGame/game/tools/datablockEditor/datablockEditor.cs

@@ -610,7 +610,7 @@ function DatablockEditorPlugin::deleteDatablock( %this )
       // Show some confirmation.
 
       if( %numSelected == 1 )
-         MessageBoxOk( "Datablock Deleted", "The datablock (" @ %db.getName() @ ") has been removed from " @
+         toolsMessageBoxOk( "Datablock Deleted", "The datablock (" @ %db.getName() @ ") has been removed from " @
                        "it's file (" @ %db.getFilename() @ ") and upon restart will cease to exist" );
    }
    
@@ -622,7 +622,7 @@ function DatablockEditorPlugin::deleteDatablock( %this )
    // Show confirmation for multiple datablocks.
    
    if( %numSelected > 1 )
-      MessageBoxOk( "Datablocks Deleted", "The datablocks have been deleted and upon restart will cease to exist." );
+      toolsMessageBoxOk( "Datablocks Deleted", "The datablocks have been deleted and upon restart will cease to exist." );
 
    // Clear selection.
       

+ 2 - 2
Templates/BaseGame/game/tools/decalEditor/decalEditorGui.cs

@@ -141,7 +141,7 @@ function RetargetDecalButton::onClick( %this )
    
    if( !isObject(%datablock) )
    {
-      MessageBoxOK("Error", "A valid Decal Template must be selected.");
+      toolsMessageBoxOK("Error", "A valid Decal Template must be selected.");
       return;
    }
 
@@ -184,7 +184,7 @@ function DeleteDecalButton::onClick( %this )
       %id = DecalDataList.getSelectedItem();
       %datablock = DecalDataList.getItemText(%id );
    
-      MessageBoxYesNoCancel("Delete Decal Datablock?", 
+      toolsMessageBoxYesNoCancel("Delete Decal Datablock?", 
          "Are you sure you want to delete<br><br>" @ %datablock @ "<br><br> Datablock deletion won't take affect until the engine is quit.", 
          "DecalEditorGui.deleteSelectedDecalDatablock();", 
          "", 

+ 1 - 1
Templates/BaseGame/game/tools/editorClasses/scripts/projects/projectInternalInterface.ed.cs

@@ -95,7 +95,7 @@ function ProjectBase::_onProjectOpen( %this, %data )
      
    if( !%this.LoadProject( %data ) )
    {
-      messageBox("Unable to Load Project", "The project file you're attempting to open was created with an incompatible version of this software\n\nConversion of 1.1.X projects will be addressed soon, we apologize for the inconvenience.","Ok","Error");
+      toolsMessageBox("Unable to Load Project", "The project file you're attempting to open was created with an incompatible version of this software\n\nConversion of 1.1.X projects will be addressed soon, we apologize for the inconvenience.","Ok","Error");
 
       return false;
    }

+ 3 - 3
Templates/BaseGame/game/tools/forestEditor/forestEditorGui.cs

@@ -40,7 +40,7 @@ function ForestEditorGui::onActiveForestUpdated( %this, %forest, %createNew )
    // Give the user a chance to add a forest.
    if ( !%gotForest && %createNew )
    {
-      MessageBoxYesNo(  "Forest", 
+      toolsMessageBoxYesNo(  "Forest", 
                         "There is not a Forest in this mission.  Do you want to add one?",
                         %this @ ".createForest();", "" );
       return;                                                         
@@ -245,7 +245,7 @@ function ForestEditorGui::deleteMesh( %this )
       
    if ( isObject( %obj ) )
    {
-      MessageBoxOKCancel( "Warning", 
+      toolsMessageBoxOKCancel( "Warning", 
                           "Deleting this mesh will also delete BrushesElements and ForestItems referencing it.", 
                           "ForestEditorGui.okDeleteMesh(" @ %obj @ ");",
                           "" );      
@@ -389,7 +389,7 @@ function ForestEditBrushTree::handleRenameObject( %this, %name, %obj )
       %found = ForestBrushGroup.findObjectByInternalName( %name );
       if ( isObject( %found ) && %found.getId() != %obj.getId() )
       {
-         MessageBoxOK( "Error", "Brush or Element with that name already exists.", "" );   
+         toolsMessageBoxOK( "Error", "Brush or Element with that name already exists.", "" );   
          
          // true as in, we handled it, don't rename the object.      
          return true;   

+ 1 - 1
Templates/BaseGame/game/tools/forestEditor/main.cs

@@ -205,7 +205,7 @@ function ForestEditorPlugin::onActivated( %this )
    }   
    
    if ( %this.showError )
-      MessageBoxOK( "Error", "Your tools/forestEditor folder does not contain a valid brushes.cs. Brushes you create will not be saved!" );
+      toolsMessageBoxOK( "Error", "Your tools/forestEditor folder does not contain a valid brushes.cs. Brushes you create will not be saved!" );
 }
 
 function ForestEditorPlugin::onDeactivated( %this )

+ 3 - 3
Templates/BaseGame/game/tools/gui/materialSelector.ed.gui

@@ -1368,7 +1368,7 @@ function MaterialSelector::createFilter( %this, %filter )
 {
    if( %filter $= %existingFilters )
    {
-      MessageBoxOK( "Error", "Can not create blank filter.");
+      toolsMessageBoxOK( "Error", "Can not create blank filter.");
       return;
    }
       
@@ -1377,7 +1377,7 @@ function MaterialSelector::createFilter( %this, %filter )
       %existingFilters = MaterialSelector-->filterArray.getObject(%i).getObject(0).filter;
       if( %filter $= %existingFilters )
       {
-         MessageBoxOK( "Error", "Can not create two filters of the same name.");
+         toolsMessageBoxOK( "Error", "Can not create two filters of the same name.");
          return;
       }
    }
@@ -1713,7 +1713,7 @@ function MaterialSelector::showDeleteDialog( %this )
    
    if( isObject( %material ) )
    {
-      MessageBoxYesNoCancel("Delete Material?", 
+      toolsMessageBoxYesNoCancel("Delete Material?", 
          "Are you sure you want to delete<br><br>" @ %material.getName() @ "<br><br> Material deletion won't take affect until the engine is quit.", 
          "MaterialSelector.deleteMaterial( " @ %material @ ", " @ %secondFilter @ ", " @ %secondFilterName @" );", 
          "", 

+ 47 - 47
Templates/BaseGame/game/tools/gui/messageBoxes/messageBox.ed.cs

@@ -24,16 +24,16 @@
 // Cleanup Dialog created by 'core'
 if( isObject( MessagePopupDlg ) )
    MessagePopupDlg.delete();
-if( isObject( MessageBoxYesNoDlg ) )
-   MessageBoxYesNoDlg.delete();
-if( isObject( MessageBoxYesNoCancelDlg ) )
-   MessageBoxYesNoCancelDlg.delete();
-if( isObject( MessageBoxOKCancelDetailsDlg ) )
-   MessageBoxOKCancelDetailsDlg.delete();
-if( isObject( MessageBoxOKCancelDlg ) )
-   MessageBoxOKCancelDlg.delete();
-if( isObject( MessageBoxOKDlg ) )
-   MessageBoxOKDlg.delete();
+if( isObject( toolsMessageBoxYesNoDlg ) )
+   toolsMessageBoxYesNoDlg.delete();
+if( isObject( toolsMessageBoxYesNoCancelDlg ) )
+   toolsMessageBoxYesNoCancelDlg.delete();
+if( isObject( toolsMessageBoxOKCancelDetailsDlg ) )
+   toolsMessageBoxOKCancelDetailsDlg.delete();
+if( isObject( toolsMessageBoxOKCancelDlg ) )
+   toolsMessageBoxOKCancelDlg.delete();
+if( isObject( toolsMessageBoxOKDlg ) )
+   toolsMessageBoxOKDlg.delete();
 if( isObject( IODropdownDlg ) )
    IODropdownDlg.delete();
    
@@ -51,7 +51,7 @@ exec("./messagePopup.ed.gui");
 // --------------------------------------------------------------------
 // Message Sound
 // --------------------------------------------------------------------
-/*new SFXDescription(MessageBoxAudioDescription)
+/*new SFXDescription(toolsMessageBoxAudioDescription)
 {
    volume      = 1.0;
    isLooping   = false;
@@ -59,10 +59,10 @@ exec("./messagePopup.ed.gui");
    channel     = $GuiAudioType;
 };
 
-new SFXProfile(messageBoxBeep)
+new SFXProfile(toolsMessageBoxBeep)
 {
-   filename    = "./messageBoxSound";
-   description = MessageBoxAudioDescription;
+   filename    = "./toolsMessageBoxSound";
+   description = toolsMessageBoxAudioDescription;
    preload     = true;
 };*/
 
@@ -122,7 +122,7 @@ function MBSetText(%text, %frame, %msg)
    %frame.canMinimize = "0";
    %frame.canMaximize = "0";
    
-   //sfxPlayOnce( messageBoxBeep );
+   //sfxPlayOnce( toolsMessageBoxBeep );
 }
 
 //---------------------------------------------------------------------------------------------
@@ -130,34 +130,34 @@ function MBSetText(%text, %frame, %msg)
 // callback for each button.
 //---------------------------------------------------------------------------------------------
 
-function MessageBoxOK(%title, %message, %callback)
+function toolsMessageBoxOK(%title, %message, %callback)
 {
    MBOKFrame.text = %title;
-   Canvas.pushDialog(MessageBoxOKDlg);
+   Canvas.pushDialog(toolsMessageBoxOKDlg);
    MBSetText(MBOKText, MBOKFrame, %message);
-   MessageBoxOKDlg.callback = %callback;
+   toolsMessageBoxOKDlg.callback = %callback;
 }
 
-function MessageBoxOKDlg::onSleep( %this )
+function toolsMessageBoxOKDlg::onSleep( %this )
 {
    %this.callback = "";
 }
 
-function MessageBoxOKCancel(%title, %message, %callback, %cancelCallback)
+function toolsMessageBoxOKCancel(%title, %message, %callback, %cancelCallback)
 {
    MBOKCancelFrame.text = %title;
-   Canvas.pushDialog(MessageBoxOKCancelDlg);
+   Canvas.pushDialog(toolsMessageBoxOKCancelDlg);
    MBSetText(MBOKCancelText, MBOKCancelFrame, %message);
-   MessageBoxOKCancelDlg.callback = %callback;
-   MessageBoxOKCancelDlg.cancelCallback = %cancelCallback;
+   toolsMessageBoxOKCancelDlg.callback = %callback;
+   toolsMessageBoxOKCancelDlg.cancelCallback = %cancelCallback;
 }
 
-function MessageBoxOKCancelDlg::onSleep( %this )
+function toolsMessageBoxOKCancelDlg::onSleep( %this )
 {
    %this.callback = "";
 }
 
-function MessageBoxOKCancelDetails(%title, %message, %details, %callback, %cancelCallback)
+function toolsMessageBoxOKCancelDetails(%title, %message, %details, %callback, %cancelCallback)
 {   
    if(%details $= "")
    {
@@ -168,7 +168,7 @@ function MessageBoxOKCancelDetails(%title, %message, %details, %callback, %cance
    
    MBOKCancelDetailsFrame.setText( %title );
    
-   Canvas.pushDialog(MessageBoxOKCancelDetailsDlg);
+   Canvas.pushDialog(toolsMessageBoxOKCancelDetailsDlg);
    MBSetText(MBOKCancelDetailsText, MBOKCancelDetailsFrame, %message);
    MBOKCancelDetailsInfoText.setText(%details);
    
@@ -183,8 +183,8 @@ function MessageBoxOKCancelDetails(%title, %message, %details, %callback, %cance
    
    MBOKCancelDetailsFrame.setExtent(300, %extentY);
    
-   MessageBoxOKCancelDetailsDlg.callback = %callback;
-   MessageBoxOKCancelDetailsDlg.cancelCallback = %cancelCallback;
+   toolsMessageBoxOKCancelDetailsDlg.callback = %callback;
+   toolsMessageBoxOKCancelDetailsDlg.cancelCallback = %cancelCallback;
    
    MBOKCancelDetailsFrame.defaultExtent = MBOKCancelDetailsFrame.getExtent();
 }
@@ -223,33 +223,33 @@ function MBOKCancelDetailsToggleInfoFrame()
    }
 }
 
-function MessageBoxOKCancelDetailsDlg::onSleep( %this )
+function toolsMessageBoxOKCancelDetailsDlg::onSleep( %this )
 {
    %this.callback = "";
 }
 
-function MessageBoxYesNo(%title, %message, %yesCallback, %noCallback)
+function toolsMessageBoxYesNo(%title, %message, %yesCallback, %noCallback)
 {
    MBYesNoFrame.text = %title;
-   MessageBoxYesNoDlg.profile = "GuiOverlayProfile";
-   Canvas.pushDialog(MessageBoxYesNoDlg);
+   toolsMessageBoxYesNoDlg.profile = "GuiOverlayProfile";
+   Canvas.pushDialog(toolsMessageBoxYesNoDlg);
    MBSetText(MBYesNoText, MBYesNoFrame, %message);
-   MessageBoxYesNoDlg.yesCallBack = %yesCallback;
-   MessageBoxYesNoDlg.noCallback = %noCallBack;
+   toolsMessageBoxYesNoDlg.yesCallBack = %yesCallback;
+   toolsMessageBoxYesNoDlg.noCallback = %noCallBack;
 }
 
-function MessageBoxYesNoCancel(%title, %message, %yesCallback, %noCallback, %cancelCallback)
+function toolsMessageBoxYesNoCancel(%title, %message, %yesCallback, %noCallback, %cancelCallback)
 {
    MBYesNoCancelFrame.text = %title;
-   MessageBoxYesNoDlg.profile = "GuiOverlayProfile";
-   Canvas.pushDialog(MessageBoxYesNoCancelDlg);
+   toolsMessageBoxYesNoDlg.profile = "GuiOverlayProfile";
+   Canvas.pushDialog(toolsMessageBoxYesNoCancelDlg);
    MBSetText(MBYesNoCancelText, MBYesNoCancelFrame, %message);
-   MessageBoxYesNoCancelDlg.yesCallBack = %yesCallback;
-   MessageBoxYesNoCancelDlg.noCallback = %noCallBack;
-   MessageBoxYesNoCancelDlg.cancelCallback = %cancelCallback;
+   toolsMessageBoxYesNoCancelDlg.yesCallBack = %yesCallback;
+   toolsMessageBoxYesNoCancelDlg.noCallback = %noCallBack;
+   toolsMessageBoxYesNoCancelDlg.cancelCallback = %cancelCallback;
 }
 
-function MessageBoxYesNoDlg::onSleep( %this )
+function toolsMessageBoxYesNoDlg::onSleep( %this )
 {
    %this.yesCallback = "";
    %this.noCallback = "";
@@ -311,15 +311,15 @@ function CloseMessagePopup()
 // "Old" message box function aliases for backwards-compatibility.
 //---------------------------------------------------------------------------------------------
 
-function MessageBoxOKOld( %title, %message, %callback )
+function toolsMessageBoxOKOld( %title, %message, %callback )
 {
-   MessageBoxOK( %title, %message, %callback );
+   toolsMessageBoxOK( %title, %message, %callback );
 }
-function MessageBoxOKCancelOld( %title, %message, %callback, %cancelCallback )
+function toolsMessageBoxOKCancelOld( %title, %message, %callback, %cancelCallback )
 {
-   MessageBoxOKCancel( %title, %message, %callback, %cancelCallback );
+   toolsMessageBoxOKCancel( %title, %message, %callback, %cancelCallback );
 }
-function MessageBoxYesNoOld( %title, %message, %yesCallback, %noCallback )
+function toolsMessageBoxYesNoOld( %title, %message, %yesCallback, %noCallback )
 {
-   MessageBoxYesNo( %title, %message, %yesCallback, %noCallback );
+   toolsMessageBoxYesNo( %title, %message, %yesCallback, %noCallback );
 }

+ 2 - 2
Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxOK.ed.gui

@@ -1,5 +1,5 @@
 //--- OBJECT WRITE BEGIN ---
-%guiContent = new GuiControl(MessageBoxOKDlg) {
+%guiContent = new GuiControl(toolsMessageBoxOKDlg) {
    profile = "GuiOverlayProfile";
    horizSizing = "width";
    vertSizing = "height";
@@ -49,7 +49,7 @@
          extent = "80 24";
          minExtent = "8 8";
          visible = "1";
-         command = "MessageCallback(MessageBoxOKDlg,MessageBoxOKDlg.callback);";
+         command = "MessageCallback(toolsMessageBoxOKDlg,toolsMessageBoxOKDlg.callback);";
          accelerator = "return";
          helpTag = "0";
          text = "Ok";

+ 9 - 9
Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxOKBuy.ed.gui

@@ -1,5 +1,5 @@
 //--- OBJECT WRITE BEGIN ---
-%guiContent = new GuiControl(MessageBoxOKBuyDlg) {
+%guiContent = new GuiControl(toolsMessageBoxOKBuyDlg) {
 	profile = "ToolsGuiDefaultProfile";
 	horizSizing = "width";
 	vertSizing = "height";
@@ -27,7 +27,7 @@
       canMaximize = "0";
       minSize = "50 50";
       text = "";
-      closeCommand = "MessageCallback(MessageBoxOKBuyDlg,MessageBoxOKBuyDlg.noCallback);";
+      closeCommand = "MessageCallback(toolsMessageBoxOKBuyDlg,toolsMessageBoxOKBuyDlg.noCallback);";
 
 		new GuiMLTextCtrl(MBOKBuyText) {
          profile = "ToolsGuiMLTextProfile";
@@ -50,7 +50,7 @@
          extent = "80 22";
          minExtent = "8 8";
          visible = "1";
-			command = "MessageCallback(MessageBoxOKBuyDlg,MessageBoxOKBuyDlg.OKCallback);";
+			command = "MessageCallback(toolsMessageBoxOKBuyDlg,toolsMessageBoxOKBuyDlg.OKCallback);";
          accelerator = "return";
          helpTag = "0";
          text = "OK";
@@ -64,7 +64,7 @@
          extent = "80 22";
          minExtent = "8 8";
          visible = "1";
-			command = "MessageCallback(MessageBoxOKBuyDlg,MessageBoxOKBuyDlg.BuyCallback);";
+			command = "MessageCallback(toolsMessageBoxOKBuyDlg,toolsMessageBoxOKBuyDlg.BuyCallback);";
          accelerator = "escape";
          helpTag = "0";
          text = "Buy Now!";
@@ -74,12 +74,12 @@
 };
 //--- OBJECT WRITE END ---
 
-function MessageBoxOKBuy(%title, %message, %OKCallback, %BuyCallback)
+function toolsMessageBoxOKBuy(%title, %message, %OKCallback, %BuyCallback)
 {
    MBOKBuyFrame.text = %title;
-   MessageBoxOKBuyDlg.profile = "ToolsGuiOverlayProfile";
-   Canvas.pushDialog(MessageBoxOKBuyDlg);
+   toolsMessageBoxOKBuyDlg.profile = "ToolsGuiOverlayProfile";
+   Canvas.pushDialog(toolsMessageBoxOKBuyDlg);
    MBSetText(MBOKBuyText, MBOKBuyFrame, %message);
-   MessageBoxOKBuyDlg.OKCallback = %OKCallback;
-   MessageBoxOKBuyDlg.BuyCallback = %BuyCallback;
+   toolsMessageBoxOKBuyDlg.OKCallback = %OKCallback;
+   toolsMessageBoxOKBuyDlg.BuyCallback = %BuyCallback;
 }

+ 3 - 3
Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxOKCancel.ed.gui

@@ -1,5 +1,5 @@
 //--- OBJECT WRITE BEGIN ---
-%guiContent = new GuiControl(MessageBoxOKCancelDlg) {
+%guiContent = new GuiControl(toolsMessageBoxOKCancelDlg) {
    profile = "GuiOverlayProfile";
    horizSizing = "width";
    vertSizing = "height";
@@ -50,7 +50,7 @@
          extent = "80 24";
          minExtent = "8 8";
          visible = "1";
-         command = "MessageCallback(MessageBoxOKCancelDlg,MessageBoxOKCancelDlg.callback);";
+         command = "MessageCallback(toolsMessageBoxOKCancelDlg,toolsMessageBoxOKCancelDlg.callback);";
          accelerator = "return";
          helpTag = "0";
          text = "Ok";
@@ -64,7 +64,7 @@
          extent = "80 24";
          minExtent = "8 8";
          visible = "1";
-         command = "MessageCallback(MessageBoxOKCancelDlg,MessageBoxOKCancelDlg.cancelCallback);";
+         command = "MessageCallback(toolsMessageBoxOKCancelDlg,toolsMessageBoxOKCancelDlg.cancelCallback);";
          accelerator = "escape";
          helpTag = "0";
          text = "Cancel";

+ 3 - 3
Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxOKCancelDetailsDlg.ed.gui

@@ -1,5 +1,5 @@
 //--- OBJECT WRITE BEGIN ---
-%guiContent = new GuiControl(MessageBoxOKCancelDetailsDlg) {
+%guiContent = new GuiControl(toolsMessageBoxOKCancelDetailsDlg) {
    canSaveDynamicFields = "0";
    Profile = "GuiOverlayProfile";
    HorizSizing = "width";
@@ -57,7 +57,7 @@
          MinExtent = "8 8";
          canSave = "1";
          Visible = "1";
-         Command = "MessageCallback(MessageBoxOKCancelDetailsDlg,MessageBoxOKCancelDetailsDlg.callback);";
+         Command = "MessageCallback(toolsMessageBoxOKCancelDetailsDlg,toolsMessageBoxOKCancelDetailsDlg.callback);";
          Accelerator = "return";
          hovertime = "1000";
          text = "OK";
@@ -74,7 +74,7 @@
          MinExtent = "8 8";
          canSave = "1";
          Visible = "1";
-         Command = "MessageCallback(MessageBoxOKCancelDetailsDlg,MessageBoxOKCancelDetailsDlg.cancelCallback);";
+         Command = "MessageCallback(toolsMessageBoxOKCancelDetailsDlg,toolsMessageBoxOKCancelDetailsDlg.cancelCallback);";
          Accelerator = "escape";
          hovertime = "1000";
          text = "CANCEL";

+ 4 - 4
Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxYesNo.ed.gui

@@ -1,5 +1,5 @@
 //--- OBJECT WRITE BEGIN ---
-%guiContent = new GuiControl(MessageBoxYesNoDlg) {
+%guiContent = new GuiControl(toolsMessageBoxYesNoDlg) {
 	profile = "GuiOverlayProfile";
 	horizSizing = "width";
 	vertSizing = "height";
@@ -27,7 +27,7 @@
       canMaximize = "0";
       minSize = "50 50";
       text = "";
-      closeCommand = "MessageCallback(MessageBoxYesNoDlg,MessageBoxYesNoDlg.noCallback);";
+      closeCommand = "MessageCallback(toolsMessageBoxYesNoDlg,toolsMessageBoxYesNoDlg.noCallback);";
 
 		new GuiMLTextCtrl(MBYesNoText) {
          profile = "ToolsGuiMLTextProfile";
@@ -50,7 +50,7 @@
          extent = "80 22";
          minExtent = "8 8";
          visible = "1";
-			command = "MessageCallback(MessageBoxYesNoDlg,MessageBoxYesNoDlg.yesCallback);";
+			command = "MessageCallback(toolsMessageBoxYesNoDlg,toolsMessageBoxYesNoDlg.yesCallback);";
          accelerator = "return";
          helpTag = "0";
          text = "Yes";
@@ -64,7 +64,7 @@
          extent = "80 22";
          minExtent = "8 8";
          visible = "1";
-			command = "MessageCallback(MessageBoxYesNoDlg,MessageBoxYesNoDlg.noCallback);";
+			command = "MessageCallback(toolsMessageBoxYesNoDlg,toolsMessageBoxYesNoDlg.noCallback);";
          accelerator = "escape";
          helpTag = "0";
          text = "No";

+ 5 - 5
Templates/BaseGame/game/tools/gui/messageBoxes/messageBoxYesNoCancel.ed.gui

@@ -1,5 +1,5 @@
 //--- OBJECT WRITE BEGIN ---
-%guiContent = new GuiControl(MessageBoxYesNoCancelDlg) {
+%guiContent = new GuiControl(toolsMessageBoxYesNoCancelDlg) {
    canSaveDynamicFields = "0";
    Profile = "GuiOverlayProfile";
    HorizSizing = "width";
@@ -31,7 +31,7 @@
       canMaximize = "0";
       minSize = "50 50";
       text = "";
-      closeCommand="MessageCallback(MessageBoxYesNoCancelDlg,MessageBoxYesNoCancelDlg.cancelCallback);";
+      closeCommand="MessageCallback(toolsMessageBoxYesNoCancelDlg,toolsMessageBoxYesNoCancelDlg.cancelCallback);";
 
       new GuiMLTextCtrl(MBYesNoCancelText) {
          canSaveDynamicFields = "0";
@@ -58,7 +58,7 @@
          MinExtent = "8 8";
          canSave = "1";
          Visible = "1";
-         Command = "MessageCallback(MessageBoxYesNoCancelDlg,MessageBoxYesNoCancelDlg.yesCallback);";
+         Command = "MessageCallback(toolsMessageBoxYesNoCancelDlg,toolsMessageBoxYesNoCancelDlg.yesCallback);";
          Accelerator = "return";
          hovertime = "1000";
          text = "Yes";
@@ -75,7 +75,7 @@
          MinExtent = "8 8";
          canSave = "1";
          Visible = "1";
-         Command = "MessageCallback(MessageBoxYesNoCancelDlg,MessageBoxYesNoCancelDlg.noCallback);";
+         Command = "MessageCallback(toolsMessageBoxYesNoCancelDlg,toolsMessageBoxYesNoCancelDlg.noCallback);";
          hovertime = "1000";
          text = "No";
          groupNum = "-1";
@@ -91,7 +91,7 @@
          MinExtent = "8 8";
          canSave = "1";
          Visible = "1";
-         Command = "MessageCallback(MessageBoxYesNoCancelDlg,MessageBoxYesNoCancelDlg.cancelCallback);";
+         Command = "MessageCallback(toolsMessageBoxYesNoCancelDlg,toolsMessageBoxYesNoCancelDlg.cancelCallback);";
          Accelerator = "escape";
          hovertime = "1000";
          text = "Cancel";

+ 14 - 14
Templates/BaseGame/game/tools/gui/saveChangesMBDlg.ed.gui

@@ -1,5 +1,5 @@
 //--- OBJECT WRITE BEGIN ---
-%guiContent = new GuiControl(MessageBoxSaveChangesDlg, EditorGuiGroup) {
+%guiContent = new GuiControl(toolsMessageBoxSaveChangesDlg, EditorGuiGroup) {
    canSaveDynamicFields = "0";
    Profile = "ToolsGuiDefaultProfile";
    HorizSizing = "width";
@@ -136,45 +136,45 @@
 };
 //--- OBJECT WRITE END ---
 
-function MessageBoxSaveChangesDlg::onWake( %this )
+function toolsMessageBoxSaveChangesDlg::onWake( %this )
 {
    MBSaveChangesFrame.setText( %this.Data );
 }
 
 function mbSaveDlgSaveButton::onClick( %this )
 {
-   if( MessageBoxSaveChangesDlg.SaveCallback !$= "" )
-      eval( MessageBoxSaveChangesDlg.SaveCallback @ "(" @ MessageBoxSaveChangesDlg.Data @ ");" );
-   Canvas.popDialog( MessageBoxSaveChangesDlg );
+   if( toolsMessageBoxSaveChangesDlg.SaveCallback !$= "" )
+      eval( toolsMessageBoxSaveChangesDlg.SaveCallback @ "(" @ toolsMessageBoxSaveChangesDlg.Data @ ");" );
+   Canvas.popDialog( toolsMessageBoxSaveChangesDlg );
 }
 
 function mbSaveDlgCancelButton::onClick( %this )
 {
-   Canvas.popDialog( MessageBoxSaveChangesDlg );
+   Canvas.popDialog( toolsMessageBoxSaveChangesDlg );
 }
 
 function mbSaveDlgDontButton::onClick( %this )
 {
-   if( MessageBoxSaveChangesDlg.DontSaveCallback !$= "" )
-      eval( MessageBoxSaveChangesDlg.DontSaveCallback @ "(" @ MessageBoxSaveChangesDlg.Data @ ");" );
-   Canvas.popDialog( MessageBoxSaveChangesDlg );
+   if( toolsMessageBoxSaveChangesDlg.DontSaveCallback !$= "" )
+      eval( toolsMessageBoxSaveChangesDlg.DontSaveCallback @ "(" @ toolsMessageBoxSaveChangesDlg.Data @ ");" );
+   Canvas.popDialog( toolsMessageBoxSaveChangesDlg );
 }
 
 // Deprecated when platform layers are all sufficient
 function checkSaveChangesOld( %data, %saveCallback, %dontSaveCallback )
 {
    // Sanity Check
-   if( MessageBoxSaveChangesDlg.isAwake() )
+   if( toolsMessageBoxSaveChangesDlg.isAwake() )
    {
       warn("Save Changes Dialog already Awake, NOT creating second instance.");
       return;
    }
    
    // Set Proper State
-   MessageBoxSaveChangesDlg.SaveCallback = %saveCallback;
-   MessageBoxSaveChangesDlg.DontSaveCallback = %dontSaveCallback;
-   MessageBoxSaveChangesDlg.Data = %data;
+   toolsMessageBoxSaveChangesDlg.SaveCallback = %saveCallback;
+   toolsMessageBoxSaveChangesDlg.DontSaveCallback = %dontSaveCallback;
+   toolsMessageBoxSaveChangesDlg.Data = %data;
    
    // Show Dialog
-   Canvas.pushDialog( MessageBoxSaveChangesDlg );
+   Canvas.pushDialog( toolsMessageBoxSaveChangesDlg );
 }

+ 1 - 1
Templates/BaseGame/game/tools/guiEditor/scripts/EditorChooseGUI.ed.cs

@@ -51,7 +51,7 @@ function GE_OpenGUIFile()
    // group. And, it should be the only thing in the group.
    if( !isObject( %guiContent ) )
    {
-      MessageBox( getEngineName(),
+      toolsMessageBox( getEngineName(),
          "You have loaded a Gui file that was created before this version.  It has been loaded but you must open it manually from the content list dropdown",
          "Ok", "Information" );   
       GuiEditContent( Canvas.getContent() );

+ 1 - 1
Templates/BaseGame/game/tools/guiEditor/scripts/guiEditor.ed.cs

@@ -32,7 +32,7 @@ function GuiEdit( %val )
 {
    if (Canvas.isFullscreen())
    {
-      MessageBoxOK("Windowed Mode Required", "Please switch to windowed mode to access the GUI Editor.");
+      toolsMessageBoxOK("Windowed Mode Required", "Please switch to windowed mode to access the GUI Editor.");
       return;
    }
 

+ 5 - 5
Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorCanvas.ed.cs

@@ -283,7 +283,7 @@ function GuiEditCanvas::load( %this, %filename )
    // group. And, it should be the only thing in the group.
    if( !isObject( %guiContent ) )
    {
-      MessageBox( getEngineName(),
+      toolsMessageBox( getEngineName(),
          "You have loaded a Gui file that was created before this version.  It has been loaded but you must open it manually from the content list dropdown",
          "Ok", "Information" );   
       return 0;
@@ -333,7 +333,7 @@ function GuiEditCanvas::save( %this, %selectedOnly, %noPrompt )
          return;
       else if( %selected.getCount() > 1 )
       {
-         MessageBox( "Invalid selection", "Only a single control hierarchy can be saved to a file.  Make sure you have selected only one control in the tree view." );
+         toolsMessageBox( "Invalid selection", "Only a single control hierarchy can be saved to a file.  Make sure you have selected only one control in the tree view." );
          return;
       }
          
@@ -464,7 +464,7 @@ function GuiEditCanvas::save( %this, %selectedOnly, %noPrompt )
       GuiEditorStatusBar.print( "Saved file '" @ %currentObject.getFileName() @ "'" );
    }
    else
-      MessageBox( "Error writing to file", "There was an error writing to file '" @ %currentFile @ "'. The file may be read-only.", "Ok", "Error" );   
+      toolsMessageBox( "Error writing to file", "There was an error writing to file '" @ %currentFile @ "'. The file may be read-only.", "Ok", "Error" );   
 }
 
 //---------------------------------------------------------------------------------------------
@@ -490,7 +490,7 @@ function GuiEditCanvas::append( %this )
    
    if( !isObject( %guiContent ) )
    {
-      MessageBox( "Error loading GUI file", "The GUI content controls could not be found.  This function can only be used with files saved by the GUI editor.", "Ok", "Error" );
+      toolsMessageBox( "Error loading GUI file", "The GUI content controls could not be found.  This function can only be used with files saved by the GUI editor.", "Ok", "Error" );
       return;
    }
    
@@ -519,7 +519,7 @@ function GuiEditCanvas::revert( %this )
    if( %filename $= "" )
       return;
       
-   if( MessageBox( "Revert Gui", "Really revert the current Gui?  This cannot be undone.", "OkCancel", "Question" ) == $MROk )
+   if( toolsMessageBox( "Revert Gui", "Really revert the current Gui?  This cannot be undone.", "OkCancel", "Question" ) == $MROk )
       %this.load( %filename );
 }
 

+ 5 - 5
Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorContentList.ed.cs

@@ -30,11 +30,11 @@ if( !isDefined( "$GuiEditor::GuiFilterList" ) )
    $GuiEditor::GuiFilterList =
       "GuiEditorGui" TAB
       "AL_ShadowVizOverlayCtrl" TAB
-      "MessageBoxOKDlg" TAB
-      "MessageBoxOKCancelDlg" TAB
-      "MessageBoxOKCancelDetailsDlg" TAB
-      "MessageBoxYesNoDlg" TAB
-      "MessageBoxYesNoCancelDlg" TAB
+      "toolsMessageBoxOKDlg" TAB
+      "toolsMessageBoxOKCancelDlg" TAB
+      "toolsMessageBoxOKCancelDetailsDlg" TAB
+      "toolsMessageBoxYesNoDlg" TAB
+      "toolsMessageBoxYesNoCancelDlg" TAB
       "MessagePopupDlg";
 }
 

+ 1 - 1
Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorNewGuiDialog.ed.cs

@@ -81,7 +81,7 @@ function GuiEditorNewGuiDialog::onOK( %this )
 
    if( isObject( %name ) && %name.isMemberOfClass( "GuiControl" ) )
    {
-      if( MessageBox( "Warning", "Replace the existing control '" @ %name @ "'?", "OkCancel", "Question" ) == $MROk )
+      if( toolsMessageBox( "Warning", "Replace the existing control '" @ %name @ "'?", "OkCancel", "Question" ) == $MROk )
          %name.delete();
       else
          return;

+ 2 - 2
Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorProfiles.ed.cs

@@ -86,13 +86,13 @@ function GuiEditor::showDeleteProfileDialog( %this, %profile )
       
    if( %profile.isInUse() )
    {
-      MessageBoxOk( "Error",
+      toolsMessageBoxOk( "Error",
          "The profile '" @ %profile.getName() @ "' is still used by Gui controls."
       );
       return;
    }
 
-   MessageBoxYesNo( "Delete Profile?",
+   toolsMessageBoxYesNo( "Delete Profile?",
       "Do you really want to delete '" @ %profile.getName() @ "'?",
       "GuiEditor.deleteProfile( " @ %profile @ " );"
    );

+ 12 - 12
Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.cs

@@ -436,7 +436,7 @@ function MaterialEditorGui::setActiveMaterial( %this, %material )
    // Warn if selecting a CustomMaterial (they can't be properly previewed or edited)
    if ( isObject( %material ) && %material.isMemberOfClass( "CustomMaterial" ) )
    {
-      MessageBoxOK( "Warning", "The selected Material (" @ %material.getName() @
+      toolsMessageBoxOK( "Warning", "The selected Material (" @ %material.getName() @
          ") is a CustomMaterial, and cannot be edited using the Material Editor." );
       return;
    }
@@ -1794,7 +1794,7 @@ function MaterialEditorGui::addCubemap( %this,%cubemapName )
 {
    if( %cubemapName $= "" )
    {
-      MessageBoxOK( "Error", "Can not create a cubemap without a valid name.");
+      toolsMessageBoxOK( "Error", "Can not create a cubemap without a valid name.");
       return;
    }
    
@@ -1802,7 +1802,7 @@ function MaterialEditorGui::addCubemap( %this,%cubemapName )
    {
       if( %cubemapName $= RootGroup.getObject(%i).getName() )
       {
-         MessageBoxOK( "Error", "There is already an object with the same name.");
+         toolsMessageBoxOK( "Error", "There is already an object with the same name.");
          return;
       }
    }
@@ -1884,7 +1884,7 @@ function MaterialEditorGui::showDeleteCubemapDialog(%this)
       
    if( isObject( %cubemap ) )
    {
-      MessageBoxYesNoCancel("Delete Cubemap?", 
+      toolsMessageBoxYesNoCancel("Delete Cubemap?", 
          "Are you sure you want to delete<br><br>" @ %cubemap.getName() @ "<br><br> Cubemap deletion won't take affect until the engine is quit.", 
          "MaterialEditorGui.deleteCubemap( " @ %cubemap @ ", " @ %idx @ " );", 
          "", 
@@ -1926,7 +1926,7 @@ function matEd_cubemapEd_availableCubemapList::onSelect( %this, %id, %cubemap )
    if( matEd_cubemapEditor.dirty )
    {         
       %savedCubemap = MaterialEditorGui.currentCubemap;
-      MessageBoxYesNoCancel("Save Existing Cubemap?", 
+      toolsMessageBoxYesNoCancel("Save Existing Cubemap?", 
       "Do you want to save changes to <br><br>" @ %savedCubemap.getName(), 
       "MaterialEditorGui.saveCubemap(" @ true @ ");", 
       "MaterialEditorGui.saveCubemapDialogDontSave(" @ %cubemap @ ");",
@@ -1942,7 +1942,7 @@ function MaterialEditorGui::showSaveCubemapDialog( %this )
    if( !isObject(%cubemap) )
       return;
       
-   MessageBoxYesNoCancel("Save Cubemap?", 
+   toolsMessageBoxYesNoCancel("Save Cubemap?", 
       "Do you want to save changes to <br><br>" @ %cubemap.getName(), 
       "MaterialEditorGui.saveCubemap( " @ %cubemap @ " );", 
       "", 
@@ -2070,7 +2070,7 @@ function MaterialEditorGui::copyCubemaps( %this, %copyFrom, %copyTo)
 
 function MaterialEditorGui::showSaveDialog( %this, %toMaterial )
 {
-   MessageBoxYesNoCancel("Save Material?", 
+   toolsMessageBoxYesNoCancel("Save Material?", 
       "The material " @ MaterialEditorGui.currentMaterial.getName() @ " has unsaved changes. <br>Do you want to save?", 
       "MaterialEditorGui.saveDialogSave(" @ %toMaterial @ ");", 
       "MaterialEditorGui.saveDialogDontSave(" @ %toMaterial @ ");", 
@@ -2081,7 +2081,7 @@ function MaterialEditorGui::showMaterialChangeSaveDialog( %this, %toMaterial )
 {
    %fromMaterial = MaterialEditorGui.currentMaterial;
    
-   MessageBoxYesNoCancel("Save Material?", 
+   toolsMessageBoxYesNoCancel("Save Material?", 
       "The material " @ %fromMaterial.getName() @ " has unsaved changes. <br>Do you want to save before changing the material?", 
       "MaterialEditorGui.saveDialogSave(" @ %toMaterial @ "); MaterialEditorGui.changeMaterial(" @ %fromMaterial @ ", " @ %toMaterial @ ");", 
       "MaterialEditorGui.saveDialogDontSave(" @ %toMaterial @ "); MaterialEditorGui.changeMaterial(" @ %fromMaterial @ ", " @ %toMaterial @ ");", 
@@ -2091,7 +2091,7 @@ function MaterialEditorGui::showMaterialChangeSaveDialog( %this, %toMaterial )
 /*
 function MaterialEditorGui::showCreateNewMaterialSaveDialog( %this, %toMaterial )
 {
-   MessageBoxYesNoCancel("Save Material?", 
+   toolsMessageBoxYesNoCancel("Save Material?", 
       "The material " @ MaterialEditorGui.currentMaterial.getName() @ " has unsaved changes. <br>Do you want to save before changing the material?", 
       "MaterialEditorGui.save(); MaterialEditorGui.createNewMaterial(" @ %toMaterial @ ");", 
       "MaterialEditorGui.saveDialogDontSave(" @ %toMaterial @ "); MaterialEditorGui.changeMaterial(" @ %toMaterial @ ");", 
@@ -2133,7 +2133,7 @@ function MaterialEditorGui::save( %this )
 {
    if( MaterialEditorGui.currentMaterial.getName() $= "" )
    {
-      MessageBoxOK("Cannot perform operation", "Saved materials cannot be named \"\". A name must be given before operation is performed" );
+      toolsMessageBoxOK("Cannot perform operation", "Saved materials cannot be named \"\". A name must be given before operation is performed" );
       return;   
    }
    
@@ -2143,7 +2143,7 @@ function MaterialEditorGui::save( %this )
    %currentMaterial = MaterialEditorGui.currentMaterial;
    if( %currentMaterial == -1 )
    {
-      MessageBoxOK("Cannot perform operation", "Could not locate material" );
+      toolsMessageBoxOK("Cannot perform operation", "Could not locate material" );
       return;
    }
 
@@ -2348,7 +2348,7 @@ function MaterialEditorGui::lookupMaterialInstances( %this )
 {
    if( MaterialEditorGui.currentMaterial.getName() $= "" )
    {
-      MessageBoxOK("Cannot perform operation", "Unable to look up a material with a blank name" );
+      toolsMessageBoxOK("Cannot perform operation", "Unable to look up a material with a blank name" );
       return;   
    }
    

+ 1 - 1
Templates/BaseGame/game/tools/missionAreaEditor/main.cs

@@ -104,7 +104,7 @@ function MissionAreaEditorPlugin::setEditorFunction( %this )
    %missionAreaExists = isObject(getMissionAreaServerObject());
 
    if( %missionAreaExists == false )
-      MessageBoxYesNoCancel("No Mission Area","Would you like to create a New Mission Area?", "MissionAreaEditorPlugin.createNewMissionArea();");
+      toolsMessageBoxYesNoCancel("No Mission Area","Would you like to create a New Mission Area?", "MissionAreaEditorPlugin.createNewMissionArea();");
 
    return %missionAreaExists;
 }

+ 2 - 2
Templates/BaseGame/game/tools/navEditor/CreateNewNavMeshDlg.gui

@@ -346,7 +346,7 @@ function CreateNewNavMeshDlg::create(%this)
    %name = %this-->MeshName.getText();
    if(%name $= "" || nameToID(%name) != -1)
    {
-      MessageBoxOk("Error", "A NavMesh must have a unique name!");
+      toolsMessageBoxOk("Error", "A NavMesh must have a unique name!");
       return;
    }
 
@@ -356,7 +356,7 @@ function CreateNewNavMeshDlg::create(%this)
    {
       if(!isObject(getScene(0)))
       {
-         MessageBoxOk("Error", "You must have a Scene to use the mission bounds function.");
+         toolsMessageBoxOk("Error", "You must have a Scene to use the mission bounds function.");
          return;
       }
       // Get maximum extents of all objects.

+ 1 - 1
Templates/BaseGame/game/tools/navEditor/main.cs

@@ -132,7 +132,7 @@ function NavEditorPlugin::onActivated(%this)
    if(!isObject(ServerNavMeshSet))
       new SimSet(ServerNavMeshSet);
    if(ServerNavMeshSet.getCount() == 0)
-	  MessageBoxYesNo("No NavMesh", "There is no NavMesh in this level. Would you like to create one?" SPC
+	  toolsMessageBoxYesNo("No NavMesh", "There is no NavMesh in this level. Would you like to create one?" SPC
 	                                "If not, please use the Nav Editor to create a new NavMesh.",
 	                                "Canvas.pushDialog(CreateNewNavMeshDlg);");
    NavTreeView.open(ServerNavMeshSet, true);

+ 2 - 2
Templates/BaseGame/game/tools/navEditor/navEditor.cs

@@ -122,7 +122,7 @@ function NavEditorGui::deleteSelected(%this)
    case "SelectMode":
       // Try to delete the selected NavMesh.
       if(isObject(NavEditorGui.selectedObject))
-         MessageBoxYesNo("Warning",
+         toolsMessageBoxYesNo("Warning",
             "Are you sure you want to delete" SPC NavEditorGui.selectedObject.getName(),
             "NavEditorGui.deleteMesh();");
    case "TestMode":
@@ -277,7 +277,7 @@ function NavEditorGui::followObject(%this)
       {
          eval("%obj = " @ %text);
          if(!isObject(%obj))
-            MessageBoxOk("Error", "Cannot find object" SPC %text);
+            toolsMessageBoxOk("Error", "Cannot find object" SPC %text);
       }
       if(isObject(%obj))
          %this.getPlayer().followObject(%obj, NavEditorOptionsWindow-->TestProperties->FollowRadius.getText());

+ 7 - 7
Templates/BaseGame/game/tools/particleEditor/particleEmitterEditor.ed.cs

@@ -420,7 +420,7 @@ function PE_EmitterEditor::updateParticlesFields( %this )
    
    if( %changedEditParticle && PE_ParticleEditor.dirty )
    {
-      MessageBoxYesNoCancel("Save Particle Changes?", 
+      toolsMessageBoxYesNoCancel("Save Particle Changes?", 
          "Do you wish to save the changes made to the <br>current particle before changing the particle?", 
          "PE_ParticleEditor.saveParticle( " @ PE_ParticleEditor.currParticle.getName() @ " ); PE_EmitterEditor.updateEmitter( \"particles\"," @ %particles @ ");", 
          "PE_ParticleEditor.saveParticleDialogDontSave( " @ PE_ParticleEditor.currParticle.getName() @ " ); PE_EmitterEditor.updateEmitter( \"particles\"," @ %particles @ ");", 
@@ -447,14 +447,14 @@ function PE_EmitterEditor::onNewEmitter( %this )
       
       if( PE_ParticleEditor.dirty )
       {         
-         MessageBoxYesNo("Save Existing Particle?", 
+         toolsMessageBoxYesNo("Save Existing Particle?", 
             "Do you want to save changes to <br><br>" @ PE_ParticleEditor.currParticle.getName(), 
             "PE_ParticleEditor.saveParticle(" @ PE_ParticleEditor.currParticle @ ");"
          );
       }
             
       %savedEmitter = PE_EmitterEditor.currEmitter;
-      MessageBoxYesNoCancel("Save Existing Emitter?", 
+      toolsMessageBoxYesNoCancel("Save Existing Emitter?", 
          "Do you want to save changes to <br><br>" @ %savedEmitter.getName(), 
          "PE_EmitterEditor.saveEmitter(" @ %savedEmitter@ "); PE_EmitterEditor.loadNewEmitter();", 
          "PE_EmitterEditor.saveEmitterDialogDontSave(" @ %savedEmitter @ "); PE_EmitterEditor.loadNewEmitter();"
@@ -527,7 +527,7 @@ function PE_EmitterEditor::showNewDialog( %this )
    
    if( PE_ParticleEditor.dirty )
    {         
-      MessageBoxYesNo("Save Existing Particle?", 
+      toolsMessageBoxYesNo("Save Existing Particle?", 
          "Do you want to save changes to <br><br>" @ PE_ParticleEditor.currParticle.getName(), 
          "PE_ParticleEditor.saveParticle(" @ PE_ParticleEditor.currParticle @ ");"
       );
@@ -535,7 +535,7 @@ function PE_EmitterEditor::showNewDialog( %this )
    
    if( PE_EmitterEditor.dirty )
    {
-      MessageBoxYesNoCancel("Save Emitter Changes?", 
+      toolsMessageBoxYesNoCancel("Save Emitter Changes?", 
          "Do you wish to save the changes made to the <br>current emitter before changing the emitter?", 
          "PE_EmitterEditor.saveEmitter( " @ PE_EmitterEditor.currEmitter.getName() @ " ); PE_EmitterEditor.createEmitter();", 
          "PE_EmitterEditor.saveEmitterDialogDontSave( " @ PE_EmitterEditor.currEmitter.getName() @ " ); PE_EmitterEditor.createEmitter();"
@@ -579,13 +579,13 @@ function PE_EmitterEditor::showDeleteDialog( %this )
 {
    if( PE_EmitterEditor.currEmitter.getName() $= "DefaultEmitter" )
    {
-      MessageBoxOK( "Error", "Cannot delete DefaultEmitter");
+      toolsMessageBoxOK( "Error", "Cannot delete DefaultEmitter");
       return;
    }
    
    if( isObject( PE_EmitterEditor.currEmitter ) )
    {
-      MessageBoxYesNoCancel("Delete Emitter?", 
+      toolsMessageBoxYesNoCancel("Delete Emitter?", 
          "Are you sure you want to delete<br><br>" @ PE_EmitterEditor.currEmitter.getName() @ "<br><br> Emitter deletion won't take affect until the level is exited.", 
          "PE_EmitterEditor.saveEmitterDialogDontSave( " @ PE_EmitterEditor.currEmitter.getName() @ " ); PE_EmitterEditor.deleteEmitter();"
       );

+ 6 - 6
Templates/BaseGame/game/tools/particleEditor/particleParticleEditor.ed.cs

@@ -366,7 +366,7 @@ function PE_ParticleEditor::onNewParticle( %this )
    // Load new particle if we're not in a dirty state
    if( PE_ParticleEditor.dirty )
    {         
-      MessageBoxYesNoCancel("Save Existing Particle?", 
+      toolsMessageBoxYesNoCancel("Save Existing Particle?", 
          "Do you want to save changes to <br><br>" @ PE_ParticleEditor.currParticle.getName(), 
          "PE_ParticleEditor.saveParticle(" @ PE_ParticleEditor.currParticle @ ");", 
          "PE_ParticleEditor.saveParticleDialogDontSave(" @ PE_ParticleEditor.currParticle @ "); PE_ParticleEditor.loadNewParticle();"
@@ -430,7 +430,7 @@ function PE_ParticleEditor::showNewDialog( %this, %replaceSlot )
    // Open a dialog if the current Particle is dirty
    if( PE_ParticleEditor.dirty ) 
    {
-      MessageBoxYesNoCancel("Save Particle Changes?", 
+      toolsMessageBoxYesNoCancel("Save Particle Changes?", 
          "Do you wish to save the changes made to the <br>current particle before changing the particle?", 
          "PE_ParticleEditor.saveParticle( " @ PE_ParticleEditor.currParticle.getName() @ " ); PE_ParticleEditor.createParticle( " @ %replaceSlot @ " );", 
          "PE_ParticleEditor.saveParticleDialogDontSave( " @ PE_ParticleEditor.currParticle.getName() @ " ); PE_ParticleEditor.createParticle( " @ %replaceSlot @ " );"
@@ -453,7 +453,7 @@ function PE_ParticleEditor::createParticle( %this, %replaceSlot )
       %numExistingParticles = getWordCount( PE_EmitterEditor.currEmitter.particles );
       if( %numExistingParticles > 3 )
       {
-         MessageBoxOK( "Error", "An emitter cannot have more than 4 particles assigned to it." );
+         toolsMessageBoxOK( "Error", "An emitter cannot have more than 4 particles assigned to it." );
          return;
       }
       
@@ -493,7 +493,7 @@ function PE_ParticleEditor::showDeleteDialog( %this )
    
    if( PE_ParticleEditor.currParticle.getName() $= "DefaultParticle" )
    {
-      MessageBoxOK( "Error", "Cannot delete DefaultParticle");
+      toolsMessageBoxOK( "Error", "Cannot delete DefaultParticle");
       return;
    }
    
@@ -501,7 +501,7 @@ function PE_ParticleEditor::showDeleteDialog( %this )
    
    if( getWordCount( PE_EmitterEditor.currEmitter.particles ) == 1 )
    {
-      MessageBoxOK( "Error", "At least one particle must remain on the particle emitter.");
+      toolsMessageBoxOK( "Error", "At least one particle must remain on the particle emitter.");
       return;
    }
    
@@ -509,7 +509,7 @@ function PE_ParticleEditor::showDeleteDialog( %this )
    
    if( isObject( PE_ParticleEditor.currParticle ) )
    {
-      MessageBoxYesNoCancel( "Delete Particle?", 
+      toolsMessageBoxYesNoCancel( "Delete Particle?", 
          "Are you sure you want to delete<br><br>" @ PE_ParticleEditor.currParticle.getName() @ "<br><br> Particle deletion won't take affect until the engine is quit.", 
          "PE_ParticleEditor.saveParticleDialogDontSave( " @ PE_ParticleEditor.currParticle.getName() @ " ); PE_ParticleEditor.deleteParticle();", 
          "", 

+ 1 - 1
Templates/BaseGame/game/tools/roadEditor/main.cs

@@ -166,7 +166,7 @@ function RoadEditorPlugin::setEditorFunction( %this )
    %terrainExists = parseMissionGroup( "TerrainBlock" );
 
    if( %terrainExists == false )
-      MessageBoxYesNoCancel("No Terrain","Would you like to create a New Terrain?", "AssetBrowser.setupCreateNewAsset(\"TerrainAsset\", AssetBrowser.selectedModule, createTerrainBlock);");
+      toolsMessageBoxYesNoCancel("No Terrain","Would you like to create a New Terrain?", "AssetBrowser.setupCreateNewAsset(\"TerrainAsset\", AssetBrowser.selectedModule, createTerrainBlock);");
    
    return %terrainExists;
 }

+ 1 - 1
Templates/BaseGame/game/tools/roadEditor/roadEditorGui.cs

@@ -62,7 +62,7 @@ function RoadEditorGui::onDeleteKey( %this )
    }
    else
    {
-      MessageBoxOKCancel( "Notice", "Delete selected DecalRoad?", "RoadEditorGui.deleteRoad();", "" );
+      toolsMessageBoxOKCancel( "Notice", "Delete selected DecalRoad?", "RoadEditorGui.deleteRoad();", "" );
    }   
 }
 

+ 1 - 1
Templates/BaseGame/game/tools/shapeEditor/main.cs

@@ -323,7 +323,7 @@ function ShapeEditorPlugin::openShape( %this, %path, %discardChangesToCurrent )
    
    if( ShapeEditor.isDirty() && !%discardChangesToCurrent )
    {
-      MessageBoxYesNo( "Save Changes?",
+      toolsMessageBoxYesNo( "Save Changes?",
          "Save changes to current shape?",
          "ShapeEditor.saveChanges(); ShapeEditorPlugin.openShape(\"" @ %path @ "\");",
          "ShapeEditorPlugin.openShape(\"" @ %path @ "\");" );

+ 6 - 6
Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.cs

@@ -265,7 +265,7 @@ function ShapeEdSelectWindow::onSelect( %this, %path )
    if ( ShapeEditor.isDirty() )
    {
       %cmd = "showImportDialog( \"" @ %path @ "\", \"ShapeEditor.selectShape( \\\"" @ %path @ "\\\", ";
-      MessageBoxYesNoCancel( "Shape Modified", "Would you like to save your changes?", %cmd @ "true );\" );", %cmd @ "false );\" );" );
+      toolsMessageBoxYesNoCancel( "Shape Modified", "Would you like to save your changes?", %cmd @ "true );\" );", %cmd @ "false );\" );" );
    }
    else
    {
@@ -296,7 +296,7 @@ function ShapeEditor::selectShape( %this, %path, %saveOld )
    // Initialise the shape preview window
    if ( !ShapeEdShapeView.setModel( %path ) )
    {
-      MessageBoxOK( "Error", "Failed to load '" @ %path @ "'. Check the console for error messages." );
+      toolsMessageBoxOK( "Error", "Failed to load '" @ %path @ "'. Check the console for error messages." );
       return;
    }
    ShapeEdShapeView.fitToShape();
@@ -1617,7 +1617,7 @@ function ShapeEdSequences::onEditBlend( %this )
       %blendFrame = %this-->blendFrame.getText();
       if ( ( %blendSeq $= "" ) || ( %blendFrame $= "" ) )
       {
-         MessageBoxOK( "Blend reference not set", "The blend reference sequence and " @
+         toolsMessageBoxOK( "Blend reference not set", "The blend reference sequence and " @
             "frame must be set before changing the blend flag or frame." );
          ShapeEdSequences-->blendFlag.setStateOn( %oldBlend );
          return;
@@ -2231,7 +2231,7 @@ function ShapeEdSequences::onAddTrigger( %this )
         %frame = mRound( ShapeEdSeqSlider.getValue() ) - %this-->startFrame.getText();
         if ((%frame < 0) || (%frame > %this-->endFrame.getText() - %this-->startFrame.getText()))
         {
-            MessageBoxOK( "Error", "Trigger out of range of the selected animation." );
+            toolsMessageBoxOK( "Error", "Trigger out of range of the selected animation." );
         }
         else
         {
@@ -3157,7 +3157,7 @@ function ShapeEdColWindow::editCollision( %this )
    if ( ( ShapeEditor.shape.getDetailLevelIndex( -1 ) >= 0 ) &&
         ( getField(%this.lastColSettings, 0) $= "" ) )
    {
-      MessageBoxYesNo( "Warning", "Existing collision geometry at detail size " @
+      toolsMessageBoxYesNo( "Warning", "Existing collision geometry at detail size " @
          "-1 will be removed, and this cannot be undone. Do you want to continue?",
          "ShapeEdColWindow.editCollisionOK();", "" );
    }
@@ -3366,7 +3366,7 @@ function ShapeEdMountWindow::mountShape( %this, %slot )
    }
    else
    {
-      MessageBoxOK( "Error", "Failed to mount \"" @ %model @ "\". Check the console for error messages.", "" );
+      toolsMessageBoxOK( "Error", "Failed to mount \"" @ %model @ "\". Check the console for error messages.", "" );
    }
 }
 

+ 3 - 3
Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditorActions.ed.cs

@@ -95,7 +95,7 @@ function ShapeEditor::doAction( %this, %action )
    }
    else
    {
-      MessageBoxOK( "Error", %action.actionName SPC "failed. Check the console for error messages.", "" );
+      toolsMessageBoxOK( "Error", %action.actionName SPC "failed. Check the console for error messages.", "" );
    }
 }
 
@@ -108,7 +108,7 @@ function BaseShapeEdAction::redo( %this )
    }
    else
    {
-      MessageBoxOK( "Error", "Redo" SPC %this.actionName SPC "failed. Check the console for error messages.", "" );
+      toolsMessageBoxOK( "Error", "Redo" SPC %this.actionName SPC "failed. Check the console for error messages.", "" );
    }
 }
 
@@ -122,7 +122,7 @@ function BaseShapeEdAction::undo( %this )
 function ShapeEditor::doRemoveShapeData( %this, %type, %name )
 {
    // Removing data from the shape cannot be undone => so warn the user first
-   MessageBoxYesNo( "Warning", "Deleting a " @ %type @ " cannot be undone. Do " @
+   toolsMessageBoxYesNo( "Warning", "Deleting a " @ %type @ " cannot be undone. Do " @
       "you want to continue?", "ShapeEditor.doRemove" @ %type @ "( \"" @ %name @ "\" );", "" );
 }
 

+ 1 - 1
Templates/BaseGame/game/tools/worldEditor/gui/CameraSettingsTab.ed.gui

@@ -413,7 +413,7 @@ function ECameraSettingsPage::deleteCameraSettingsGroup( %this, %levelName, %rol
 {
    if( %levelName $= EditorGui.levelName )
    {
-      MessageBoxOK("Error", "You may not delete the settings group associated with the currently loaded level");
+      toolsMessageBoxOK("Error", "You may not delete the settings group associated with the currently loaded level");
       return;
    }
    

+ 1 - 1
Templates/BaseGame/game/tools/worldEditor/gui/guiTerrainExportGui.gui

@@ -238,7 +238,7 @@ function TerrainExportGui::export( %this )
    %terrainObj = TerrainSelectListBox.getItemObject( %itemId );
    if ( !isObject( %terrainObj ) )
    {
-      MessageBoxOK( "Export failed", "Could not find the selected TerrainBlock!" );
+      toolsMessageBoxOK( "Export failed", "Could not find the selected TerrainBlock!" );
       return;
    }
 

+ 1 - 1
Templates/BaseGame/game/tools/worldEditor/gui/guiTerrainImportGui.gui

@@ -620,7 +620,7 @@ function TerrainImportGui::import( %this )
    }
    else
    {
-      MessageBox( "Import Terrain", 
+      toolsMessageBox( "Import Terrain", 
          "Terrain import failed! Check console for error messages.", 
          "Ok", "Error" );
    }

+ 2 - 2
Templates/BaseGame/game/tools/worldEditor/gui/objectBuilderGui.ed.gui

@@ -716,7 +716,7 @@ function ObjectBuilderGui::buildScatterSky( %this, %dontWarnAboutSun )
 
          if( %object.isMemberOfClass( "Sun" ) )
          {
-            MessageBoxYesNo( "Warning",
+            toolsMessageBoxYesNo( "Warning",
                "A ScatterSky object will conflict with the Sun object that is already in the level." SPC
                "Do you still want to create a ScatterSky object?",
                %this @ ".buildScatterSky( true );" );
@@ -812,7 +812,7 @@ function ObjectBuilderGui::buildSun( %this, %dontWarnAboutScatterSky )
             
          if( %object.isMemberOfClass( "ScatterSky" ) )
          {
-            MessageBoxYesNo( "Warning",
+            toolsMessageBoxYesNo( "Warning",
                "A Sun object will conflict with the ScatterSky object that is already in the level." SPC
                "Do you still want to create a Sun object?",
                %this @ ".buildSun( true );" );

+ 6 - 6
Templates/BaseGame/game/tools/worldEditor/scripts/AddFMODProjectDlg.ed.cs

@@ -45,7 +45,7 @@ function AddFMODProjectDlg::show( %this )
    
    if( getField( sfxGetDeviceInfo(), $SFX::DEVICE_INFO_PROVIDER ) !$= "FMOD" )
    {
-      MessageBoxOK( "Error",
+      toolsMessageBoxOK( "Error",
          "You do not currently have FMOD selected as your sound system." NL
          "" NL
          "To install FMOD, place the FMOD DLLs (" @ %fmodex @ " and " @ %fmodevent @ ")" SPC
@@ -64,7 +64,7 @@ function AddFMODProjectDlg::show( %this )
    %deviceCaps = getField( sfxGetDeviceInfo(), $SFX::DEVICE_INFO_CAPS );
    if( !( %deviceCaps & $SFX::DEVICE_CAPS_FMODDESIGNER ) )
    {
-      MessageBoxOK( "Error",
+      toolsMessageBoxOK( "Error",
          "You do not have the requisite FMOD Event DLL in place." NL
          "" NL
          "Please copy " @ %fmodevent @ " into your game/ folder and restart Torque."
@@ -114,14 +114,14 @@ function AddFMODProjectDlg::onOK( %this )
    
    if( %fileName $= "" )
    {
-      MessageBoxOK( "Error",
+      toolsMessageBoxOK( "Error",
          "Please enter a project file name."
       );
       return;
    }
    if( !isFile( %fileName ) )
    {
-      MessageBoxOK( "Error",
+      toolsMessageBoxOK( "Error",
          "'" @ %fileName @ "' is not a valid file."
       );
       return;
@@ -131,7 +131,7 @@ function AddFMODProjectDlg::onOK( %this )
    
    if( !isDirectory( %mediaPath ) )
    {
-      MessageBoxOK( "Error",
+      toolsMessageBoxOK( "Error",
          "'" @ %mediaPath @ "' is not a valid directory."
       );
       return;
@@ -155,7 +155,7 @@ function AddFMODProjectDlg::onOK( %this )
    
    if( !isObject( %objName ) )
    {
-      MessageBoxOK( "Error",
+      toolsMessageBoxOK( "Error",
          "Failed to create the object.  Please take a look at the log for details."
       );
       return;

+ 1 - 1
Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.cs

@@ -2088,7 +2088,7 @@ function EWorldEditor::addSimGroup( %this, %groupCurrentSelection )
    %activeSelection = %this.getActiveSelection();
    if ( %activeSelection.getObjectIndex( getScene(0) ) != -1 )
    {
-      MessageBoxOK( "Error", "Cannot add Scene to a new SimGroup" );
+      toolsMessageBoxOK( "Error", "Cannot add Scene to a new SimGroup" );
       return;
    }
 

+ 1 - 1
Templates/BaseGame/game/tools/worldEditor/scripts/ManageSFXParametersWindow.ed.cs

@@ -84,7 +84,7 @@ function EManageSFXParameters::createNewParameter( %this, %name )
 
 function EManageSFXParameters::showDeleteParameterDlg( %this, %parameter )
 {
-   MessageBoxOkCancel( "Confirmation",
+   toolsMessageBoxOkCancel( "Confirmation",
       "Really delete '" @ %parameter.getInternalName() @ "'?" NL
       "" NL
       "The parameter will be removed from the file '" @ %parameter.getFileName() @ "'.",

+ 3 - 3
Templates/BaseGame/game/tools/worldEditor/scripts/SelectObjectsWindow.ed.cs

@@ -133,7 +133,7 @@ function ESelectObjectsWindow::onSelectObjects( %this, %val, %reuseExistingSet )
       {
          if( !%name.isMemberOfClass( "WorldEditorSelection" ) )
          {
-            MessageBoxOk( "Error",
+            toolsMessageBoxOk( "Error",
                "An object called '" @ %name @ "' already exists and is not a selection." NL
                "" NL
                "Please choose a different name." );
@@ -141,7 +141,7 @@ function ESelectObjectsWindow::onSelectObjects( %this, %val, %reuseExistingSet )
          }
          else if( !%reuseExistingSet )
          {
-            MessageBoxYesNo( "Question",
+            toolsMessageBoxYesNo( "Question",
                "A selection called '" @ %name @ "' already exists. Modify the existing selection?",
                %this @ ".onSelectObjects( " @ %val @ ", true );" );
             return;
@@ -159,7 +159,7 @@ function ESelectObjectsWindow::onSelectObjects( %this, %val, %reuseExistingSet )
          eval( "%sel = new WorldEditorSelection( " @ %name @ " ) { parentGroup = Selections; canSave = true; };" );
          if( !isObject( %sel ) )
          {
-            MessageBoxOk( "Error",
+            toolsMessageBoxOk( "Error",
                "Could not create the selection set.  Please look at the console.log for details." );
             return;
          }

+ 1 - 1
Templates/BaseGame/game/tools/worldEditor/scripts/cameraBookmarks.ed.cs

@@ -338,7 +338,7 @@ function EManageBookmarksTextEdit::onValidate( %this )
    {
       %id = %this.getId();
       %callback = %id @ ".setText(\"" @ %oldname @ "\"); " @ %id @ ".makeFirstResponder(true); " @ %id @ ".selectAllText();";
-      MessageBoxOK("Create Bookmark", "You must provide a unique name for the new bookmark.", %callback);
+      toolsMessageBoxOK("Create Bookmark", "You must provide a unique name for the new bookmark.", %callback);
       return;
    }
    

+ 3 - 3
Templates/BaseGame/game/tools/worldEditor/scripts/editors/terrainEditor.ed.cs

@@ -189,7 +189,7 @@ function EPainter::updateLayers( %this, %matIndex )
 
 function EPainter::showMaterialDeleteDlg( %this, %matInternalName )
 {
-   MessageBoxYesNo( "Confirmation",
+   toolsMessageBoxYesNo( "Confirmation",
       "Really remove material '" @ %matInternalName @ "' from the terrain?",
       %this @ ".removeMaterial( " @ %matInternalName @ " );", "" );
 }
@@ -389,7 +389,7 @@ function TerrainEditorPlugin::setEditorFunction(%this)
    %terrainExists = parseMissionGroup( "TerrainBlock" );
 
    if( %terrainExists == false )
-      MessageBoxYesNoCancel("No Terrain","Would you like to create a New Terrain? No to Select Existing Terrain Block Asset", 
+      toolsMessageBoxYesNoCancel("No Terrain","Would you like to create a New Terrain? No to Select Existing Terrain Block Asset", 
          "AssetBrowser.setupCreateNewAsset(\"TerrainAsset\", AssetBrowser.selectedModule, createTerrainBlock);",
          "AssetBrowser.showDialog(\"TerrainAsset\", createTerrainBlock, \"\", \"\", \"\");");
 
@@ -401,7 +401,7 @@ function TerrainPainterPlugin::setEditorFunction(%this, %overrideGroup)
    %terrainExists = parseMissionGroup( "TerrainBlock" );
 
    if( %terrainExists == false )
-      MessageBoxYesNoCancel("No Terrain","Would you like to create a New Terrain? No to Select Existing Terrain Block Asset", 
+      toolsMessageBoxYesNoCancel("No Terrain","Would you like to create a New Terrain? No to Select Existing Terrain Block Asset", 
          "AssetBrowser.setupCreateNewAsset(\"TerrainAsset\", AssetBrowser.selectedModule, createTerrainBlock);",
          "AssetBrowser.showDialog(\"TerrainAsset\", createTerrainBlock, \"\", \"\", \"\");");
 

+ 3 - 3
Templates/BaseGame/game/tools/worldEditor/scripts/interfaces/terrainMaterialDlg.ed.cs

@@ -206,7 +206,7 @@ function TerrainMaterialDlg::setMaterialName( %this, %newName )
       %existingMat = TerrainMaterialSet.findObjectByInternalName( %newName );
       if( isObject( %existingMat ) )
       {
-         MessageBoxOK( "Error",
+         toolsMessageBoxOK( "Error",
             "There already is a terrain material called '" @ %newName @ "'.", "", "" );
       }
       else
@@ -366,7 +366,7 @@ function TerrainMaterialDlg::deleteMat( %this )
    if ( ( ETerrainEditor.getMaterialCount() == 1 ) &&
         ( ETerrainEditor.getMaterialIndex( %this.activeMat.internalName ) != -1 ) )
    {
-      MessageBoxOK( "Error", "Cannot delete this Material, it is the only " @
+      toolsMessageBoxOK( "Error", "Cannot delete this Material, it is the only " @
          "Material still in use by the active Terrain." );
       return;
    }
@@ -543,7 +543,7 @@ function TerrainMaterialDlg::saveDirtyMaterial( %this, %mat )
       %existingMat = TerrainMaterialSet.findObjectByInternalName( %newName );
       if( isObject( %existingMat ) )
       {
-         MessageBoxOK( "Error",
+         toolsMessageBoxOK( "Error",
             "There already is a terrain material called '" @ %newName @ "'.", "", "" );
             
          // Reset the name edit control to the old name.

+ 11 - 11
Templates/BaseGame/game/tools/worldEditor/scripts/menuHandlers.ed.cs

@@ -88,7 +88,7 @@ function EditorQuitGame()
 {
    if( EditorIsDirty())
    {
-      MessageBoxYesNoCancel("Level Modified", "Would you like to save your changes before quitting?", "EditorSaveMissionMenu(); quit();", "quit();", "" );
+      toolsMessageBoxYesNoCancel("Level Modified", "Would you like to save your changes before quitting?", "EditorSaveMissionMenu(); quit();", "quit();", "" );
    }
    else
       quit();
@@ -98,7 +98,7 @@ function EditorExitMission()
 {  
    if( EditorIsDirty())
    {
-      MessageBoxYesNoCancel("Level Modified", "Would you like to save your changes before exiting?", "EditorDoExitMission(true);", "EditorDoExitMission(false);", "");
+      toolsMessageBoxYesNoCancel("Level Modified", "Would you like to save your changes before exiting?", "EditorDoExitMission(true);", "EditorDoExitMission(false);", "");
    }
    else
       EditorDoExitMission(false);
@@ -129,7 +129,7 @@ function EditorOpenTorsionProject( %projectFile )
    %torsionPath = EditorSettings.value( "WorldEditor/torsionPath" );
    if( !isFile( %torsionPath ) )
    {
-      MessageBoxOK(
+      toolsMessageBoxOK(
          "Torsion Not Found",
          "Torsion not found at '" @ %torsionPath @ "'.  Please set the correct path in the Editor Settings."
       );
@@ -147,7 +147,7 @@ function EditorOpenTorsionProject( %projectFile )
          %projectFile = findFirstFile( "*.torsion", false );
          if( !isFile( %projectFile ) )
          {
-            MessageBoxOK(
+            toolsMessageBoxOK(
                "Project File Not Found",
                "Cannot find .torsion project file in '" @ getMainDotCsDir() @ "'."
             );
@@ -168,7 +168,7 @@ function EditorOpenFileInTorsion( %file, %line )
    %torsionPath = EditorSettings.value( "WorldEditor/torsionPath" );
    if( !isFile( %torsionPath ) )
    {
-      MessageBoxOK(
+      toolsMessageBoxOK(
          "Torsion Not Found",
          "Torsion not found at '" @ %torsionPath @ "'.  Please set the correct path in the Editor Settings."
       );
@@ -205,7 +205,7 @@ function EditorNewLevel( %file )
    if ( EditorIsDirty() )
    {
       error(knob);
-      %saveFirst = MessageBox("Mission Modified", "Would you like to save changes to the current mission \"" @
+      %saveFirst = toolsMessageBox("Mission Modified", "Would you like to save changes to the current mission \"" @
          $Server::MissionFile @ "\" before creating a new mission?", "SaveDontSave", "Question") == $MROk;
    }
       
@@ -239,7 +239,7 @@ function EditorNewLevel( %file )
 
 function EditorSaveAsDefaultLevel()
 {
-   MessageBoxYesNo("Save as Default?", "This will save the currently active root scene as the default level the editor loads when it is opened. Continue?",
+   toolsMessageBoxYesNo("Save as Default?", "This will save the currently active root scene as the default level the editor loads when it is opened. Continue?",
       "doEditorSaveAsDefaultLevel();", "");
 }
 
@@ -250,7 +250,7 @@ function doEditorSaveAsDefaultLevel()
 
 function EditorResetDefaultLevel()
 {
-   MessageBoxYesNo("Reset Default?", "This will reset the default level for the editor back to the original. Continue?",
+   toolsMessageBoxYesNo("Reset Default?", "This will reset the default level for the editor back to the original. Continue?",
       "doEditorResetDefaultLevel();", "");
 }
 
@@ -279,7 +279,7 @@ function EditorSaveMission()
    // first check for dirty and read-only files:
    if((EWorldEditor.isDirty || ETerrainEditor.isMissionDirty) && !isWriteableFileName($Server::MissionFile))
    {
-      MessageBox("Error", "Mission file \""@ $Server::MissionFile @ "\" is read-only.  Continue?", "Ok", "Stop");
+      toolsMessageBox("Error", "Mission file \""@ $Server::MissionFile @ "\" is read-only.  Continue?", "Ok", "Stop");
       return false;
    }
    if(ETerrainEditor.isDirty)
@@ -291,7 +291,7 @@ function EditorSaveMission()
       {
          if (!isWriteableFileName(%terrainObject.terrainFile))
          {
-            if (MessageBox("Error", "Terrain file \""@ %terrainObject.terrainFile @ "\" is read-only.  Continue?", "Ok", "Stop") == $MROk)
+            if (toolsMessageBox("Error", "Terrain file \""@ %terrainObject.terrainFile @ "\" is read-only.  Continue?", "Ok", "Stop") == $MROk)
                continue;
             else
                return false;
@@ -370,7 +370,7 @@ function EditorOpenMission(%levelAsset)
    if( EditorIsDirty())
    {
       // "EditorSaveBeforeLoad();", "getLoadFilename(\"*.mis\", \"EditorDoLoadMission\");"
-      if(MessageBox("Mission Modified", "Would you like to save changes to the current mission \"" @
+      if(toolsMessageBox("Mission Modified", "Would you like to save changes to the current mission \"" @
          $Server::MissionFile @ "\" before opening a new mission?", SaveDontSave, Question) == $MROk)
       {
          if(! EditorSaveMission())