Browse Source

Template changes

JeffR 3 years ago
parent
commit
40acf75238

+ 16 - 5
Templates/BaseGame/game/core/gui/scripts/profiles.tscript

@@ -26,6 +26,10 @@ if($Gui::fontCacheDirectory $= "")
    $Gui::fontCacheDirectory = expandFilename("data/cache/fonts");
    $Gui::fontCacheDirectory = expandFilename("data/cache/fonts");
 }
 }
 
 
+$TextMediumEmphasisColor = "200 200 200";
+$TextHighEmphasisColor = "224 224 224";
+$TextDisabledColor = "108 108 108";
+
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // GuiDefaultProfile is a special profile that all other profiles inherit
 // GuiDefaultProfile is a special profile that all other profiles inherit
 // defaults from. It must exist.
 // defaults from. It must exist.
@@ -137,13 +141,20 @@ new GuiControlProfile(GuiTextEditProfile)
    category = "Core";
    category = "Core";
 };
 };
 
 
-if(!isObject(GuiScrollProfile))
-new GuiControlProfile(GuiScrollProfile)
+if(!isObject(GuiMenuScrollProfile))
+new GuiControlProfile(GuiMenuScrollProfile)
 {
 {
    opaque = true;
    opaque = true;
-   fillcolor = "255 255 255";
-   fontColor = "0 0 0";
-   fontColorHL = "150 150 150";
+   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";
    border = true;
    border = true;
    bitmapAsset = "Core_GUI:scrollBar_image";
    bitmapAsset = "Core_GUI:scrollBar_image";
    hasBitmapArray = true;
    hasBitmapArray = true;

+ 1 - 1
Templates/BaseGame/game/data/UI/UI.tscript

@@ -36,7 +36,7 @@ function UI::initClient(%this)
    %this.queueExec("./scripts/profiles");
    %this.queueExec("./scripts/profiles");
    
    
    //Now gui files
    //Now gui files
-   %this.queueExec("./scripts/menuInputButtons");
+   %this.queueExec("./scripts/menuInputHandling");
    
    
    %this.queueExec("./guis/mainMenu");
    %this.queueExec("./guis/mainMenu");
    %this.queueExec("./guis/mainMenu.gui");
    %this.queueExec("./guis/mainMenu.gui");

+ 0 - 7
Templates/BaseGame/game/data/UI/guis/OptionsDlg.asset.taml

@@ -1,7 +0,0 @@
-<GUIAsset
-    canSave="true"
-    canSaveDynamicFields="true"
-    AssetName="OptionsDlg"
-    scriptFile="@assetFile=optionsDlg.gui"
-    GUIFile="@assetFile=optionsDlg.gui"
-    VersionId="1" />

+ 54 - 216
Templates/BaseGame/game/data/UI/guis/joinServerMenu.gui

@@ -14,19 +14,27 @@ $guiContent = new GuiControl(JoinServerMenu) {
    canSave = "1";
    canSave = "1";
    canSaveDynamicFields = "1";
    canSaveDynamicFields = "1";
       returnGui = "MainMenuGui";
       returnGui = "MainMenuGui";
-      
-   new GuiInputCtrl(JoinServerMenuInputHandler){
-      profile = "GuiInputCtrlProfile";
-      visible = "1";
-      active = "1";
-      position = "0 0";
-      extent = "1024 768";
+
+   new GuiInputCtrl(JoinServerMenuInputHandler) {
+      sendAxisEvents = "1";
+      sendBreakEvents = "1";
+      sendModifierEvents = "0";
+      ignoreMouseEvents = "1";
+      lockMouse = "0";
+      position = "-10 0";
+      extent = "10 10";
       minExtent = "8 2";
       minExtent = "8 2";
       horizSizing = "width";
       horizSizing = "width";
       vertSizing = "height";
       vertSizing = "height";
-      sendBreakEvents="1";
+      profile = "GuiInputCtrlProfile";
+      visible = "1";
+      active = "1";
+      tooltipProfile = "GuiToolTipProfile";
+      hovertime = "1000";
+      isContainer = "0";
+      canSave = "1";
+      canSaveDynamicFields = "0";
    };
    };
-
    new GuiControl(JoinServerWindow) {
    new GuiControl(JoinServerWindow) {
       position = "48 56";
       position = "48 56";
       extent = "928 655";
       extent = "928 655";
@@ -46,7 +54,7 @@ $guiContent = new GuiControl(JoinServerMenu) {
          percent = "100";
          percent = "100";
          vertical = "0";
          vertical = "0";
          flipClip = "0";
          flipClip = "0";
-         bitmap = "data/ui/images/panel.png";
+         BitmapAsset = "UI:panel_image";
          color = "255 255 255 255";
          color = "255 255 255 255";
          position = "0 0";
          position = "0 0";
          extent = "927 40";
          extent = "927 40";
@@ -89,7 +97,7 @@ $guiContent = new GuiControl(JoinServerMenu) {
          percent = "100";
          percent = "100";
          vertical = "0";
          vertical = "0";
          flipClip = "0";
          flipClip = "0";
-         bitmap = "data/ui/images/panel_low.png";
+         BitmapAsset = "UI:panel_low_image";
          color = "255 255 255 255";
          color = "255 255 255 255";
          position = "0 40";
          position = "0 40";
          extent = "927 618";
          extent = "927 618";
@@ -105,58 +113,6 @@ $guiContent = new GuiControl(JoinServerMenu) {
          canSave = "1";
          canSave = "1";
          canSaveDynamicFields = "0";
          canSaveDynamicFields = "0";
       };
       };
-      new GuiTextCtrl() {
-         text = "Player Name:";
-         maxLength = "255";
-         margin = "0 0 0 0";
-         padding = "0 0 0 0";
-         anchorTop = "1";
-         anchorBottom = "0";
-         anchorLeft = "1";
-         anchorRight = "0";
-         position = "12 47";
-         extent = "109 18";
-         minExtent = "8 8";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "MenuSubHeaderText";
-         visible = "1";
-         active = "1";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "0";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-      new GuiTextEditCtrl() {
-         historySize = "0";
-         tabComplete = "0";
-         sinkAllKeyEvents = "0";
-         password = "0";
-         passwordMask = "*";
-         text = "Visitor";
-         maxLength = "255";
-         margin = "0 0 0 0";
-         padding = "0 0 0 0";
-         anchorTop = "1";
-         anchorBottom = "0";
-         anchorLeft = "1";
-         anchorRight = "0";
-         position = "124 47";
-         extent = "144 18";
-         minExtent = "8 8";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiMenuTextEditProfile";
-         visible = "1";
-         active = "1";
-         variable = "$pref::Player::Name";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "0";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
       new GuiTextCtrl(JS_status) {
       new GuiTextCtrl(JS_status) {
          text = "No servers found.";
          text = "No servers found.";
          maxLength = "255";
          maxLength = "255";
@@ -166,7 +122,7 @@ $guiContent = new GuiControl(JoinServerMenu) {
          anchorBottom = "0";
          anchorBottom = "0";
          anchorLeft = "1";
          anchorLeft = "1";
          anchorRight = "0";
          anchorRight = "0";
-         position = "277 47";
+         position = "392 47";
          extent = "148 18";
          extent = "148 18";
          minExtent = "8 8";
          minExtent = "8 8";
          horizSizing = "right";
          horizSizing = "right";
@@ -324,25 +280,30 @@ $guiContent = new GuiControl(JoinServerMenu) {
          canSave = "1";
          canSave = "1";
          canSaveDynamicFields = "0";
          canSaveDynamicFields = "0";
 
 
-         new GuiTextListCtrl(JS_serverList) {
-            columns = "0 200 270 335 400";
-            fitParentWidth = "1";
-            clipColumnText = "0";
-            rowHeightPadding = "2";
+         new GuiStackControl(JoinServerList) {
+            stackingType = "Vertical";
+            horizStacking = "Left to Right";
+            vertStacking = "Top to Bottom";
+            padding = "10";
+            dynamicSize = "1";
+            dynamicNonStackExtent = "0";
+            dynamicPos = "0";
+            changeChildSizeToFit = "0";
+            changeChildPosition = "1";
             position = "1 1";
             position = "1 1";
-            extent = "888 8";
-            minExtent = "8 8";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiTextArrayProfile";
+            extent = "888 16";
+            minExtent = "16 16";
+            horizSizing = "center";
+            vertSizing = "center";
+            profile = "GuiDefaultProfile";
             visible = "1";
             visible = "1";
             active = "1";
             active = "1";
-            altCommand = "JoinServerDlg.join();";
             tooltipProfile = "GuiToolTipProfile";
             tooltipProfile = "GuiToolTipProfile";
             hovertime = "1000";
             hovertime = "1000";
             isContainer = "1";
             isContainer = "1";
             canSave = "1";
             canSave = "1";
             canSaveDynamicFields = "0";
             canSaveDynamicFields = "0";
+            class = "MenuList";
          };
          };
       };
       };
       new GuiControl(JS_queryStatus) {
       new GuiControl(JS_queryStatus) {
@@ -427,130 +388,9 @@ $guiContent = new GuiControl(JoinServerMenu) {
             canSaveDynamicFields = "0";
             canSaveDynamicFields = "0";
          };
          };
       };
       };
-      new GuiButtonCtrl(JoinServerBackBtn) {
-         text = "Return to Menu";
-         groupNum = "-1";
-         buttonType = "PushButton";
-         useMouseEvents = "1";
-         position = "0 583";
-         extent = "160 33";
-         minExtent = "8 8";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiMenuButtonProfile";
-         visible = "0";
-         active = "1";
-         command = "Canvas.popDialog(JoinServerMenu);\n\nif(isObject(JoinServerMenu.returnGui) && JoinServerMenu.returnGui.isMethod(\"onReturnTo\"))    JoinServerMenu.returnGui.onReturnTo();";
-         accelerator = "escape";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "0";
-         hidden = "1";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-      new GuiButtonCtrl(JoinServerQryLanBtn) {
-         text = "Query Lan";
-         groupNum = "-1";
-         buttonType = "PushButton";
-         useMouseEvents = "1";
-         position = "160 583";
-         extent = "160 33";
-         minExtent = "8 8";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiMenuButtonProfile";
-         visible = "0";
-         active = "1";
-         command = "JoinServerMenu.queryLan();";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "0";
-         hidden = "1";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-      new GuiButtonCtrl(JoinServerQryInternetBtn) {
-         text = "Query Internet";
-         groupNum = "-1";
-         buttonType = "PushButton";
-         useMouseEvents = "1";
-         position = "320 583";
-         extent = "160 33";
-         minExtent = "8 8";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiMenuButtonProfile";
-         visible = "0";
-         active = "1";
-         command = "JoinServerMenu.query();";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "0";
-         hidden = "1";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-      new GuiButtonCtrl(JoinServerRefreshBtn) {
-         text = "Refresh Server";
-         groupNum = "-1";
-         buttonType = "PushButton";
-         useMouseEvents = "1";
-         position = "480 583";
-         extent = "160 33";
-         minExtent = "8 8";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiMenuButtonProfile";
-         visible = "0";
-         active = "1";
-         command = "JoinServerMenu.refresh();";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "0";
-         hidden = "1";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-      new GuiButtonCtrl(JoinServerJoinBtn) {
-         text = "Join Server";
-         groupNum = "-1";
-         buttonType = "PushButton";
-         useMouseEvents = "1";
-         position = "640 583";
-         extent = "160 33";
-         minExtent = "8 8";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiMenuButtonProfile";
-         visible = "0";
-         active = "0";
-         command = "JoinServerMenu.join();";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "0";
-         hidden = "1";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-   };
-   new GuiControl() {
-      position = "189 652";
-      extent = "646 130";
-      minExtent = "8 2";
-      horizSizing = "center";
-      vertSizing = "top";
-      profile = "GuiDefaultProfile";
-      visible = "1";
-      active = "1";
-      tooltipProfile = "GuiToolTipProfile";
-      hovertime = "1000";
-      isContainer = "1";
-      canSave = "1";
-      canSaveDynamicFields = "0";
    };
    };
    new GuiControl(JoinServerButtonHolder) {
    new GuiControl(JoinServerButtonHolder) {
-      position = "109 711";
+      position = "116 711";
       extent = "791 40";
       extent = "791 40";
       minExtent = "8 2";
       minExtent = "8 2";
       horizSizing = "center";
       horizSizing = "center";
@@ -567,7 +407,7 @@ $guiContent = new GuiControl(JoinServerMenu) {
 
 
       new GuiIconButtonCtrl() {
       new GuiIconButtonCtrl() {
          buttonMargin = "4 4";
          buttonMargin = "4 4";
-         iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
+         BitmapAsset = "UI:Keyboard_Black_Return_image";
          iconLocation = "Left";
          iconLocation = "Left";
          sizeIconToButton = "1";
          sizeIconToButton = "1";
          makeIconSquare = "1";
          makeIconSquare = "1";
@@ -586,7 +426,7 @@ $guiContent = new GuiControl(JoinServerMenu) {
          profile = "GuiMenuButtonProfile";
          profile = "GuiMenuButtonProfile";
          visible = "1";
          visible = "1";
          active = "1";
          active = "1";
-         command = "OptionsMenu.apply();";
+         command = "JoinServerMenu.join();";
          tooltipProfile = "GuiToolTipProfile";
          tooltipProfile = "GuiToolTipProfile";
          hovertime = "1000";
          hovertime = "1000";
          isContainer = "0";
          isContainer = "0";
@@ -597,7 +437,7 @@ $guiContent = new GuiControl(JoinServerMenu) {
       };
       };
       new GuiIconButtonCtrl() {
       new GuiIconButtonCtrl() {
          buttonMargin = "4 4";
          buttonMargin = "4 4";
-         iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Esc";
+         BitmapAsset = "UI:Keyboard_Black_Escape_image";
          iconLocation = "Left";
          iconLocation = "Left";
          sizeIconToButton = "1";
          sizeIconToButton = "1";
          makeIconSquare = "1";
          makeIconSquare = "1";
@@ -616,7 +456,7 @@ $guiContent = new GuiControl(JoinServerMenu) {
          profile = "GuiMenuButtonProfile";
          profile = "GuiMenuButtonProfile";
          visible = "1";
          visible = "1";
          active = "1";
          active = "1";
-         command = "OptionsMenu.backOut();";
+         command = "JoinServerMenu.backOut();";
          tooltipProfile = "GuiToolTipProfile";
          tooltipProfile = "GuiToolTipProfile";
          hovertime = "1000";
          hovertime = "1000";
          isContainer = "0";
          isContainer = "0";
@@ -627,14 +467,14 @@ $guiContent = new GuiControl(JoinServerMenu) {
       };
       };
       new GuiIconButtonCtrl() {
       new GuiIconButtonCtrl() {
          buttonMargin = "4 4";
          buttonMargin = "4 4";
-         iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
+         BitmapAsset = "UI:Keyboard_Black_Q_image";
          iconLocation = "Left";
          iconLocation = "Left";
          sizeIconToButton = "1";
          sizeIconToButton = "1";
          makeIconSquare = "1";
          makeIconSquare = "1";
          textLocation = "Right";
          textLocation = "Right";
          textMargin = "4";
          textMargin = "4";
          autoSize = "0";
          autoSize = "0";
-         text = "Prev Tab";
+         text = "Query LAN";
          groupNum = "-1";
          groupNum = "-1";
          buttonType = "PushButton";
          buttonType = "PushButton";
          useMouseEvents = "0";
          useMouseEvents = "0";
@@ -644,28 +484,27 @@ $guiContent = new GuiControl(JoinServerMenu) {
          horizSizing = "right";
          horizSizing = "right";
          vertSizing = "bottom";
          vertSizing = "bottom";
          profile = "GuiMenuButtonProfile";
          profile = "GuiMenuButtonProfile";
-         visible = "0";
-         active = "0";
-         command = "OptionsMenu.prevTab();";
+         visible = "1";
+         active = "1";
+         command = "JoinServerMenu.queryLan();";
          tooltipProfile = "GuiToolTipProfile";
          tooltipProfile = "GuiToolTipProfile";
          hovertime = "1000";
          hovertime = "1000";
          isContainer = "0";
          isContainer = "0";
          internalName = "queryLANButton";
          internalName = "queryLANButton";
          class = "MenuInputButton";
          class = "MenuInputButton";
-         hidden = "1";
          canSave = "1";
          canSave = "1";
          canSaveDynamicFields = "0";
          canSaveDynamicFields = "0";
       };
       };
       new GuiIconButtonCtrl() {
       new GuiIconButtonCtrl() {
          buttonMargin = "4 4";
          buttonMargin = "4 4";
-         iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Esc";
+         BitmapAsset = "UI:Keyboard_Black_E_image";
          iconLocation = "Left";
          iconLocation = "Left";
          sizeIconToButton = "1";
          sizeIconToButton = "1";
          makeIconSquare = "1";
          makeIconSquare = "1";
          textLocation = "Right";
          textLocation = "Right";
          textMargin = "4";
          textMargin = "4";
          autoSize = "0";
          autoSize = "0";
-         text = "Next Tab";
+         text = "Query Online";
          groupNum = "-1";
          groupNum = "-1";
          buttonType = "PushButton";
          buttonType = "PushButton";
          useMouseEvents = "0";
          useMouseEvents = "0";
@@ -675,28 +514,27 @@ $guiContent = new GuiControl(JoinServerMenu) {
          horizSizing = "right";
          horizSizing = "right";
          vertSizing = "bottom";
          vertSizing = "bottom";
          profile = "GuiMenuButtonProfile";
          profile = "GuiMenuButtonProfile";
-         visible = "0";
-         active = "0";
-         command = "OptionsMenu.nextTab();";
+         visible = "1";
+         active = "1";
+         command = "JoinServerMenu.query();";
          tooltipProfile = "GuiToolTipProfile";
          tooltipProfile = "GuiToolTipProfile";
          hovertime = "1000";
          hovertime = "1000";
          isContainer = "0";
          isContainer = "0";
          internalName = "queryInternetButton";
          internalName = "queryInternetButton";
          class = "MenuInputButton";
          class = "MenuInputButton";
-         hidden = "1";
          canSave = "1";
          canSave = "1";
          canSaveDynamicFields = "0";
          canSaveDynamicFields = "0";
       };
       };
       new GuiIconButtonCtrl() {
       new GuiIconButtonCtrl() {
          buttonMargin = "4 4";
          buttonMargin = "4 4";
-         bitmapAsset = "UI:Keyboard_Black_R_image";
+         BitmapAsset = "UI:Keyboard_Black_R_image";
          iconLocation = "Left";
          iconLocation = "Left";
          sizeIconToButton = "1";
          sizeIconToButton = "1";
          makeIconSquare = "1";
          makeIconSquare = "1";
          textLocation = "Right";
          textLocation = "Right";
          textMargin = "4";
          textMargin = "4";
          autoSize = "0";
          autoSize = "0";
-         text = "Reset";
+         text = "Refresh";
          groupNum = "-1";
          groupNum = "-1";
          buttonType = "PushButton";
          buttonType = "PushButton";
          useMouseEvents = "0";
          useMouseEvents = "0";
@@ -708,7 +546,7 @@ $guiContent = new GuiControl(JoinServerMenu) {
          profile = "GuiMenuButtonProfile";
          profile = "GuiMenuButtonProfile";
          visible = "1";
          visible = "1";
          active = "1";
          active = "1";
-         command = "OptionsMenu.resetToDefaults();";
+         command = "JoinServerMenu.refresh();";
          tooltipProfile = "GuiToolTipProfile";
          tooltipProfile = "GuiToolTipProfile";
          hovertime = "1000";
          hovertime = "1000";
          isContainer = "0";
          isContainer = "0";

+ 17 - 18
Templates/BaseGame/game/data/UI/guis/joinServerMenu.tscript

@@ -3,10 +3,12 @@ function JoinServerMenu::onWake()
 {
 {
    // Double check the status. Tried setting this the control
    // Double check the status. Tried setting this the control
    // inactive to start with, but that didn't seem to work.
    // inactive to start with, but that didn't seem to work.
-   JoinServerJoinBtn.setActive(JS_serverList.rowCount() > 0);
+   JoinServerJoinBtn.setActive(JoinServerList.getCount() > 0);
    
    
    JoinServerButtonHolder.setActive();
    JoinServerButtonHolder.setActive();
    
    
+   JoinServerList.setAsActiveMenuList();
+   
    JoinServerMenuInputHandler.setFirstResponder();
    JoinServerMenuInputHandler.setFirstResponder();
 }   
 }   
 
 
@@ -16,7 +18,7 @@ function JoinServerButtonHolder::onWake(%this)
    %this-->backButton.set("btn_b", "Escape", "Back", "JoinServerMenu.backOut();");
    %this-->backButton.set("btn_b", "Escape", "Back", "JoinServerMenu.backOut();");
    %this-->refreshButton.set("btn_y", "R", "Refresh", "JoinServerMenu.refresh();");
    %this-->refreshButton.set("btn_y", "R", "Refresh", "JoinServerMenu.refresh();");
    %this-->queryLANButton.set("btn_a", "Q", "Query LAN", "JoinServerMenu.queryLan();");
    %this-->queryLANButton.set("btn_a", "Q", "Query LAN", "JoinServerMenu.queryLan();");
-   %this-->queryInternetButton.set("btn_x", "E", "Query Internet", "JoinServerMenu.query();");
+   %this-->queryInternetButton.set("btn_x", "E", "Query Online", "JoinServerMenu.query();");
 }
 }
 
 
 function JoinServerMenuInputHandler::onInputEvent(%this, %device, %action, %state)
 function JoinServerMenuInputHandler::onInputEvent(%this, %device, %action, %state)
@@ -110,23 +112,23 @@ function JoinServerMenu::update(%this)
 {
 {
    // Copy the servers into the server list.
    // Copy the servers into the server list.
    JS_queryStatus.setVisible(false);
    JS_queryStatus.setVisible(false);
-   JS_serverList.clear();
+   JoinServerList.clear();
    %sc = getServerCount();
    %sc = getServerCount();
    for( %i = 0; %i < %sc; %i ++ ) {
    for( %i = 0; %i < %sc; %i ++ ) {
       setServerInfo(%i);
       setServerInfo(%i);
-      JS_serverList.addRow( %i,
-         $ServerInfo::Name TAB
-         $ServerInfo::Ping TAB
-         $ServerInfo::PlayerCount @ "/" @ $ServerInfo::MaxPlayers TAB
-         $ServerInfo::Version TAB
-         $ServerInfo::MissionName
-      );
+      %serverBtn = new GuiButtonCtrl(){
+         text = $ServerInfo::Name TAB
+            $ServerInfo::Ping TAB
+            $ServerInfo::PlayerCount @ "/" @ $ServerInfo::MaxPlayers TAB
+            $ServerInfo::Version TAB
+            $ServerInfo::MissionName;
+         profile = GuiJoinServerButtonProfile;      
+         extent = JoinServerList.extent.x SPC 30; 
+      };
+      JoinServerList.add(%serverBtn);
    }
    }
-   JS_serverList.sort(0);
-   JS_serverList.setSelectedRow(0);
-   JS_serverList.scrollVisible(0);
 
 
-   JoinServerJoinBtn.setActive(JS_serverList.rowCount() > 0);
+   JoinServerJoinBtn.setActive(JoinServerList.getCount() > 0);
 } 
 } 
 
 
 //----------------------------------------
 //----------------------------------------
@@ -141,11 +143,9 @@ function onServerQueryStatus(%status, %msg, %value)
 
 
    switch$ (%status) {
    switch$ (%status) {
       case "start":
       case "start":
-         JoinServerJoinBtn.setActive(false);
-         JoinServerQryInternetBtn.setActive(false);
          JS_statusText.setText(%msg);
          JS_statusText.setText(%msg);
          JS_statusBar.setValue(0);
          JS_statusBar.setValue(0);
-         JS_serverList.clear();
+         JoinServerList.clear();
 
 
       case "ping":
       case "ping":
          JS_statusText.setText("Ping Servers");
          JS_statusText.setText("Ping Servers");
@@ -156,7 +156,6 @@ function onServerQueryStatus(%status, %msg, %value)
          JS_statusBar.setValue(%value);
          JS_statusBar.setValue(%value);
 
 
       case "done":
       case "done":
-         JoinServerQryInternetBtn.setActive(true);
          JS_queryStatus.setVisible(false);
          JS_queryStatus.setVisible(false);
          JS_status.setText(%msg);
          JS_status.setText(%msg);
          JoinServerMenu.update();
          JoinServerMenu.update();

+ 190 - 20
Templates/BaseGame/game/data/UI/guis/mainMenu.gui

@@ -1,6 +1,6 @@
 //--- OBJECT WRITE BEGIN ---
 //--- OBJECT WRITE BEGIN ---
 $guiContent = new GuiChunkedBitmapCtrl(MainMenuGui) {
 $guiContent = new GuiChunkedBitmapCtrl(MainMenuGui) {
-   bitmapAsset = "UI:background_dark_image";
+   BitmapAsset = "UI:background_dark_image";
    useVariable = "0";
    useVariable = "0";
    tile = "0";
    tile = "0";
    position = "0 0";
    position = "0 0";
@@ -19,15 +19,11 @@ $guiContent = new GuiChunkedBitmapCtrl(MainMenuGui) {
       Enabled = "1";
       Enabled = "1";
       isDecoy = "0";
       isDecoy = "0";
       navigationIndex = "-1";
       navigationIndex = "-1";
-      
+
    new GuiBitmapCtrl(MainMenuAppLogo) {
    new GuiBitmapCtrl(MainMenuAppLogo) {
-      bitmapAsset = "UI:Torque_3D_logo_alt_image";
-      bitmapMode = "Stretched";
-      autoFitExtents = "0";
-      useModifiers = "0";
-      useStates = "1";
-      masked = "0";
-      groupNum = "-1";
+      BitmapAsset = "UI:Torque_3D_logo_alt_image";
+      color = "255 255 255 255";
+      wrap = "0";
       position = "550 30";
       position = "550 30";
       extent = "443 139";
       extent = "443 139";
       minExtent = "8 2";
       minExtent = "8 2";
@@ -41,26 +37,179 @@ $guiContent = new GuiChunkedBitmapCtrl(MainMenuGui) {
       isContainer = "0";
       isContainer = "0";
       canSave = "1";
       canSave = "1";
       canSaveDynamicFields = "1";
       canSaveDynamicFields = "1";
+         autoFitExtents = "0";
+         bitmapMode = "Stretched";
+         groupNum = "-1";
+         masked = "0";
          navigationIndex = "-1";
          navigationIndex = "-1";
+         useModifiers = "0";
+         useStates = "1";
    };
    };
-
-   new GuiGameListMenuCtrl(MainMenuButtonList) {
-      debugRender = "0";
-      callbackOnInputs = "1";
-      position = "292 103";
-      extent = "439 561";
-      minExtent = "8 2";
+   new GuiStackControl(MainMenuButtonList) {
+      stackingType = "Vertical";
+      horizStacking = "Left to Right";
+      vertStacking = "Top to Bottom";
+      padding = "15";
+      dynamicSize = "0";
+      dynamicNonStackExtent = "0";
+      dynamicPos = "0";
+      changeChildSizeToFit = "1";
+      changeChildPosition = "1";
+      position = "312 111";
+      extent = "400 477";
+      minExtent = "16 16";
       horizSizing = "center";
       horizSizing = "center";
       vertSizing = "center";
       vertSizing = "center";
-      profile = "DefaultListMenuProfile";
+      profile = "GuiDefaultProfile";
       visible = "1";
       visible = "1";
       active = "1";
       active = "1";
       tooltipProfile = "GuiToolTipProfile";
       tooltipProfile = "GuiToolTipProfile";
       hovertime = "1000";
       hovertime = "1000";
-      isContainer = "0";
-      class = "UIMenuButtonList";
+      isContainer = "1";
       canSave = "1";
       canSave = "1";
       canSaveDynamicFields = "0";
       canSaveDynamicFields = "0";
+      class = "MenuList";
+
+      new GuiButtonCtrl(MainMenuSinglePlayerBtn) {
+         text = "Single Player";
+         groupNum = "-1";
+         buttonType = "PushButton";
+         useMouseEvents = "0";
+         position = "0 0";
+         extent = "400 55";
+         minExtent = "8 2";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "GuiMenuButtonProfile";
+         visible = "1";
+         active = "1";
+         command = "openSinglePlayerMenu();";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
+      new GuiButtonCtrl(MainMenuCreateSrvrBtn) {
+         text = "Create Server";
+         groupNum = "-1";
+         buttonType = "PushButton";
+         useMouseEvents = "0";
+         position = "0 70";
+         extent = "400 55";
+         minExtent = "8 2";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "GuiMenuButtonProfile";
+         visible = "1";
+         active = "1";
+         command = "openMultiPlayerMenu();";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
+      new GuiButtonCtrl(MainMenuJoinSrvrBtn) {
+         text = "Join Server";
+         groupNum = "-1";
+         buttonType = "PushButton";
+         useMouseEvents = "0";
+         position = "0 140";
+         extent = "400 55";
+         minExtent = "8 2";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "GuiMenuButtonProfile";
+         visible = "1";
+         active = "1";
+         command = "openJoinServerMenu();";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
+      new GuiButtonCtrl(MainMenuOptionBtn) {
+         text = "Options";
+         groupNum = "-1";
+         buttonType = "PushButton";
+         useMouseEvents = "0";
+         position = "0 210";
+         extent = "400 55";
+         minExtent = "8 2";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "GuiMenuButtonProfile";
+         visible = "1";
+         active = "1";
+         command = "openOptionsMenu();";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
+      new GuiButtonCtrl(MainMenuWorldEditBtn) {
+         text = "Open World Editor";
+         groupNum = "-1";
+         buttonType = "PushButton";
+         useMouseEvents = "0";
+         position = "0 280";
+         extent = "400 55";
+         minExtent = "8 2";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "GuiMenuButtonProfile";
+         visible = "1";
+         active = "1";
+         command = "openWorldEditorBtn();";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
+      new GuiButtonCtrl(MainMenuGuiEditBtn) {
+         text = "Open GUI Editor";
+         groupNum = "-1";
+         buttonType = "PushButton";
+         useMouseEvents = "0";
+         position = "0 350";
+         extent = "400 55";
+         minExtent = "8 2";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "GuiMenuButtonProfile";
+         visible = "1";
+         active = "1";
+         command = "openGUIEditorBtn();";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
+      new GuiButtonCtrl(MainMenuExitBtn) {
+         text = "Exit";
+         groupNum = "-1";
+         buttonType = "PushButton";
+         useMouseEvents = "0";
+         position = "0 420";
+         extent = "400 55";
+         minExtent = "8 2";
+         horizSizing = "right";
+         vertSizing = "bottom";
+         profile = "GuiMenuButtonProfile";
+         visible = "1";
+         active = "1";
+         command = "exit();";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "0";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+      };
    };
    };
    new GuiControl(MainMenuButtonHolder) {
    new GuiControl(MainMenuButtonHolder) {
       position = "189 711";
       position = "189 711";
@@ -80,7 +229,7 @@ $guiContent = new GuiChunkedBitmapCtrl(MainMenuGui) {
 
 
       new GuiIconButtonCtrl() {
       new GuiIconButtonCtrl() {
          buttonMargin = "4 4";
          buttonMargin = "4 4";
-         iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
+         BitmapAsset = "UI:Keyboard_Black_Return_image";
          iconLocation = "Left";
          iconLocation = "Left";
          sizeIconToButton = "1";
          sizeIconToButton = "1";
          makeIconSquare = "1";
          makeIconSquare = "1";
@@ -109,5 +258,26 @@ $guiContent = new GuiChunkedBitmapCtrl(MainMenuGui) {
          canSaveDynamicFields = "0";
          canSaveDynamicFields = "0";
       };
       };
    };
    };
+   new GuiInputCtrl(MainMenuInputHandler) {
+      class = "MenuInputHandler";
+      sendAxisEvents = "1";
+      sendBreakEvents = "1";
+      sendModifierEvents = "0";
+      ignoreMouseEvents = "1";
+      lockMouse = "0";
+      position = "-50 0";
+      extent = "10 10";
+      minExtent = "8 2";
+      horizSizing = "width";
+      vertSizing = "height";
+      profile = "GuiInputCtrlProfile";
+      visible = "1";
+      active = "1";
+      tooltipProfile = "GuiToolTipProfile";
+      hovertime = "1000";
+      isContainer = "0";
+      canSave = "1";
+      canSaveDynamicFields = "0";
+   };
 };
 };
 //--- OBJECT WRITE END ---
 //--- OBJECT WRITE END ---

+ 3 - 13
Templates/BaseGame/game/data/UI/guis/mainMenu.tscript

@@ -5,8 +5,9 @@ function MainMenuGui::onAdd(%this)
 
 
 function MainMenuGui::onWake(%this)
 function MainMenuGui::onWake(%this)
 {
 {
-   MainMenuButtonList.hidden = false; 
+   MainMenuButtonList.setAsActiveMenuList();
    MainMenuButtonHolder.setActive();
    MainMenuButtonHolder.setActive();
+   MainMenuInputHandler.setFirstResponder();
 }
 }
 
 
 function MainMenuGui::onSleep(%this)
 function MainMenuGui::onSleep(%this)
@@ -16,18 +17,7 @@ function MainMenuGui::onSleep(%this)
 
 
 function MainMenuButtonHolder::onWake(%this)
 function MainMenuButtonHolder::onWake(%this)
 {
 {
-   %this-->goButton.set("btn_a", "Return", "Go", "MainMenuButtonList.activateRow();");
-}
-
-function MainMenuButtonList::onAdd(%this)
-{
-   MainMenuButtonList.addRow("Single Player", "openSinglePlayerMenu", 0);
-   MainMenuButtonList.addRow("Create Server", "openMultiPlayerMenu", 4, -15);
-   MainMenuButtonList.addRow("Join Server", "openJoinServerMenu", 4, -15);
-   MainMenuButtonList.addRow("Options", "openOptionsMenu", 6, -15);
-   MainMenuButtonList.addRow("Open World Editor", "openWorldEditorBtn", 6, -15);
-   MainMenuButtonList.addRow("Open GUI Editor", "openGUIEditorBtn", 6, -15);
-   MainMenuButtonList.addRow("Exit Game", "quit", 8, -15);
+   %this-->goButton.set("btn_a", "Return", "Go", "MainMenuButtonList.activate();");
 }
 }
 
 
 function openSinglePlayerMenu()
 function openSinglePlayerMenu()

+ 0 - 1432
Templates/BaseGame/game/data/UI/guis/optionsDlg.gui

@@ -1,1432 +0,0 @@
-//--- OBJECT WRITE BEGIN ---
-$guiContent = new GuiControl(OptionsDlg) {
-   position = "0 0";
-   extent = "1024 768";
-   minExtent = "8 8";
-   horizSizing = "width";
-   vertSizing = "height";
-   profile = "GuiOverlayProfile";
-   visible = "1";
-   active = "1";
-   tooltipProfile = "GuiToolTipProfile";
-   hovertime = "1000";
-   isContainer = "1";
-   canSave = "1";
-   canSaveDynamicFields = "1";
-      fixedAspectRatio = "0";
-
-   new GuiWindowCtrl() {
-      text = "Options";
-      resizeWidth = "0";
-      resizeHeight = "0";
-      canMove = "1";
-      canClose = "1";
-      canMinimize = "0";
-      canMaximize = "0";
-      canCollapse = "0";
-      closeCommand = "Canvas.popDialog(optionsDlg);";
-      edgeSnap = "0";
-      margin = "0 0 0 0";
-      padding = "0 0 0 0";
-      anchorTop = "1";
-      anchorBottom = "0";
-      anchorLeft = "1";
-      anchorRight = "0";
-      position = "323 232";
-      extent = "377 303";
-      minExtent = "8 8";
-      horizSizing = "center";
-      vertSizing = "center";
-      profile = "GuiWindowProfile";
-      visible = "1";
-      active = "1";
-      tooltipProfile = "GuiToolTipProfile";
-      hovertime = "1000";
-      isContainer = "1";
-      canSave = "1";
-      canSaveDynamicFields = "0";
-
-      new GuiButtonCtrl() {
-         text = "Done";
-         groupNum = "-1";
-         buttonType = "PushButton";
-         useMouseEvents = "0";
-         position = "306 271";
-         extent = "60 23";
-         minExtent = "8 8";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiButtonProfile";
-         visible = "1";
-         active = "1";
-         command = "Canvas.popDialog(optionsDlg);";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "0";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-      new GuiBitmapBorderCtrl() {
-         position = "9 55";
-         extent = "358 210";
-         minExtent = "8 8";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiTabBorderProfile";
-         visible = "0";
-         active = "1";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "1";
-         internalName = "OptControlsPane";
-         hidden = "1";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-
-         new GuiScrollCtrl() {
-            willFirstRespond = "1";
-            hScrollBar = "alwaysOff";
-            vScrollBar = "alwaysOn";
-            lockHorizScroll = "1";
-            lockVertScroll = "0";
-            constantThumbHeight = "0";
-            childMargin = "0 0";
-            mouseWheelScrollSpeed = "-1";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "5 24";
-            extent = "347 152";
-            minExtent = "8 8";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiScrollProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "1";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-
-            new GuiTextListCtrl() {
-               columns = "0 160";
-               fitParentWidth = "1";
-               clipColumnText = "0";
-               position = "1 1";
-               extent = "329 780";
-               minExtent = "8 8";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiDefaultProfile";
-               visible = "1";
-               active = "1";
-               altCommand = "OptionsDlg.doRemap();";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "1";
-               internalName = "OptRemapList";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-         };
-         new GuiTextCtrl() {
-            text = "Control Name";
-            maxLength = "255";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "6 6";
-            extent = "64 18";
-            minExtent = "8 8";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiTextProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-         new GuiTextCtrl() {
-            text = "Control Binding";
-            maxLength = "255";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "165 6";
-            extent = "72 18";
-            minExtent = "8 8";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiTextProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-		 
-         new GuiSliderCtrl(OptMouseSensitivity) {  
-            range = "0.02 2";  
-            ticks = "10";  
-            value = "0.75";  
-            isContainer = "0";  
-            Profile = "GuiSliderProfile";  
-            HorizSizing = "right";  
-            VertSizing = "bottom";  
-            position = "105 182";  
-            Extent = "244 18";  
-            MinExtent = "8 2";  
-            canSave = "1";  
-            Visible = "1";  
-            Command = "OptMouseSetSensitivity(OptMouseSensitivity.value);";  
-            tooltipprofile = "GuiToolTipProfile";  
-            hovertime = "1000";  
-            canSaveDynamicFields = "0";  
-         };  
-         new GuiTextCtrl() {  
-            text = "Mouse Sensitivity:"; 
-            maxLength = "255";  
-            Margin = "0 0 0 0";  
-            Padding = "0 0 0 0";  
-            AnchorTop = "1";  
-            AnchorBottom = "0";  
-            AnchorLeft = "1";  
-            AnchorRight = "0";  
-            isContainer = "0";  
-            Profile = "GuiTextProfile";  
-            HorizSizing = "right";  
-            VertSizing = "bottom";  
-            position = "15 182";  
-            Extent = "85 18";  
-            MinExtent = "8 8";  
-            canSave = "1";  
-            Visible = "1";  
-            tooltipprofile = "GuiToolTipProfile";  
-            hovertime = "1000";  
-            canSaveDynamicFields = "0";  
-         };  
-      };
-      new GuiBitmapBorderCtrl() {
-         position = "9 55";
-         extent = "358 210";
-         minExtent = "8 8";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiTabBorderProfile";
-         visible = "0";
-         active = "1";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "1";
-         internalName = "OptAudioPane";
-         hidden = "1";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-
-         new GuiMLTextCtrl() {
-            lineSpacing = "2";
-            allowColorChars = "0";
-            maxChars = "-1";
-            useURLMouseCursor = "0";
-            position = "149 10";
-            extent = "190 14";
-            minExtent = "8 8";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiMLTextProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            internalName = "OptAudioInfo";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-         new GuiTextCtrl() {
-            text = "Audio Provider:";
-            maxLength = "255";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "16 16";
-            extent = "75 18";
-            minExtent = "8 8";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiTextProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-         new GuiPopUpMenuCtrl(OptAudioProviderList) {
-            maxPopupHeight = "200";
-            sbUsesNAColor = "0";
-            reverseTextList = "0";
-            bitmapBounds = "16 16";
-            text = "Null";
-            maxLength = "255";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "101 15";
-            extent = "240 18";
-            minExtent = "8 8";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiPopUpMenuProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-         new GuiTextCtrl() {
-            text = "Audio Device:";
-            maxLength = "255";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "23 48";
-            extent = "75 18";
-            minExtent = "8 8";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiTextProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-         new GuiPopUpMenuCtrl(OptAudioDeviceList) {
-            maxPopupHeight = "200";
-            sbUsesNAColor = "0";
-            reverseTextList = "0";
-            bitmapBounds = "16 16";
-            text = "SFX Null Device";
-            maxLength = "255";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "101 47";
-            extent = "240 18";
-            minExtent = "8 8";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiPopUpMenuProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-         new GuiControl() {
-            position = "18 84";
-            extent = "325 17";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiDefaultProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "1";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-
-            new GuiTextCtrl() {
-               text = "Master Volume";
-               maxLength = "255";
-               margin = "0 0 0 0";
-               padding = "0 0 0 0";
-               anchorTop = "1";
-               anchorBottom = "0";
-               anchorLeft = "1";
-               anchorRight = "0";
-               position = "0 0";
-               extent = "72 18";
-               minExtent = "8 8";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiAutoSizeTextProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "0";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-            new GuiSliderCtrl() {
-               range = "0 1";
-               ticks = "0";
-               snap = "0";
-               value = "0.8";
-               position = "85 1";
-               extent = "240 14";
-               minExtent = "8 8";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiSliderProfile";
-               visible = "1";
-               active = "1";
-               altCommand = "OptAudioUpdateMasterVolume( $thisControl.value );";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "0";
-               internalName = "OptAudioVolumeMaster";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-         };
-         new GuiControl() {
-            position = "9 115";
-            extent = "334 17";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiDefaultProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "1";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-
-            new GuiTextCtrl() {
-               text = "Interface Volume";
-               maxLength = "255";
-               margin = "0 0 0 0";
-               padding = "0 0 0 0";
-               anchorTop = "1";
-               anchorBottom = "0";
-               anchorLeft = "1";
-               anchorRight = "0";
-               position = "0 0";
-               extent = "82 18";
-               minExtent = "8 8";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiAutoSizeTextProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "0";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-            new GuiSliderCtrl() {
-               range = "0 1";
-               ticks = "0";
-               snap = "0";
-               value = "1";
-               position = "94 2";
-               extent = "240 13";
-               minExtent = "8 8";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiSliderProfile";
-               visible = "1";
-               active = "1";
-               altCommand = "OptAudioUpdateChannelVolume(AudioGui, $thisControl.value);";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "0";
-               internalName = "OptAudioVolumeShell";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-         };
-         new GuiControl() {
-            position = "18 146";
-            extent = "325 17";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiDefaultProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "1";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-
-            new GuiTextCtrl() {
-               text = "Effects Volume";
-               maxLength = "255";
-               margin = "0 0 0 0";
-               padding = "0 0 0 0";
-               anchorTop = "1";
-               anchorBottom = "0";
-               anchorLeft = "1";
-               anchorRight = "0";
-               position = "0 0";
-               extent = "74 18";
-               minExtent = "8 8";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiAutoSizeTextProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "0";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-            new GuiSliderCtrl() {
-               range = "0 1";
-               ticks = "0";
-               snap = "0";
-               value = "1";
-               position = "85 2";
-               extent = "240 13";
-               minExtent = "8 8";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiSliderProfile";
-               visible = "1";
-               active = "1";
-               altCommand = "OptAudioUpdateChannelVolume(AudioEffect, $thisControl.value);";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "0";
-               internalName = "OptAudioVolumeSim";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-         };
-         new GuiControl() {
-            position = "23 177";
-            extent = "320 17";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiDefaultProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "1";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-
-            new GuiSliderCtrl() {
-               range = "0 1";
-               ticks = "0";
-               snap = "0";
-               value = "1";
-               position = "80 2";
-               extent = "240 13";
-               minExtent = "8 8";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiSliderProfile";
-               visible = "1";
-               active = "1";
-               altCommand = "OptAudioUpdateChannelVolume(AudioMusic, $thisControl.value);";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "0";
-               internalName = "OptAudioVolumeMusic";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-            new GuiTextCtrl() {
-               text = "Music Volume";
-               maxLength = "255";
-               margin = "0 0 0 0";
-               padding = "0 0 0 0";
-               anchorTop = "1";
-               anchorBottom = "0";
-               anchorLeft = "1";
-               anchorRight = "0";
-               position = "0 0";
-               extent = "67 18";
-               minExtent = "8 8";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiAutoSizeTextProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "0";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-         };
-      };
-      new GuiBitmapBorderCtrl() {
-         position = "9 55";
-         extent = "358 210";
-         minExtent = "8 8";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiTabBorderProfile";
-         visible = "1";
-         active = "1";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "1";
-         internalName = "OptGraphicsPane";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-
-         new GuiTextCtrl() {
-            text = "Display Driver:";
-            maxLength = "255";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "11 8";
-            extent = "70 18";
-            minExtent = "8 8";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiTextProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-         new GuiTextCtrl() {
-            text = "Resolution:";
-            maxLength = "255";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "11 35";
-            extent = "53 18";
-            minExtent = "8 8";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiTextProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-         new GuiCheckBoxCtrl() {
-            text = "Fullscreen";
-            groupNum = "-1";
-            buttonType = "ToggleButton";
-            useMouseEvents = "0";
-            position = "11 62";
-            extent = "85 18";
-            minExtent = "8 8";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiCheckBoxProfile";
-            visible = "1";
-            active = "1";
-            command = "OptionsDlg._updateApplyState();";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            internalName = "OptGraphicsFullscreenToggle";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-         new GuiPopUpMenuCtrl(OptGraphicsDriverMenu) {
-            maxPopupHeight = "200";
-            sbUsesNAColor = "0";
-            reverseTextList = "0";
-            bitmapBounds = "16 16";
-            text = "ATI Radeon HD 5700 Series (D3D9)";
-            maxLength = "255";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "88 8";
-            extent = "258 18";
-            minExtent = "8 8";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiPopUpMenuProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-         new GuiPopUpMenuCtrl() {
-            maxPopupHeight = "200";
-            sbUsesNAColor = "0";
-            reverseTextList = "0";
-            bitmapBounds = "16 16";
-            text = "1024 x 768  (4:3)";
-            maxLength = "255";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "67 35";
-            extent = "127 18";
-            minExtent = "8 8";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiPopUpMenuProfile";
-            visible = "1";
-            active = "1";
-            command = "OptionsDlg._updateApplyState();";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            internalName = "OptGraphicsResolutionMenu";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-         new GuiTextCtrl() {
-            text = "Refresh:";
-            maxLength = "255";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "207 35";
-            extent = "45 18";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiTextProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-         new GuiPopUpMenuCtrl() {
-            maxPopupHeight = "200";
-            sbUsesNAColor = "0";
-            reverseTextList = "0";
-            bitmapBounds = "16 16";
-            text = "60";
-            maxLength = "255";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "252 35";
-            extent = "49 18";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiPopUpMenuProfile";
-            visible = "1";
-            active = "1";
-            command = "OptionsDlg._updateApplyState();";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            internalName = "OptRefreshSelectMenu";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-         new GuiTextCtrl() {
-            text = "Mesh Quality:";
-            maxLength = "255";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "21 91";
-            extent = "62 18";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiTextProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-         new GuiPopUpMenuCtrl() {
-            maxPopupHeight = "200";
-            sbUsesNAColor = "0";
-            reverseTextList = "0";
-            bitmapBounds = "16 16";
-            text = "Low";
-            maxLength = "255";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "90 91";
-            extent = "78 18";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiPopUpMenuProfile";
-            visible = "1";
-            active = "1";
-            command = "OptionsDlg._updateApplyState();";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            internalName = "OptMeshQualityPopup";
-            class = "GraphicsQualityPopup";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-         new GuiPopUpMenuCtrl() {
-            maxPopupHeight = "200";
-            sbUsesNAColor = "0";
-            reverseTextList = "0";
-            bitmapBounds = "16 16";
-            text = "Low";
-            maxLength = "255";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "90 118";
-            extent = "78 18";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiPopUpMenuProfile";
-            visible = "1";
-            active = "1";
-            command = "OptionsDlg._updateApplyState();";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            internalName = "OptTextureQualityPopup";
-            class = "GraphicsQualityPopup";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-         new GuiTextCtrl() {
-            text = "Texture Quality:";
-            maxLength = "255";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "11 118";
-            extent = "77 18";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiTextProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-         new GuiPopUpMenuCtrl() {
-            maxPopupHeight = "200";
-            sbUsesNAColor = "0";
-            reverseTextList = "0";
-            bitmapBounds = "16 16";
-            text = "Low";
-            maxLength = "255";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "90 143";
-            extent = "78 18";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiPopUpMenuProfile";
-            visible = "1";
-            active = "1";
-            command = "OptionsDlg._updateApplyState();";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            internalName = "OptLightingQualityPopup";
-            class = "GraphicsQualityPopup";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-         new GuiTextCtrl() {
-            text = "Lighting Quality:";
-            maxLength = "255";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "11 143";
-            extent = "73 18";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiTextProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-         new GuiTextCtrl() {
-            text = "Effect Quality:";
-            maxLength = "255";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "191 91";
-            extent = "73 18";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiTextProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-         new GuiPopUpMenuCtrl() {
-            maxPopupHeight = "200";
-            sbUsesNAColor = "0";
-            reverseTextList = "0";
-            bitmapBounds = "16 16";
-            maxLength = "255";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "263 91";
-            extent = "78 18";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiPopUpMenuProfile";
-            visible = "1";
-            active = "1";
-            command = "OptionsDlg._updateApplyState();";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            internalName = "OptEffectQualityPopup";
-            class = "GraphicsQualityPopup";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-         new GuiTextCtrl() {
-            text = "Shader Quality:";
-            maxLength = "255";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "186 118";
-            extent = "77 18";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiTextProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-         new GuiPopUpMenuCtrl() {
-            maxPopupHeight = "200";
-            sbUsesNAColor = "0";
-            reverseTextList = "0";
-            bitmapBounds = "16 16";
-            text = "Low";
-            maxLength = "255";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "263 118";
-            extent = "78 18";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiPopUpMenuProfile";
-            visible = "1";
-            active = "1";
-            command = "OptionsDlg._updateApplyState();";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            internalName = "OptShaderQualityPopup";
-            class = "GraphicsQualityPopup";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-         new GuiTextCtrl() {
-            text = "Particle Quality:";
-            maxLength = "255";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "186 156";
-            extent = "73 18";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiTextProfile";
-            visible = "0";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            hidden = "1";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-         new GuiPopUpMenuCtrl() {
-            maxPopupHeight = "200";
-            sbUsesNAColor = "0";
-            reverseTextList = "0";
-            bitmapBounds = "16 16";
-            maxLength = "255";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "263 156";
-            extent = "78 18";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiPopUpMenuProfile";
-            visible = "0";
-            active = "1";
-            command = "OptionsDlg._updateApplyState();";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            internalName = "OptParticleQualityPopup";
-            class = "GraphicsQualityPopup";
-            hidden = "1";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-         new GuiTextCtrl() {
-            text = "Anisotropic Filtering:";
-            maxLength = "255";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "22 167";
-            extent = "105 18";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiTextProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-         new GuiPopUpMenuCtrl() {
-            maxPopupHeight = "200";
-            sbUsesNAColor = "0";
-            reverseTextList = "0";
-            bitmapBounds = "16 16";
-            text = "Off";
-            maxLength = "255";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "123 167";
-            extent = "45 18";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiPopUpMenuProfile";
-            visible = "1";
-            active = "1";
-            command = "OptionsDlg._updateApplyState();";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            internalName = "OptAnisotropicPopup";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-         new GuiCheckBoxCtrl() {
-            text = "Vertical Sync";
-            groupNum = "-1";
-            buttonType = "ToggleButton";
-            useMouseEvents = "0";
-            position = "92 62";
-            extent = "85 18";
-            minExtent = "8 8";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiCheckBoxProfile";
-            visible = "1";
-            active = "1";
-            command = "OptionsDlg._updateApplyState();";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            internalName = "OptGraphicsVSyncToggle";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-         new GuiButtonCtrl() {
-            text = "Auto Detect Quality";
-            groupNum = "-1";
-            buttonType = "PushButton";
-            useMouseEvents = "0";
-            position = "205 152";
-            extent = "110 27";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiButtonProfile";
-            visible = "1";
-            active = "1";
-            command = "OptionsDlg._autoDetectQuality();";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-         new GuiPopUpMenuCtrl() {
-            maxPopupHeight = "200";
-            sbUsesNAColor = "0";
-            reverseTextList = "0";
-            bitmapBounds = "16 16";
-            maxLength = "255";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "263 62";
-            extent = "78 18";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiPopUpMenuProfile";
-            visible = "1";
-            active = "1";
-            command = "OptionsDlg._updateApplyState();";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            internalName = "OptAAQualityPopup";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-         new GuiTextCtrl() {
-            text = "Anti-aliasing";
-            maxLength = "255";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "191 62";
-            extent = "73 18";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "GuiTextProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
-         new GuiControl() {
-            position = "0 190";
-            extent = "352 15";
-            minExtent = "8 2";
-            horizSizing = "width";
-            vertSizing = "bottom";
-            profile = "GuiDefaultProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "1";
-            internalName = "GammaSliderContainer";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-
-            new GuiSliderCtrl() {
-               range = "0.001 2.2";
-               ticks = "0";
-               snap = "0";
-               value = "1";
-               position = "76 -1";
-               extent = "268 15";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiSliderProfile";
-               visible = "1";
-               active = "1";
-               variable = "$pref::Video::Gamma";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "0";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-            new GuiTextCtrl() {
-               text = "Gamma:";
-               maxLength = "255";
-               margin = "0 0 0 0";
-               padding = "0 0 0 0";
-               anchorTop = "1";
-               anchorBottom = "0";
-               anchorLeft = "1";
-               anchorRight = "0";
-               position = "22 -4";
-               extent = "105 18";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiTextProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "0";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-         };
-      };
-      new GuiControl() {
-         position = "9 55";
-         extent = "357 208";
-         minExtent = "8 8";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiWindowProfile";
-         visible = "0";
-         active = "1";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "1";
-         internalName = "OptNetworkPane";
-         hidden = "1";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-      new GuiButtonCtrl() {
-         text = "Graphics";
-         groupNum = "-1";
-         buttonType = "RadioButton";
-         useMouseEvents = "0";
-         position = "9 33";
-         extent = "117 23";
-         minExtent = "8 8";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiButtonTabProfile";
-         visible = "1";
-         active = "1";
-         command = "optionsDlg.setPane(Graphics);";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "0";
-         internalName = "OptGraphicsButton";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-      new GuiButtonCtrl() {
-         text = "Audio";
-         groupNum = "-1";
-         buttonType = "RadioButton";
-         useMouseEvents = "0";
-         position = "126 33";
-         extent = "117 23";
-         minExtent = "8 8";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiButtonTabProfile";
-         visible = "1";
-         active = "1";
-         command = "optionsDlg.setPane(Audio);";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "0";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-      new GuiButtonCtrl() {
-         text = "Controls";
-         groupNum = "-1";
-         buttonType = "RadioButton";
-         useMouseEvents = "0";
-         position = "243 33";
-         extent = "117 23";
-         minExtent = "8 8";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiButtonTabProfile";
-         visible = "1";
-         active = "1";
-         command = "optionsDlg.setPane(Controls);";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "0";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-      new GuiButtonCtrl() {
-         text = "Apply";
-         groupNum = "-1";
-         buttonType = "PushButton";
-         useMouseEvents = "0";
-         position = "241 271";
-         extent = "60 23";
-         minExtent = "8 8";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiButtonProfile";
-         visible = "1";
-         active = "0";
-         command = "optionsDlg.applyGraphics();";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "0";
-         internalName = "apply";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-   };
-   new GuiControl(OptionsButtonHolder) {
-      position = "190 652";
-      extent = "646 130";
-      minExtent = "8 2";
-      horizSizing = "center";
-      vertSizing = "top";
-      profile = "GuiDefaultProfile";
-      visible = "1";
-      active = "1";
-      tooltipProfile = "GuiToolTipProfile";
-      hovertime = "1000";
-      isContainer = "1";
-      canSave = "1";
-      canSaveDynamicFields = "0";
-   };
-};
-//--- OBJECT WRITE END ---

+ 332 - 197
Templates/BaseGame/game/data/UI/guis/optionsMenu.gui

@@ -23,7 +23,7 @@ $guiContent = new GuiControl(OptionsMenu) {
       position = "48 56";
       position = "48 56";
       extent = "928 655";
       extent = "928 655";
       minExtent = "8 2";
       minExtent = "8 2";
-      horizSizing = "center";
+      horizSizing = "aspectCenter";
       vertSizing = "center";
       vertSizing = "center";
       profile = "GuiDefaultProfile";
       profile = "GuiDefaultProfile";
       visible = "1";
       visible = "1";
@@ -38,10 +38,10 @@ $guiContent = new GuiControl(OptionsMenu) {
          percent = "100";
          percent = "100";
          vertical = "0";
          vertical = "0";
          flipClip = "0";
          flipClip = "0";
-         bitmap = "data/ui/images/panel.png";
+         BitmapAsset = "UI:panel_low_image";
          color = "255 255 255 255";
          color = "255 255 255 255";
-         position = "0 0";
-         extent = "927 40";
+         position = "0 40";
+         extent = "927 618";
          minExtent = "8 2";
          minExtent = "8 2";
          horizSizing = "width";
          horizSizing = "width";
          vertSizing = "bottom";
          vertSizing = "bottom";
@@ -54,37 +54,14 @@ $guiContent = new GuiControl(OptionsMenu) {
          canSave = "1";
          canSave = "1";
          canSaveDynamicFields = "0";
          canSaveDynamicFields = "0";
       };
       };
-      new GuiTextCtrl() {
-         text = "OPTIONS";
-         maxLength = "1024";
-         margin = "0 0 0 0";
-         padding = "0 0 0 0";
-         anchorTop = "1";
-         anchorBottom = "0";
-         anchorLeft = "1";
-         anchorRight = "0";
-         position = "22 7";
-         extent = "120 28";
-         minExtent = "8 2";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "MenuHeaderText";
-         visible = "1";
-         active = "1";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "1";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
       new GuiBitmapBarCtrl() {
       new GuiBitmapBarCtrl() {
          percent = "100";
          percent = "100";
          vertical = "0";
          vertical = "0";
          flipClip = "0";
          flipClip = "0";
-         bitmap = "data/ui/images/panel_low.png";
+         BitmapAsset = "UI:panel_image";
          color = "255 255 255 255";
          color = "255 255 255 255";
-         position = "0 40";
-         extent = "927 618";
+         position = "0 0";
+         extent = "927 40";
          minExtent = "8 2";
          minExtent = "8 2";
          horizSizing = "width";
          horizSizing = "width";
          vertSizing = "bottom";
          vertSizing = "bottom";
@@ -97,132 +74,21 @@ $guiContent = new GuiControl(OptionsMenu) {
          canSave = "1";
          canSave = "1";
          canSaveDynamicFields = "0";
          canSaveDynamicFields = "0";
       };
       };
-      new GuiButtonCtrl() {
-         text = "Display";
-         groupNum = "1";
-         buttonType = "RadioButton";
-         useMouseEvents = "0";
-         position = "114 49";
-         extent = "140 32";
-         minExtent = "8 2";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiMenuButtonProfile";
-         visible = "1";
-         active = "1";
-         command = "OptionsMenu.populateDisplaySettingsList();";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "0";
-         internalName = "DisplayButton";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-      new GuiButtonCtrl() {
-         text = "Graphics";
-         groupNum = "1";
-         buttonType = "RadioButton";
-         useMouseEvents = "0";
-         position = "258 49";
-         extent = "140 32";
-         minExtent = "8 2";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiMenuButtonProfile";
-         visible = "1";
-         active = "1";
-         command = "OptionsMenu.populateGraphicsSettingsList();";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "0";
-         internalName = "GraphicsButton";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-      new GuiButtonCtrl() {
-         text = "Audio";
-         groupNum = "1";
-         buttonType = "RadioButton";
-         useMouseEvents = "0";
-         position = "402 49";
-         extent = "140 32";
-         minExtent = "8 2";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiMenuButtonProfile";
-         visible = "1";
-         active = "1";
-         command = "OptionsMenu.populateAudioSettingsList();";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "0";
-         internalName = "AudioButton";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-      new GuiButtonCtrl() {
-         text = "Keyboard + Mouse";
-         groupNum = "1";
-         buttonType = "RadioButton";
-         useMouseEvents = "0";
-         position = "547 49";
-         extent = "140 32";
-         minExtent = "8 2";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiMenuButtonProfile";
-         visible = "1";
-         active = "1";
-         command = "OptionsMenu.populateKeyboardMouseSettingsList();";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "0";
-         internalName = "KBMButton";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-      new GuiButtonCtrl() {
-         text = "Gamepad";
-         groupNum = "1";
-         buttonType = "RadioButton";
-         useMouseEvents = "0";
-         position = "691 49";
-         extent = "140 32";
-         minExtent = "8 2";
-         horizSizing = "right";
-         vertSizing = "bottom";
-         profile = "GuiMenuButtonProfile";
-         visible = "1";
-         active = "1";
-         command = "OptionsMenu.populateGamepadSettingsList();";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "0";
-         internalName = "gamepadButton";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-      };
-      new GuiScrollCtrl() {
-         willFirstRespond = "1";
-         hScrollBar = "alwaysOff";
-         vScrollBar = "dynamic";
-         lockHorizScroll = "1";
-         lockVertScroll = "0";
-         constantThumbHeight = "0";
-         childMargin = "0 0";
-         mouseWheelScrollSpeed = "-1";
+      new GuiTextCtrl() {
+         text = "OPTIONS";
+         maxLength = "1024";
          margin = "0 0 0 0";
          margin = "0 0 0 0";
          padding = "0 0 0 0";
          padding = "0 0 0 0";
          anchorTop = "1";
          anchorTop = "1";
          anchorBottom = "0";
          anchorBottom = "0";
          anchorLeft = "1";
          anchorLeft = "1";
          anchorRight = "0";
          anchorRight = "0";
-         position = "1 83";
-         extent = "622 573";
+         position = "22 7";
+         extent = "120 28";
          minExtent = "8 2";
          minExtent = "8 2";
          horizSizing = "right";
          horizSizing = "right";
          vertSizing = "bottom";
          vertSizing = "bottom";
-         profile = "GuiMenuScrollProfile";
+         profile = "MenuHeaderText";
          visible = "1";
          visible = "1";
          active = "1";
          active = "1";
          tooltipProfile = "GuiToolTipProfile";
          tooltipProfile = "GuiToolTipProfile";
@@ -230,25 +96,6 @@ $guiContent = new GuiControl(OptionsMenu) {
          isContainer = "1";
          isContainer = "1";
          canSave = "1";
          canSave = "1";
          canSaveDynamicFields = "0";
          canSaveDynamicFields = "0";
-
-         new GuiGameListMenuCtrl(OptionsMenuSettingsList) {
-            debugRender = "0";
-            callbackOnInputs = "1";
-            position = "1 1";
-            extent = "621 510";
-            minExtent = "8 2";
-            horizSizing = "width";
-            vertSizing = "bottom";
-            profile = "DefaultListMenuProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            class = "UIMenuButtonList";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-         };
       };
       };
       new GuiTextCtrl(OptionName) {
       new GuiTextCtrl(OptionName) {
          maxLength = "1024";
          maxLength = "1024";
@@ -258,10 +105,10 @@ $guiContent = new GuiControl(OptionsMenu) {
          anchorBottom = "0";
          anchorBottom = "0";
          anchorLeft = "1";
          anchorLeft = "1";
          anchorRight = "0";
          anchorRight = "0";
-         position = "635 94";
+         position = "3 606";
          extent = "293 17";
          extent = "293 17";
          minExtent = "8 2";
          minExtent = "8 2";
-         horizSizing = "right";
+         horizSizing = "width";
          vertSizing = "bottom";
          vertSizing = "bottom";
          profile = "MenuSubHeaderText";
          profile = "MenuSubHeaderText";
          visible = "1";
          visible = "1";
@@ -278,10 +125,10 @@ $guiContent = new GuiControl(OptionsMenu) {
          maxChars = "-1";
          maxChars = "-1";
          text = "This is a placeholder text for an option.";
          text = "This is a placeholder text for an option.";
          useURLMouseCursor = "0";
          useURLMouseCursor = "0";
-         position = "635 126";
+         position = "3 625";
          extent = "293 14";
          extent = "293 14";
          minExtent = "8 2";
          minExtent = "8 2";
-         horizSizing = "right";
+         horizSizing = "width";
          vertSizing = "bottom";
          vertSizing = "bottom";
          profile = "GuiMLTextProfile";
          profile = "GuiMLTextProfile";
          visible = "1";
          visible = "1";
@@ -292,24 +139,286 @@ $guiContent = new GuiControl(OptionsMenu) {
          canSave = "1";
          canSave = "1";
          canSaveDynamicFields = "0";
          canSaveDynamicFields = "0";
       };
       };
-   };
-   new GuiControl() {
-      position = "189 652";
-      extent = "646 130";
-      minExtent = "8 2";
-      horizSizing = "center";
-      vertSizing = "top";
-      profile = "GuiDefaultProfile";
-      visible = "1";
-      active = "1";
-      tooltipProfile = "GuiToolTipProfile";
-      hovertime = "1000";
-      isContainer = "1";
-      canSave = "1";
-      canSaveDynamicFields = "0";
+      new GuiSplitContainer() {
+         orientation = "Vertical";
+         splitterSize = "2";
+         splitPoint = "250 100";
+         fixedPanel = "FirstPanel";
+         fixedSize = "250";
+         docking = "None";
+         margin = "0 0 0 0";
+         padding = "0 0 0 0";
+         anchorTop = "1";
+         anchorBottom = "0";
+         anchorLeft = "1";
+         anchorRight = "0";
+         position = "0 48";
+         extent = "928 555";
+         minExtent = "64 64";
+         horizSizing = "width";
+         vertSizing = "bottom";
+         profile = "GuiMenuScrollProfile";
+         visible = "1";
+         active = "1";
+         tooltipProfile = "GuiToolTipProfile";
+         hovertime = "1000";
+         isContainer = "1";
+         canSave = "1";
+         canSaveDynamicFields = "0";
+
+         new GuiPanel() {
+            docking = "Client";
+            margin = "0 0 0 0";
+            padding = "0 0 0 0";
+            anchorTop = "1";
+            anchorBottom = "0";
+            anchorLeft = "1";
+            anchorRight = "0";
+            position = "0 0";
+            extent = "248 555";
+            minExtent = "16 16";
+            horizSizing = "right";
+            vertSizing = "bottom";
+            profile = "GuiOverlayProfile";
+            visible = "1";
+            active = "1";
+            tooltipProfile = "GuiToolTipProfile";
+            hovertime = "1000";
+            isContainer = "1";
+            internalName = "Panel1";
+            canSave = "1";
+            canSaveDynamicFields = "0";
+
+            new GuiStackControl(OptionsMenuCategoryList) {
+               stackingType = "Vertical";
+               horizStacking = "Left to Right";
+               vertStacking = "Top to Bottom";
+               padding = "10";
+               dynamicSize = "0";
+               dynamicNonStackExtent = "0";
+               dynamicPos = "0";
+               changeChildSizeToFit = "1";
+               changeChildPosition = "1";
+               position = "0 0";
+               extent = "248 555";
+               minExtent = "16 16";
+               horizSizing = "width";
+               vertSizing = "height";
+               profile = "GuiDefaultProfile";
+               visible = "1";
+               active = "1";
+               tooltipProfile = "GuiToolTipProfile";
+               hovertime = "1000";
+               isContainer = "1";
+               class = "MenuList";
+               canSave = "1";
+               canSaveDynamicFields = "0";
+
+               new GuiButtonCtrl(OptionsMenuDisplayBtn) {
+                  text = "Display";
+                  groupNum = "-1";
+                  buttonType = "PushButton";
+                  useMouseEvents = "0";
+                  position = "0 0";
+                  extent = "248 35";
+                  minExtent = "8 2";
+                  horizSizing = "right";
+                  vertSizing = "bottom";
+                  profile = "GuiMenuButtonProfile";
+                  visible = "1";
+                  active = "1";
+                  command = "populateDisplaySettingsList();";
+                  tooltipProfile = "GuiToolTipProfile";
+                  hovertime = "1000";
+                  isContainer = "0";
+                  canSave = "1";
+                  canSaveDynamicFields = "0";
+               };
+               new GuiButtonCtrl(OptionsMenuGraphicsBtn) {
+                  text = "Graphics";
+                  groupNum = "-1";
+                  buttonType = "PushButton";
+                  useMouseEvents = "0";
+                  position = "0 45";
+                  extent = "248 35";
+                  minExtent = "8 2";
+                  horizSizing = "right";
+                  vertSizing = "bottom";
+                  profile = "GuiMenuButtonProfile";
+                  visible = "1";
+                  active = "1";
+                  command = "populateGraphicsSettingsList();";
+                  tooltipProfile = "GuiToolTipProfile";
+                  hovertime = "1000";
+                  isContainer = "0";
+                  canSave = "1";
+                  canSaveDynamicFields = "0";
+               };
+               new GuiButtonCtrl(OptionsMenuAudioBtn) {
+                  text = "Audio";
+                  groupNum = "-1";
+                  buttonType = "PushButton";
+                  useMouseEvents = "0";
+                  position = "0 90";
+                  extent = "248 35";
+                  minExtent = "8 2";
+                  horizSizing = "right";
+                  vertSizing = "bottom";
+                  profile = "GuiMenuButtonProfile";
+                  visible = "1";
+                  active = "1";
+                  command = "populateAudioSettingsList();";
+                  tooltipProfile = "GuiToolTipProfile";
+                  hovertime = "1000";
+                  isContainer = "0";
+                  canSave = "1";
+                  canSaveDynamicFields = "0";
+               };
+               new GuiButtonCtrl(OptionsMenuKBMBtn) {
+                  text = "Keyboard & Mouse";
+                  groupNum = "-1";
+                  buttonType = "PushButton";
+                  useMouseEvents = "0";
+                  position = "0 135";
+                  extent = "248 35";
+                  minExtent = "8 2";
+                  horizSizing = "right";
+                  vertSizing = "bottom";
+                  profile = "GuiMenuButtonProfile";
+                  visible = "1";
+                  active = "1";
+                  command = "populateKeyboardMouseSettingsList();";
+                  tooltipProfile = "GuiToolTipProfile";
+                  hovertime = "1000";
+                  isContainer = "0";
+                  canSave = "1";
+                  canSaveDynamicFields = "0";
+               };
+               new GuiButtonCtrl(OptionsMenuGamepadBtn) {
+                  text = "Gamepad";
+                  groupNum = "-1";
+                  buttonType = "PushButton";
+                  useMouseEvents = "0";
+                  position = "0 180";
+                  extent = "248 35";
+                  minExtent = "8 2";
+                  horizSizing = "right";
+                  vertSizing = "bottom";
+                  profile = "GuiMenuButtonProfile";
+                  visible = "1";
+                  active = "1";
+                  command = "populateGamepadSettingsList();";
+                  tooltipProfile = "GuiToolTipProfile";
+                  hovertime = "1000";
+                  isContainer = "0";
+                  canSave = "1";
+                  canSaveDynamicFields = "0";
+               };
+               new GuiButtonCtrl(OptionsMenuProfileBtn) {
+                  text = "Profile";
+                  groupNum = "-1";
+                  buttonType = "PushButton";
+                  useMouseEvents = "0";
+                  position = "0 225";
+                  extent = "248 35";
+                  minExtent = "8 2";
+                  horizSizing = "right";
+                  vertSizing = "bottom";
+                  profile = "GuiMenuButtonProfile";
+                  visible = "1";
+                  active = "1";
+                  command = "populateProfileSettingsList();";
+                  tooltipProfile = "GuiToolTipProfile";
+                  hovertime = "1000";
+                  isContainer = "0";
+                  canSave = "1";
+                  canSaveDynamicFields = "0";
+               };
+            };
+         };
+         new GuiPanel() {
+            docking = "Client";
+            margin = "0 0 0 0";
+            padding = "0 0 0 0";
+            anchorTop = "1";
+            anchorBottom = "0";
+            anchorLeft = "1";
+            anchorRight = "0";
+            position = "252 0";
+            extent = "676 555";
+            minExtent = "16 16";
+            horizSizing = "right";
+            vertSizing = "bottom";
+            profile = "GuiOverlayProfile";
+            visible = "1";
+            active = "1";
+            tooltipProfile = "GuiToolTipProfile";
+            hovertime = "1000";
+            isContainer = "1";
+            internalName = "panel2";
+            canSave = "1";
+            canSaveDynamicFields = "0";
+
+            new GuiScrollCtrl() {
+               willFirstRespond = "1";
+               hScrollBar = "alwaysOff";
+               vScrollBar = "dynamic";
+               lockHorizScroll = "0";
+               lockVertScroll = "0";
+               constantThumbHeight = "0";
+               childMargin = "0 0";
+               mouseWheelScrollSpeed = "-1";
+               margin = "0 0 0 0";
+               padding = "0 0 0 0";
+               anchorTop = "1";
+               anchorBottom = "0";
+               anchorLeft = "1";
+               anchorRight = "0";
+               position = "0 0";
+               extent = "676 554";
+               minExtent = "8 2";
+               horizSizing = "width";
+               vertSizing = "height";
+               profile = "GuiMenuScrollProfile";
+               visible = "1";
+               active = "1";
+               tooltipProfile = "GuiToolTipProfile";
+               hovertime = "1000";
+               isContainer = "1";
+               canSave = "1";
+               canSaveDynamicFields = "0";
+
+               new GuiStackControl(OptionsMenuSettingsList) {
+                  stackingType = "Vertical";
+                  horizStacking = "Left to Right";
+                  vertStacking = "Top to Bottom";
+                  padding = "5";
+                  dynamicSize = "1";
+                  dynamicNonStackExtent = "0";
+                  dynamicPos = "0";
+                  changeChildSizeToFit = "0";
+                  changeChildPosition = "1";
+                  position = "1 1";
+                  extent = "661 30";
+                  minExtent = "16 16";
+                  horizSizing = "width";
+                  vertSizing = "height";
+                  profile = "GuiDefaultProfile";
+                  visible = "1";
+                  active = "1";
+                  tooltipProfile = "GuiToolTipProfile";
+                  hovertime = "1000";
+                  isContainer = "1";
+                  class = "MenuList";
+                  canSave = "1";
+                  canSaveDynamicFields = "0";
+               };
+            };
+         };
+      };
    };
    };
    new GuiControl(OptionsButtonHolder) {
    new GuiControl(OptionsButtonHolder) {
-      position = "109 711";
+      position = "116 711";
       extent = "791 40";
       extent = "791 40";
       minExtent = "8 2";
       minExtent = "8 2";
       horizSizing = "center";
       horizSizing = "center";
@@ -326,7 +435,7 @@ $guiContent = new GuiControl(OptionsMenu) {
 
 
       new GuiIconButtonCtrl() {
       new GuiIconButtonCtrl() {
          buttonMargin = "4 4";
          buttonMargin = "4 4";
-         iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
+         BitmapAsset = "UI:Keyboard_Black_Return_image";
          iconLocation = "Left";
          iconLocation = "Left";
          sizeIconToButton = "1";
          sizeIconToButton = "1";
          makeIconSquare = "1";
          makeIconSquare = "1";
@@ -345,7 +454,7 @@ $guiContent = new GuiControl(OptionsMenu) {
          profile = "GuiMenuButtonProfile";
          profile = "GuiMenuButtonProfile";
          visible = "1";
          visible = "1";
          active = "1";
          active = "1";
-         command = "ChooseLevelDlg.beginLevel();";
+         command = "OptionsMenu.apply();";
          tooltipProfile = "GuiToolTipProfile";
          tooltipProfile = "GuiToolTipProfile";
          hovertime = "1000";
          hovertime = "1000";
          isContainer = "0";
          isContainer = "0";
@@ -356,7 +465,7 @@ $guiContent = new GuiControl(OptionsMenu) {
       };
       };
       new GuiIconButtonCtrl() {
       new GuiIconButtonCtrl() {
          buttonMargin = "4 4";
          buttonMargin = "4 4";
-         iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Esc";
+         BitmapAsset = "UI:Keyboard_Black_Escape_image";
          iconLocation = "Left";
          iconLocation = "Left";
          sizeIconToButton = "1";
          sizeIconToButton = "1";
          makeIconSquare = "1";
          makeIconSquare = "1";
@@ -375,7 +484,7 @@ $guiContent = new GuiControl(OptionsMenu) {
          profile = "GuiMenuButtonProfile";
          profile = "GuiMenuButtonProfile";
          visible = "1";
          visible = "1";
          active = "1";
          active = "1";
-         command = "ChooseLevelDlg.backOut();";
+         command = "OptionsMenu.backOut();";
          tooltipProfile = "GuiToolTipProfile";
          tooltipProfile = "GuiToolTipProfile";
          hovertime = "1000";
          hovertime = "1000";
          isContainer = "0";
          isContainer = "0";
@@ -386,7 +495,7 @@ $guiContent = new GuiControl(OptionsMenu) {
       };
       };
       new GuiIconButtonCtrl() {
       new GuiIconButtonCtrl() {
          buttonMargin = "4 4";
          buttonMargin = "4 4";
-         iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
+         BitmapAsset = "UI:Switch_LB_image";
          iconLocation = "Left";
          iconLocation = "Left";
          sizeIconToButton = "1";
          sizeIconToButton = "1";
          makeIconSquare = "1";
          makeIconSquare = "1";
@@ -403,19 +512,21 @@ $guiContent = new GuiControl(OptionsMenu) {
          horizSizing = "right";
          horizSizing = "right";
          vertSizing = "bottom";
          vertSizing = "bottom";
          profile = "GuiMenuButtonProfile";
          profile = "GuiMenuButtonProfile";
-         visible = "1";
-         active = "1";
+         visible = "0";
+         active = "0";
+         command = "OptionsMenu.prevTab();";
          tooltipProfile = "GuiToolTipProfile";
          tooltipProfile = "GuiToolTipProfile";
          hovertime = "1000";
          hovertime = "1000";
          isContainer = "0";
          isContainer = "0";
          internalName = "prevTabButton";
          internalName = "prevTabButton";
          class = "MenuInputButton";
          class = "MenuInputButton";
+         hidden = "1";
          canSave = "1";
          canSave = "1";
          canSaveDynamicFields = "0";
          canSaveDynamicFields = "0";
       };
       };
       new GuiIconButtonCtrl() {
       new GuiIconButtonCtrl() {
          buttonMargin = "4 4";
          buttonMargin = "4 4";
-         iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Esc";
+         BitmapAsset = "UI:Switch_RB_image";
          iconLocation = "Left";
          iconLocation = "Left";
          sizeIconToButton = "1";
          sizeIconToButton = "1";
          makeIconSquare = "1";
          makeIconSquare = "1";
@@ -432,19 +543,21 @@ $guiContent = new GuiControl(OptionsMenu) {
          horizSizing = "right";
          horizSizing = "right";
          vertSizing = "bottom";
          vertSizing = "bottom";
          profile = "GuiMenuButtonProfile";
          profile = "GuiMenuButtonProfile";
-         visible = "1";
-         active = "1";
+         visible = "0";
+         active = "0";
+         command = "OptionsMenu.nextTab();";
          tooltipProfile = "GuiToolTipProfile";
          tooltipProfile = "GuiToolTipProfile";
          hovertime = "1000";
          hovertime = "1000";
          isContainer = "0";
          isContainer = "0";
          internalName = "nextTabButton";
          internalName = "nextTabButton";
          class = "MenuInputButton";
          class = "MenuInputButton";
+         hidden = "1";
          canSave = "1";
          canSave = "1";
          canSaveDynamicFields = "0";
          canSaveDynamicFields = "0";
       };
       };
       new GuiIconButtonCtrl() {
       new GuiIconButtonCtrl() {
          buttonMargin = "4 4";
          buttonMargin = "4 4";
-         iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Esc";
+         BitmapAsset = "UI:Keyboard_Black_R_image";
          iconLocation = "Left";
          iconLocation = "Left";
          sizeIconToButton = "1";
          sizeIconToButton = "1";
          makeIconSquare = "1";
          makeIconSquare = "1";
@@ -463,6 +576,7 @@ $guiContent = new GuiControl(OptionsMenu) {
          profile = "GuiMenuButtonProfile";
          profile = "GuiMenuButtonProfile";
          visible = "1";
          visible = "1";
          active = "1";
          active = "1";
+         command = "OptionsMenu.resetToDefaults();";
          tooltipProfile = "GuiToolTipProfile";
          tooltipProfile = "GuiToolTipProfile";
          hovertime = "1000";
          hovertime = "1000";
          isContainer = "0";
          isContainer = "0";
@@ -472,5 +586,26 @@ $guiContent = new GuiControl(OptionsMenu) {
          canSaveDynamicFields = "0";
          canSaveDynamicFields = "0";
       };
       };
    };
    };
+   new GuiInputCtrl(OptionsMenuInputHandler) {
+      sendAxisEvents = "1";
+      sendBreakEvents = "1";
+      sendModifierEvents = "0";
+      ignoreMouseEvents = "1";
+      lockMouse = "0";
+      position = "-50 0";
+      extent = "10 10";
+      minExtent = "8 2";
+      horizSizing = "left";
+      vertSizing = "top";
+      profile = "GuiInputCtrlProfile";
+      visible = "1";
+      active = "1";
+      tooltipProfile = "GuiToolTipProfile";
+      hovertime = "1000";
+      isContainer = "0";
+      class = "MenuInputHandler";
+      canSave = "1";
+      canSaveDynamicFields = "0";
+   };
 };
 };
 //--- OBJECT WRITE END ---
 //--- OBJECT WRITE END ---

+ 133 - 70
Templates/BaseGame/game/data/UI/guis/optionsMenu.tscript

@@ -54,20 +54,22 @@ function OptionsMenu::onWake(%this)
 {
 {
    MainMenuButtonList.hidden = true;
    MainMenuButtonList.hidden = true;
    
    
-   %this.pageTabIndex = 0;
-   %tab = %this.getTab();
-   %tab.performClick();
+   OptionsMenuCategoryList.setAsActiveMenuList();
    
    
    OptionsButtonHolder.setActive();
    OptionsButtonHolder.setActive();
+   
+   OptionsMenuInputHandler.setFirstResponder();
 }
 }
 
 
 function OptionsButtonHolder::onWake(%this)
 function OptionsButtonHolder::onWake(%this)
 {
 {
-   %this-->prevTabButton.set("btn_l", "", "Prev Tab", "OptionsMenu.prevTab();", true);
-   %this-->nextTabButton.set("btn_r", "", "Next Tab", "OptionsMenu.nextTab();", true);
+   //%this-->prevTabButton.set("btn_l", "", "Prev Tab", "OptionsMenu.prevTab();", true);
+   %this-->nextTabButton.set("btn_a", "", "Select", "OptionsMenuList.activate();", true);
    %this-->resetButton.set("btn_back", "R", "Reset", "OptionsMenu.resetToDefaults();");
    %this-->resetButton.set("btn_back", "R", "Reset", "OptionsMenu.resetToDefaults();");
    %this-->applyButton.set("btn_start", "Return", "Apply", "OptionsMenu.apply();");
    %this-->applyButton.set("btn_start", "Return", "Apply", "OptionsMenu.apply();");
    %this-->backButton.set("btn_b", "Escape", "Back", "OptionsMenu.backOut();");
    %this-->backButton.set("btn_b", "Escape", "Back", "OptionsMenu.backOut();");
+   
+   //OptionsMenuCategoryList.getObject(0).performClick();
 }
 }
 
 
 function OptionsMenu::apply(%this)
 function OptionsMenu::apply(%this)
@@ -78,7 +80,7 @@ function OptionsMenu::apply(%this)
    }
    }
    else if(%this.pageTabIndex == 1)
    else if(%this.pageTabIndex == 1)
    {
    {
-      %this.applyGraphicsSettings();
+      %this.applyGraphicsSettings(); 
    }
    }
    else if(%this.pageTabIndex == 2)
    else if(%this.pageTabIndex == 2)
    {
    {
@@ -130,26 +132,24 @@ function OptionsMenuSettingsList::onChange(%this)
    
    
    if(%currentRowText $= "Display")
    if(%currentRowText $= "Display")
    {
    {
-      OptionsMenuList.populateDisplaySettingsList();
+      populateDisplaySettingsList();
    }
    }
    else if(%currentRowText $= "Graphics")
    else if(%currentRowText $= "Graphics")
    {
    {
-      OptionsMenuList.populateGraphicsSettingsList();
+      populateGraphicsSettingsList();
    }
    }
    else if(%currentRowText $= "Audio")
    else if(%currentRowText $= "Audio")
    {
    {
-      OptionsMenuList.populateAudioSettingsList();
+      populateAudioSettingsList();
    }
    }
    else if(%currentRowText $= "Keyboard + Mouse")
    else if(%currentRowText $= "Keyboard + Mouse")
    {
    {
-      OptionsMenuList.populateKeyboardMouseSettingsList();
+      populateKeyboardMouseSettingsList();
    }
    }
    else if(%currentRowText $= "Gamepad")
    else if(%currentRowText $= "Gamepad")
    {
    {
-      OptionsMenuList.populateGamepadSettingsList();
+      populateGamepadSettingsList();
    }
    }
-   
-   
 }
 }
 
 
 function OptionsMenu::prevTab(%this)
 function OptionsMenu::prevTab(%this)
@@ -188,10 +188,9 @@ function OptionsMenu::getTab(%this)
       return %this-->DisplayButton;
       return %this-->DisplayButton;
 }
 }
 
 
-function OptionsMenu::populateDisplaySettingsList(%this)
+function populateDisplaySettingsList()
 {
 {
-   %this.pageTabIndex = 0;
-   OptionsMenuSettingsList.clearRows();
+   OptionsMenuSettingsList.clear();
    
    
    OptionName.setText("");
    OptionName.setText("");
    OptionDescription.setText("");
    OptionDescription.setText("");
@@ -221,7 +220,7 @@ function OptionsMenu::populateDisplaySettingsList(%this)
    
    
    trim(%apiList);
    trim(%apiList);
    
    
-   OptionsMenuSettingsList.addOptionRow("Display API", %apiList, false, "", -1, -30, true, "The display API used for rendering.", %displayDevice);
+   OptionsMenuSettingsList.addOptionRow("Display API", %apiList, false, "",  true, "The display API used for rendering.", %displayDevice);
    
    
    %numDevices = Canvas.getMonitorCount();
    %numDevices = Canvas.getMonitorCount();
    %devicesList = "";
    %devicesList = "";
@@ -235,7 +234,7 @@ function OptionsMenu::populateDisplaySettingsList(%this)
    }
    }
    
    
    %selectedDevice = getField(%devicesList, $pref::Video::deviceId);
    %selectedDevice = getField(%devicesList, $pref::Video::deviceId);
-   OptionsMenuSettingsList.addOptionRow("Display Device", %devicesList, false, "onDisplayModeChange", -1, -30, true, "The display devices the window should be on.", %selectedDevice);
+   OptionsMenuSettingsList.addOptionRow("Display Device", %devicesList, false, "onDisplayModeChange",  true, "The display devices the window should be on.", %selectedDevice);
       
       
    if (%numDevices > 1)
    if (%numDevices > 1)
       OptionsMenuSettingsList.setRowEnabled(1, true);
       OptionsMenuSettingsList.setRowEnabled(1, true);
@@ -243,10 +242,10 @@ function OptionsMenu::populateDisplaySettingsList(%this)
       OptionsMenuSettingsList.setRowEnabled(1, false);
       OptionsMenuSettingsList.setRowEnabled(1, false);
    
    
    %mode = getField($Video::ModeTags, $pref::Video::deviceMode);
    %mode = getField($Video::ModeTags, $pref::Video::deviceMode);
-   OptionsMenuSettingsList.addOptionRow("Window Mode", $Video::ModeTags, false, "onDisplayModeChange", -1, -30, true, "", %mode);
+   OptionsMenuSettingsList.addOptionRow("Window Mode", $Video::ModeTags, false, "onDisplayModeChange",  true, "", %mode);
    
    
    %resolutionList = getScreenResolutionList($pref::Video::deviceId, $pref::Video::deviceMode);
    %resolutionList = getScreenResolutionList($pref::Video::deviceId, $pref::Video::deviceMode);
-   OptionsMenuSettingsList.addOptionRow("Resolution", %resolutionList, false, "onDisplayResChange", -1, -30, true, "Resolution of the game window", _makePrettyResString( $pref::Video::mode ));
+   OptionsMenuSettingsList.addOptionRow("Resolution", %resolutionList, false, "onDisplayResChange",  true, "Resolution of the game window", _makePrettyResString( $pref::Video::mode ));
    
    
    //If they're doing borderless, the window resolution must match the display resolution
    //If they're doing borderless, the window resolution must match the display resolution
    if(%mode !$= "Borderless")
    if(%mode !$= "Borderless")
@@ -254,19 +253,17 @@ function OptionsMenu::populateDisplaySettingsList(%this)
    else
    else
       OptionsMenuSettingsList.setRowEnabled(3, false);
       OptionsMenuSettingsList.setRowEnabled(3, false);
    
    
-   OptionsMenuSettingsList.addOptionRow("VSync", "No\tYes", false, "", -1, -30, true, "", convertBoolToYesNo(!$pref::Video::disableVerticalSync));
+   OptionsMenuSettingsList.addOptionRow("VSync", "No\tYes", false, "",  true, "", convertBoolToYesNo(!$pref::Video::disableVerticalSync));
 
 
 
 
    %refreshList = getScreenRefreshList($pref::Video::mode);
    %refreshList = getScreenRefreshList($pref::Video::mode);
-   OptionsMenuSettingsList.addOptionRow("Refresh Rate", %refreshList, false, "", -1, -30, true, "", $pref::Video::RefreshRate);
+   OptionsMenuSettingsList.addOptionRow("Refresh Rate", %refreshList, false, "",  true, "", $pref::Video::RefreshRate);
    
    
    //move to gameplay tab
    //move to gameplay tab
-   OptionsMenuSettingsList.addSliderRow("Field of View", 75, 5, "65 100", "", -1, -30);
-   
-   OptionsMenuSettingsList.addSliderRow("Brightness", 0.5, 0.1, "0 1", "", -1, -30);
-   OptionsMenuSettingsList.addSliderRow("Contrast", 0.5, 0.1, "0 1", "", -1, -30);
+   OptionsMenuSettingsList.addSliderRow("Field of View", 75, 5, "65 100", "");
    
    
-   OptionsMenuSettingsList.refresh();
+   OptionsMenuSettingsList.addSliderRow("Brightness", 0.5, 0.1, "0 1", "");
+   OptionsMenuSettingsList.addSliderRow("Contrast", 0.5, 0.1, "0 1", "");
 }
 }
 
 
 function OptionsMenu::applyDisplaySettings(%this)
 function OptionsMenu::applyDisplaySettings(%this)
@@ -290,10 +287,9 @@ function OptionsMenu::applyDisplaySettings(%this)
    export("$pref::*", %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension, false);
    export("$pref::*", %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension, false);
 }
 }
 
 
-function OptionsMenu::populateGraphicsSettingsList(%this)
+function populateGraphicsSettingsList(%this)
 {
 {
-   %this.pageTabIndex = 1;
-   OptionsMenuSettingsList.clearRows();
+   OptionsMenuSettingsList.clear();
    
    
    OptionName.setText("");
    OptionName.setText("");
    OptionDescription.setText("");
    OptionDescription.setText("");
@@ -303,26 +299,24 @@ function OptionsMenu::populateGraphicsSettingsList(%this)
    %highMedLow = "Low\tMedium\tHigh";
    %highMedLow = "Low\tMedium\tHigh";
    %anisoFilter = "Off\t4\t8\t16";
    %anisoFilter = "Off\t4\t8\t16";
    %aaFilter = "Off\t1\t2\t4";
    %aaFilter = "Off\t1\t2\t4";
-   OptionsMenuSettingsList.addOptionRow("Lighting Quality", getQualityLevels(LightingQualityList), false, "", -1, -30, true, "Amount and drawdistance of local lights", getCurrentQualityLevel(LightingQualityList));
-   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));
-   OptionsMenuSettingsList.addOptionRow("Object Draw Distance", getQualityLevels(MeshDrawDistQualityGroup), false, "", -1, -30, true, "Dictates if and when static objects fade out in the distance", getCurrentQualityLevel(MeshDrawDistQualityGroup));
-   OptionsMenuSettingsList.addOptionRow("Texture Quality", getQualityLevels(TextureQualityGroup), false, "", -1, -30, true, "Fidelity of textures", getCurrentQualityLevel(TextureQualityGroup));
-   OptionsMenuSettingsList.addOptionRow("Terrain Quality", getQualityLevels(TerrainQualityGroup), false, "", -1, -30, true, "Quality level of terrain objects", getCurrentQualityLevel(TerrainQualityGroup));
-   OptionsMenuSettingsList.addOptionRow("Decal Lifetime", getQualityLevels(DecalLifetimeGroup), false, "", -1, -30, true, "How long decals are rendered", getCurrentQualityLevel(DecalLifetimeGroup));
-   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", %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));
-   OptionsMenuSettingsList.addOptionRow("Depth of Field", %onOffList, false, "", -1, -30, true, "Whether the Depth of Field effect is enabled", convertBoolToOnOff($pref::PostFX::EnableDOF));
-   OptionsMenuSettingsList.addOptionRow("Vignette", %onOffList, false, "", -1, -30, true, "Whether the vignette effect is enabled", convertBoolToOnOff($pref::PostFX::EnableVignette));
-   OptionsMenuSettingsList.addOptionRow("Light Rays", %onOffList, false, "", -1, -30, true, "Whether the light rays effect is enabled", convertBoolToOnOff($pref::PostFX::EnableLightRays));
-   
-   OptionsMenuSettingsList.refresh();
+   OptionsMenuSettingsList.addOptionRow("Lighting Quality", getQualityLevels(LightingQualityList), false, "",  true, "Amount and drawdistance of local lights", getCurrentQualityLevel(LightingQualityList));
+   OptionsMenuSettingsList.addOptionRow("Shadow Quality", getQualityLevels(ShadowQualityList), false, "",  true, "Shadow revolution quality", getCurrentQualityLevel(ShadowQualityList));
+   OptionsMenuSettingsList.addOptionRow("Soft Shadow Quality", getQualityLevels(SoftShadowList), false, "",  true, "Amount of softening applied to shadowmaps", getCurrentQualityLevel(SoftShadowList));
+   OptionsMenuSettingsList.addOptionRow("Mesh Quality", getQualityLevels(MeshQualityGroup), false, "",  true, "Fidelity of rendering of mesh objects", getCurrentQualityLevel(MeshQualityGroup));
+   OptionsMenuSettingsList.addOptionRow("Object Draw Distance", getQualityLevels(MeshDrawDistQualityGroup), false, "",  true, "Dictates if and when static objects fade out in the distance", getCurrentQualityLevel(MeshDrawDistQualityGroup));
+   OptionsMenuSettingsList.addOptionRow("Texture Quality", getQualityLevels(TextureQualityGroup), false, "",  true, "Fidelity of textures", getCurrentQualityLevel(TextureQualityGroup));
+   OptionsMenuSettingsList.addOptionRow("Terrain Quality", getQualityLevels(TerrainQualityGroup), false, "",  true, "Quality level of terrain objects", getCurrentQualityLevel(TerrainQualityGroup));
+   OptionsMenuSettingsList.addOptionRow("Decal Lifetime", getQualityLevels(DecalLifetimeGroup), false, "",  true, "How long decals are rendered", getCurrentQualityLevel(DecalLifetimeGroup));
+   OptionsMenuSettingsList.addOptionRow("Ground Cover Density", getQualityLevels(GroundCoverDensityGroup), false, "",  true, "Density of ground cover items, such as grass", getCurrentQualityLevel(GroundCoverDensityGroup));
+   OptionsMenuSettingsList.addOptionRow("Shader Quality", getQualityLevels(ShaderQualityGroup), false, "",  true, "Dictates the overall shader quality level, adjusting what features are enabled.", getCurrentQualityLevel(ShaderQualityGroup));
+   OptionsMenuSettingsList.addOptionRow("Anisotropic Filtering", %anisoFilter, false, "",  true, "Amount of Anisotropic Filtering on textures, which dictates their sharpness at a distance", $pref::Video::defaultAnisotropy);
+   OptionsMenuSettingsList.addOptionRow("Anti-Aliasing", %aaFilter, false, "",  true, "Amount of Post-Processing Anti-Aliasing applied to rendering", $pref::Video::AA);
+   OptionsMenuSettingsList.addOptionRow("Parallax", %onOffList, false, "",  true, "Whether the surface parallax shader effect is enabled", convertBoolToOnOff(!$pref::Video::disableParallaxMapping));
+   OptionsMenuSettingsList.addOptionRow("Water Reflections", %onOffList, false, "",  true, "Whether water reflections are enabled", convertBoolToOnOff(!$pref::Water::disableTrueReflections));
+   OptionsMenuSettingsList.addOptionRow("SSAO", %onOffList, false, "",  true, "Whether Screen-Space Ambient Occlusion is enabled", convertBoolToOnOff($pref::PostFX::EnableSSAO));
+   OptionsMenuSettingsList.addOptionRow("Depth of Field", %onOffList, false, "",  true, "Whether the Depth of Field effect is enabled", convertBoolToOnOff($pref::PostFX::EnableDOF));
+   OptionsMenuSettingsList.addOptionRow("Vignette", %onOffList, false, "",  true, "Whether the vignette effect is enabled", convertBoolToOnOff($pref::PostFX::EnableVignette));
+   OptionsMenuSettingsList.addOptionRow("Light Rays", %onOffList, false, "",  true, "Whether the light rays effect is enabled", convertBoolToOnOff($pref::PostFX::EnableLightRays));
 }
 }
 
 
 function OptionsMenu::applyGraphicsSettings(%this)
 function OptionsMenu::applyGraphicsSettings(%this)
@@ -439,10 +433,9 @@ function updateDisplaySettings()
    }
    }
 }
 }
 
 
-function OptionsMenu::populateAudioSettingsList(%this)
+function populateAudioSettingsList(%this)
 {
 {
-   %this.pageTabIndex = 2;
-   OptionsMenuSettingsList.clearRows();
+   OptionsMenuSettingsList.clear();
    
    
    OptionName.setText("");
    OptionName.setText("");
    OptionDescription.setText("");
    OptionDescription.setText("");
@@ -477,18 +470,15 @@ function OptionsMenu::populateAudioSettingsList(%this)
          else 
          else 
             %audioDeviceList = %audioDeviceList @ "\t" @ %device;  
             %audioDeviceList = %audioDeviceList @ "\t" @ %device;  
       }
       }
-         
    }
    }
    
    
-   OptionsMenuSettingsList.addOptionRow("Audio Provider", %audioProviderList, false, "audioProviderChanged", -1, -15, true, "", $currentAudioProvider);
-   OptionsMenuSettingsList.addOptionRow("Audio Device", %audioDeviceList, false, "", -1, -15, true, $pref::SFX::device);
-   
-   OptionsMenuSettingsList.addSliderRow("Master Volume", $pref::SFX::masterVolume, 0.1, "0 1", "", -1, -30);
-   OptionsMenuSettingsList.addSliderRow("GUI Volume", $pref::SFX::channelVolume[ $GuiAudioType], 0.1, "0 1", "", -1, -30);
-   OptionsMenuSettingsList.addSliderRow("Effects Volume", $pref::SFX::channelVolume[ $SimAudioType ], 0.1, "0 1", "", -1, -30);
-   OptionsMenuSettingsList.addSliderRow("Music Volume", $pref::SFX::channelVolume[ $MusicAudioType ], 0.1, "0 1", "", -1, -30);
+   OptionsMenuSettingsList.addOptionRow("Audio Provider", %audioProviderList, false, "audioProviderChanged", true, "", $currentAudioProvider);
+   OptionsMenuSettingsList.addOptionRow("Audio Device", %audioDeviceList, false, "", true, $pref::SFX::device);
    
    
-   OptionsMenuSettingsList.refresh();
+   OptionsMenuSettingsList.addSliderRow("Master Volume", $pref::SFX::masterVolume, 0.1, "0 1", "");
+   OptionsMenuSettingsList.addSliderRow("GUI Volume", $pref::SFX::channelVolume[ $GuiAudioType], 0.1, "0 1", "");
+   OptionsMenuSettingsList.addSliderRow("Effects Volume", $pref::SFX::channelVolume[ $SimAudioType ], 0.1, "0 1", "");
+   OptionsMenuSettingsList.addSliderRow("Music Volume", $pref::SFX::channelVolume[ $MusicAudioType ], 0.1, "0 1", "");
 }
 }
 
 
 function audioProviderChanged()
 function audioProviderChanged()
@@ -498,7 +488,7 @@ function audioProviderChanged()
    $currentAudioProvider = %provider;
    $currentAudioProvider = %provider;
    
    
    //And now refresh the list to get the correct devices
    //And now refresh the list to get the correct devices
-   OptionsMenu.populateAudioSettingsList();
+   populateAudioSettingsList();
 }
 }
 
 
 function OptionsMenu::applyAudioSettings(%this)
 function OptionsMenu::applyAudioSettings(%this)
@@ -531,10 +521,9 @@ function OptionsMenu::applyAudioSettings(%this)
    }
    }
 }
 }
 
 
-function OptionsMenu::populateKeyboardMouseSettingsList(%this)
+function populateKeyboardMouseSettingsList(%this)
 {
 {
-   %this.pageTabIndex = 3;
-   OptionsMenuSettingsList.clearRows();
+   OptionsMenuSettingsList.clear();
    
    
    OptionName.setText("");
    OptionName.setText("");
    OptionDescription.setText("");
    OptionDescription.setText("");
@@ -542,13 +531,12 @@ function OptionsMenu::populateKeyboardMouseSettingsList(%this)
    $remapListDevice = "keyboard";
    $remapListDevice = "keyboard";
    fillRemapList();
    fillRemapList();
    
    
-   OptionsMenuSettingsList.refresh();
+   //OptionsMenuSettingsList.refresh();
 }
 }
 
 
-function OptionsMenu::populateGamepadSettingsList(%this)
+function populateGamepadSettingsList(%this)
 {
 {
-   %this.pageTabIndex = 4;
-   OptionsMenuSettingsList.clearRows();
+   OptionsMenuSettingsList.clear();
    
    
    OptionName.setText("");
    OptionName.setText("");
    OptionDescription.setText("");
    OptionDescription.setText("");
@@ -586,6 +574,69 @@ function OptionsMenu::backOut(%this)
    }
    }
 }
 }
 
 
+function OptionsMenuSettingsList::setRowEnabled(%this, %row, %status)
+{
+   %option = %this.getObject(%row);
+   if(isObject(%option))
+   {
+      %option.setEnabled(%status);
+   }
+}
+
+function OptionsMenuSettingsList::addOptionRow(%this, %label, %optionsList, %wrapOptions, %callback, %enabled, %description, %defaultValue)
+{
+   if(%enabled $= "")
+      %enabled = true;
+      
+   %optionsRowSize = 30;
+   %optionColumnWidth = %this.extent.x - 450;//todo, calculate off longest option text?
+      
+   %option = new GuiGameSettingsCtrl() { 
+      class = "MenuOptionsButton";
+      profile = "GuiMenuButtonProfile";
+      horizSizing = "width";
+      vertSizing = "bottom";
+      position = "0 0";
+      extent = %this.extent.x SPC %optionsRowSize;
+      columnSplit = %optionColumnWidth;
+      useMouseEvents = true;
+   };
+   
+   %option.setListSetting(%label, %optionsList, %wrapOptions, %callback, %enabled, %description, %defaultValue);
+
+   %this.add(%option);
+}
+
+function OptionsMenuSettingsList::addSliderRow(%this, %label, %defaultValue, %increment, %range, %callback, %enabled, %description)
+{
+   if(%enabled $= "")
+      %enabled = true;
+      
+   %optionsRowSize = 30;
+   %optionColumnWidth = %this.extent.x - 450;//todo, calculate off longest option text?
+      
+   %option = new GuiGameSettingsCtrl() { 
+      class = "MenuOptionsButton";
+      profile = "GuiMenuButtonProfile";
+      horizSizing = "width";
+      vertSizing = "bottom";
+      position = "0 0";
+      extent = %this.extent.x SPC %optionsRowSize;
+      columnSplit = %optionColumnWidth;
+      useMouseEvents = true;
+   };
+   
+   %option.setSliderSetting(%label, %defaultValue, %increment, %range, %callback, %enabled, %description);
+
+   %this.add(%option);
+}
+
+//
+function OptionsMenuCategoryList::onNavigate(%this, %index)
+{
+   %this.getObject(%index).performClick();
+}
+
 function convertOptionToBool(%val)
 function convertOptionToBool(%val)
 {
 {
    if(%val $= "yes" || %val $= "on")
    if(%val $= "yes" || %val $= "on")
@@ -685,4 +736,16 @@ function onDisplayResChange(%val)
 
 
    OptionsMenuSettingsList.setOptions(5, %refreshList);
    OptionsMenuSettingsList.setOptions(5, %refreshList);
    OptionsMenuSettingsList.selectOption(5, %newRate);
    OptionsMenuSettingsList.selectOption(5, %newRate);
+}
+
+function MenuOptionsButton::onMouseEnter(%this)
+{
+   OptionName.setText(%this.getLabel());
+   OptionDescription.setText(%this.getToolTip());
+}
+
+function MenuOptionsButton::onMouseLeave(%this)
+{
+   OptionName.setText("");
+   OptionDescription.setText("");
 }
 }

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


+ 1 - 1
Templates/BaseGame/game/data/UI/scripts/controlsMenu.tscript

@@ -176,7 +176,7 @@ function fillRemapList()
       OptionsMenuSettingsList.addKeybindRow(getField(%keyMap, 0), getButtonBitmap(%device, getField(%keyMap, 1)), "doKeyRemap", -1, -15, true, %description);
       OptionsMenuSettingsList.addKeybindRow(getField(%keyMap, 0), getButtonBitmap(%device, getField(%keyMap, 1)), "doKeyRemap", -1, -15, true, %description);
    }
    }
 
 
-   OptionsMenuSettingsList.refresh();
+   //OptionsMenuSettingsList.refresh();
       //OptionsMenu.addRow( %i, %this.buildFullMapString( %i ) );
       //OptionsMenu.addRow( %i, %this.buildFullMapString( %i ) );
 }
 }
 
 

+ 0 - 341
Templates/BaseGame/game/data/UI/scripts/menuInputButtons.tscript

@@ -1,341 +0,0 @@
-//==============================================================================
-// 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 !$= "")
-      {
-         %assetId = "";
-         if($activeControllerName $= "PS4 Controller")
-         { 
-            %assetId = "UI:PS4_";
-            
-            if(%this.gamepadButton $= "btn_a")
-               %assetId = %assetId @ "Cross";
-            else if(%this.gamepadButton $= "btn_b")
-               %assetId = %assetId @ "Circle";
-            else if(%this.gamepadButton $= "btn_x")
-               %assetId = %assetId @ "Square";
-            else if(%this.gamepadButton $= "btn_y")
-               %assetId = %assetId @ "Triangle";
-            else if(%this.gamepadButton $= "btn_l")
-               %assetId = %assetId @ "L1";
-            else if(%this.gamepadButton $= "zaxis")
-               %assetId = %assetId @ "L2";
-            else if(%this.gamepadButton $= "btn_r")
-               %assetId = %assetId @ "R1";
-            else if(%this.gamepadButton $= "rzaxis")
-               %assetId = %assetId @ "R2";
-            else if(%this.gamepadButton $= "btn_start")
-               %assetId = %assetId @ "Options";
-            else if(%this.gamepadButton $= "btn_back")
-               %assetId = %assetId @ "Share";
-         }
-         else if($activeControllerName $= "Nintendo Switch Pro Controller")
-         {
-            %assetId = "UI:Switch_";
-            
-            if(%this.gamepadButton $= "btn_a")
-               %assetId = %assetId @ "B";
-            else if(%this.gamepadButton $= "btn_b")
-               %assetId = %assetId @ "A";
-            else if(%this.gamepadButton $= "btn_x")
-               %assetId = %assetId @ "Y";
-            else if(%this.gamepadButton $= "btn_y")
-               %assetId = %assetId @ "X";
-            else if(%this.gamepadButton $= "btn_l")
-               %assetId = %assetId @ "LB";
-            else if(%this.gamepadButton $= "zaxis")
-               %assetId = %assetId @ "LT";
-            else if(%this.gamepadButton $= "btn_r")
-               %assetId = %assetId @ "RB";
-            else if(%this.gamepadButton $= "rzaxis")
-               %assetId = %assetId @ "RT";
-            else if(%this.gamepadButton $= "btn_start")
-               %assetId = %assetId @ "Plus";
-            else if(%this.gamepadButton $= "btn_back")
-               %assetId = %assetId @ "Minus";
-         }
-         else if($activeControllerName !$= "")
-         {
-            %assetId = "UI:Xbox_";
-            
-            if(%this.gamepadButton $= "btn_a")
-               %assetId = %assetId @ "A";
-            else if(%this.gamepadButton $= "btn_b")
-               %assetId = %assetId @ "B";
-            else if(%this.gamepadButton $= "btn_x")
-               %assetId = %assetId @ "X";
-            else if(%this.gamepadButton $= "btn_y")
-               %assetId = %assetId @ "Y";
-            else if(%this.gamepadButton $= "btn_l")
-               %assetId = %assetId @ "LB";
-            else if(%this.gamepadButton $= "zaxis")
-               %assetId = %assetId @ "LT";
-            else if(%this.gamepadButton $= "btn_r")
-               %assetId = %assetId @ "RB";
-            else if(%this.gamepadButton $= "rzaxis")
-               %assetId = %assetId @ "RT";
-            else if(%this.gamepadButton $= "btn_start")
-               %assetId = %assetId @ "Menu";
-            else if(%this.gamepadButton $= "btn_back")
-               %assetId = %assetId @ "Windows";
-         }
-      } 
-   }
-   else
-   {
-      if(%this.keyboardButton !$= "")
-      {
-         %assetId = "UI:Keyboard_Black_" @ %this.keyboardButton;
-      }
-   }
-   
-   %this.setBitmap(%assetId @ "_image");
-
-   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;
-   }*/   
-}

+ 6 - 0
Templates/BaseGame/game/data/UI/scripts/profiles.tscript

@@ -145,6 +145,12 @@ new GuiControlProfile( GuiBlankMenuButtonProfile )
    category = "Core";
    category = "Core";
 };
 };
 
 
+if( !isObject( GuiJoinServerButtonProfile ) )
+new GuiControlProfile( GuiJoinServerButtonProfile : GuiMenuButtonProfile )
+{
+   justify = "left";
+};
+
 if( !isObject( GuiMenuTextProfile ) )
 if( !isObject( GuiMenuTextProfile ) )
 new GuiControlProfile( GuiMenuTextProfile )
 new GuiControlProfile( GuiMenuTextProfile )
 {
 {