From 40acf752385a87f93eb4b6f0938a9a14196ccc3f Mon Sep 17 00:00:00 2001 From: JeffR Date: Thu, 17 Feb 2022 18:21:13 -0600 Subject: [PATCH] Template changes --- .../game/core/gui/scripts/profiles.tscript | 21 +- Templates/BaseGame/game/data/UI/UI.tscript | 2 +- .../game/data/UI/guis/OptionsDlg.asset.taml | 7 - .../game/data/UI/guis/joinServerMenu.gui | 270 +--- .../game/data/UI/guis/joinServerMenu.tscript | 35 +- .../BaseGame/game/data/UI/guis/mainMenu.gui | 210 ++- .../game/data/UI/guis/mainMenu.tscript | 16 +- .../BaseGame/game/data/UI/guis/optionsDlg.gui | 1432 ----------------- .../game/data/UI/guis/optionsMenu.gui | 547 ++++--- .../game/data/UI/guis/optionsMenu.tscript | 203 ++- .../game/data/UI/images/scrollBar.png | Bin 6643 -> 9187 bytes .../game/data/UI/scripts/controlsMenu.tscript | 2 +- .../data/UI/scripts/menuInputButtons.tscript | 341 ---- .../game/data/UI/scripts/profiles.tscript | 6 + 14 files changed, 762 insertions(+), 2330 deletions(-) delete mode 100644 Templates/BaseGame/game/data/UI/guis/OptionsDlg.asset.taml delete mode 100644 Templates/BaseGame/game/data/UI/guis/optionsDlg.gui delete mode 100644 Templates/BaseGame/game/data/UI/scripts/menuInputButtons.tscript diff --git a/Templates/BaseGame/game/core/gui/scripts/profiles.tscript b/Templates/BaseGame/game/core/gui/scripts/profiles.tscript index dd0ede04a..57156bbbe 100644 --- a/Templates/BaseGame/game/core/gui/scripts/profiles.tscript +++ b/Templates/BaseGame/game/core/gui/scripts/profiles.tscript @@ -26,6 +26,10 @@ if($Gui::fontCacheDirectory $= "") $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 // defaults from. It must exist. @@ -137,13 +141,20 @@ new GuiControlProfile(GuiTextEditProfile) category = "Core"; }; -if(!isObject(GuiScrollProfile)) -new GuiControlProfile(GuiScrollProfile) +if(!isObject(GuiMenuScrollProfile)) +new GuiControlProfile(GuiMenuScrollProfile) { 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; bitmapAsset = "Core_GUI:scrollBar_image"; hasBitmapArray = true; diff --git a/Templates/BaseGame/game/data/UI/UI.tscript b/Templates/BaseGame/game/data/UI/UI.tscript index e0b1670d0..5b8c1ee6a 100644 --- a/Templates/BaseGame/game/data/UI/UI.tscript +++ b/Templates/BaseGame/game/data/UI/UI.tscript @@ -36,7 +36,7 @@ function UI::initClient(%this) %this.queueExec("./scripts/profiles"); //Now gui files - %this.queueExec("./scripts/menuInputButtons"); + %this.queueExec("./scripts/menuInputHandling"); %this.queueExec("./guis/mainMenu"); %this.queueExec("./guis/mainMenu.gui"); diff --git a/Templates/BaseGame/game/data/UI/guis/OptionsDlg.asset.taml b/Templates/BaseGame/game/data/UI/guis/OptionsDlg.asset.taml deleted file mode 100644 index 21467cbc8..000000000 --- a/Templates/BaseGame/game/data/UI/guis/OptionsDlg.asset.taml +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/Templates/BaseGame/game/data/UI/guis/joinServerMenu.gui b/Templates/BaseGame/game/data/UI/guis/joinServerMenu.gui index 4343fe7ad..17a2c4435 100644 --- a/Templates/BaseGame/game/data/UI/guis/joinServerMenu.gui +++ b/Templates/BaseGame/game/data/UI/guis/joinServerMenu.gui @@ -14,19 +14,27 @@ $guiContent = new GuiControl(JoinServerMenu) { canSave = "1"; canSaveDynamicFields = "1"; 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"; horizSizing = "width"; vertSizing = "height"; - sendBreakEvents="1"; + profile = "GuiInputCtrlProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; }; - new GuiControl(JoinServerWindow) { position = "48 56"; extent = "928 655"; @@ -46,7 +54,7 @@ $guiContent = new GuiControl(JoinServerMenu) { percent = "100"; vertical = "0"; flipClip = "0"; - bitmap = "data/ui/images/panel.png"; + BitmapAsset = "UI:panel_image"; color = "255 255 255 255"; position = "0 0"; extent = "927 40"; @@ -89,7 +97,7 @@ $guiContent = new GuiControl(JoinServerMenu) { percent = "100"; vertical = "0"; flipClip = "0"; - bitmap = "data/ui/images/panel_low.png"; + BitmapAsset = "UI:panel_low_image"; color = "255 255 255 255"; position = "0 40"; extent = "927 618"; @@ -105,58 +113,6 @@ $guiContent = new GuiControl(JoinServerMenu) { canSave = "1"; 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) { text = "No servers found."; maxLength = "255"; @@ -166,7 +122,7 @@ $guiContent = new GuiControl(JoinServerMenu) { anchorBottom = "0"; anchorLeft = "1"; anchorRight = "0"; - position = "277 47"; + position = "392 47"; extent = "148 18"; minExtent = "8 8"; horizSizing = "right"; @@ -324,25 +280,30 @@ $guiContent = new GuiControl(JoinServerMenu) { canSave = "1"; 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"; - 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"; active = "1"; - altCommand = "JoinServerDlg.join();"; tooltipProfile = "GuiToolTipProfile"; hovertime = "1000"; isContainer = "1"; canSave = "1"; canSaveDynamicFields = "0"; + class = "MenuList"; }; }; new GuiControl(JS_queryStatus) { @@ -427,130 +388,9 @@ $guiContent = new GuiControl(JoinServerMenu) { 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) { - position = "109 711"; + position = "116 711"; extent = "791 40"; minExtent = "8 2"; horizSizing = "center"; @@ -567,7 +407,7 @@ $guiContent = new GuiControl(JoinServerMenu) { new GuiIconButtonCtrl() { buttonMargin = "4 4"; - iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter"; + BitmapAsset = "UI:Keyboard_Black_Return_image"; iconLocation = "Left"; sizeIconToButton = "1"; makeIconSquare = "1"; @@ -586,7 +426,7 @@ $guiContent = new GuiControl(JoinServerMenu) { profile = "GuiMenuButtonProfile"; visible = "1"; active = "1"; - command = "OptionsMenu.apply();"; + command = "JoinServerMenu.join();"; tooltipProfile = "GuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; @@ -597,7 +437,7 @@ $guiContent = new GuiControl(JoinServerMenu) { }; new GuiIconButtonCtrl() { buttonMargin = "4 4"; - iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Esc"; + BitmapAsset = "UI:Keyboard_Black_Escape_image"; iconLocation = "Left"; sizeIconToButton = "1"; makeIconSquare = "1"; @@ -616,7 +456,7 @@ $guiContent = new GuiControl(JoinServerMenu) { profile = "GuiMenuButtonProfile"; visible = "1"; active = "1"; - command = "OptionsMenu.backOut();"; + command = "JoinServerMenu.backOut();"; tooltipProfile = "GuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; @@ -627,14 +467,14 @@ $guiContent = new GuiControl(JoinServerMenu) { }; new GuiIconButtonCtrl() { buttonMargin = "4 4"; - iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter"; + BitmapAsset = "UI:Keyboard_Black_Q_image"; iconLocation = "Left"; sizeIconToButton = "1"; makeIconSquare = "1"; textLocation = "Right"; textMargin = "4"; autoSize = "0"; - text = "Prev Tab"; + text = "Query LAN"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -644,28 +484,27 @@ $guiContent = new GuiControl(JoinServerMenu) { horizSizing = "right"; vertSizing = "bottom"; profile = "GuiMenuButtonProfile"; - visible = "0"; - active = "0"; - command = "OptionsMenu.prevTab();"; + visible = "1"; + active = "1"; + command = "JoinServerMenu.queryLan();"; tooltipProfile = "GuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; internalName = "queryLANButton"; class = "MenuInputButton"; - hidden = "1"; canSave = "1"; canSaveDynamicFields = "0"; }; new GuiIconButtonCtrl() { buttonMargin = "4 4"; - iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Esc"; + BitmapAsset = "UI:Keyboard_Black_E_image"; iconLocation = "Left"; sizeIconToButton = "1"; makeIconSquare = "1"; textLocation = "Right"; textMargin = "4"; autoSize = "0"; - text = "Next Tab"; + text = "Query Online"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -675,28 +514,27 @@ $guiContent = new GuiControl(JoinServerMenu) { horizSizing = "right"; vertSizing = "bottom"; profile = "GuiMenuButtonProfile"; - visible = "0"; - active = "0"; - command = "OptionsMenu.nextTab();"; + visible = "1"; + active = "1"; + command = "JoinServerMenu.query();"; tooltipProfile = "GuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; internalName = "queryInternetButton"; class = "MenuInputButton"; - hidden = "1"; canSave = "1"; canSaveDynamicFields = "0"; }; new GuiIconButtonCtrl() { buttonMargin = "4 4"; - bitmapAsset = "UI:Keyboard_Black_R_image"; + BitmapAsset = "UI:Keyboard_Black_R_image"; iconLocation = "Left"; sizeIconToButton = "1"; makeIconSquare = "1"; textLocation = "Right"; textMargin = "4"; autoSize = "0"; - text = "Reset"; + text = "Refresh"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -708,7 +546,7 @@ $guiContent = new GuiControl(JoinServerMenu) { profile = "GuiMenuButtonProfile"; visible = "1"; active = "1"; - command = "OptionsMenu.resetToDefaults();"; + command = "JoinServerMenu.refresh();"; tooltipProfile = "GuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; diff --git a/Templates/BaseGame/game/data/UI/guis/joinServerMenu.tscript b/Templates/BaseGame/game/data/UI/guis/joinServerMenu.tscript index e65e85e5d..b2f0eb8eb 100644 --- a/Templates/BaseGame/game/data/UI/guis/joinServerMenu.tscript +++ b/Templates/BaseGame/game/data/UI/guis/joinServerMenu.tscript @@ -3,10 +3,12 @@ function JoinServerMenu::onWake() { // Double check the status. Tried setting this the control // inactive to start with, but that didn't seem to work. - JoinServerJoinBtn.setActive(JS_serverList.rowCount() > 0); + JoinServerJoinBtn.setActive(JoinServerList.getCount() > 0); JoinServerButtonHolder.setActive(); + JoinServerList.setAsActiveMenuList(); + JoinServerMenuInputHandler.setFirstResponder(); } @@ -16,7 +18,7 @@ function JoinServerButtonHolder::onWake(%this) %this-->backButton.set("btn_b", "Escape", "Back", "JoinServerMenu.backOut();"); %this-->refreshButton.set("btn_y", "R", "Refresh", "JoinServerMenu.refresh();"); %this-->queryLANButton.set("btn_a", "Q", "Query LAN", "JoinServerMenu.queryLan();"); - %this-->queryInternetButton.set("btn_x", "E", "Query Internet", "JoinServerMenu.query();"); + %this-->queryInternetButton.set("btn_x", "E", "Query Online", "JoinServerMenu.query();"); } function JoinServerMenuInputHandler::onInputEvent(%this, %device, %action, %state) @@ -110,23 +112,23 @@ function JoinServerMenu::update(%this) { // Copy the servers into the server list. JS_queryStatus.setVisible(false); - JS_serverList.clear(); + JoinServerList.clear(); %sc = getServerCount(); for( %i = 0; %i < %sc; %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) { case "start": - JoinServerJoinBtn.setActive(false); - JoinServerQryInternetBtn.setActive(false); JS_statusText.setText(%msg); JS_statusBar.setValue(0); - JS_serverList.clear(); + JoinServerList.clear(); case "ping": JS_statusText.setText("Ping Servers"); @@ -156,7 +156,6 @@ function onServerQueryStatus(%status, %msg, %value) JS_statusBar.setValue(%value); case "done": - JoinServerQryInternetBtn.setActive(true); JS_queryStatus.setVisible(false); JS_status.setText(%msg); JoinServerMenu.update(); diff --git a/Templates/BaseGame/game/data/UI/guis/mainMenu.gui b/Templates/BaseGame/game/data/UI/guis/mainMenu.gui index f33c06b1d..4c6c13697 100644 --- a/Templates/BaseGame/game/data/UI/guis/mainMenu.gui +++ b/Templates/BaseGame/game/data/UI/guis/mainMenu.gui @@ -1,6 +1,6 @@ //--- OBJECT WRITE BEGIN --- $guiContent = new GuiChunkedBitmapCtrl(MainMenuGui) { - bitmapAsset = "UI:background_dark_image"; + BitmapAsset = "UI:background_dark_image"; useVariable = "0"; tile = "0"; position = "0 0"; @@ -19,15 +19,11 @@ $guiContent = new GuiChunkedBitmapCtrl(MainMenuGui) { Enabled = "1"; isDecoy = "0"; navigationIndex = "-1"; - + 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"; extent = "443 139"; minExtent = "8 2"; @@ -41,26 +37,179 @@ $guiContent = new GuiChunkedBitmapCtrl(MainMenuGui) { isContainer = "0"; canSave = "1"; canSaveDynamicFields = "1"; + autoFitExtents = "0"; + bitmapMode = "Stretched"; + groupNum = "-1"; + masked = "0"; 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"; vertSizing = "center"; - profile = "DefaultListMenuProfile"; + profile = "GuiDefaultProfile"; visible = "1"; active = "1"; tooltipProfile = "GuiToolTipProfile"; hovertime = "1000"; - isContainer = "0"; - class = "UIMenuButtonList"; + isContainer = "1"; canSave = "1"; 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) { position = "189 711"; @@ -80,7 +229,7 @@ $guiContent = new GuiChunkedBitmapCtrl(MainMenuGui) { new GuiIconButtonCtrl() { buttonMargin = "4 4"; - iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter"; + BitmapAsset = "UI:Keyboard_Black_Return_image"; iconLocation = "Left"; sizeIconToButton = "1"; makeIconSquare = "1"; @@ -109,5 +258,26 @@ $guiContent = new GuiChunkedBitmapCtrl(MainMenuGui) { 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 --- diff --git a/Templates/BaseGame/game/data/UI/guis/mainMenu.tscript b/Templates/BaseGame/game/data/UI/guis/mainMenu.tscript index f66551acd..0d830f176 100644 --- a/Templates/BaseGame/game/data/UI/guis/mainMenu.tscript +++ b/Templates/BaseGame/game/data/UI/guis/mainMenu.tscript @@ -5,8 +5,9 @@ function MainMenuGui::onAdd(%this) function MainMenuGui::onWake(%this) { - MainMenuButtonList.hidden = false; + MainMenuButtonList.setAsActiveMenuList(); MainMenuButtonHolder.setActive(); + MainMenuInputHandler.setFirstResponder(); } function MainMenuGui::onSleep(%this) @@ -16,18 +17,7 @@ function MainMenuGui::onSleep(%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() diff --git a/Templates/BaseGame/game/data/UI/guis/optionsDlg.gui b/Templates/BaseGame/game/data/UI/guis/optionsDlg.gui deleted file mode 100644 index b2758c32c..000000000 --- a/Templates/BaseGame/game/data/UI/guis/optionsDlg.gui +++ /dev/null @@ -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 --- diff --git a/Templates/BaseGame/game/data/UI/guis/optionsMenu.gui b/Templates/BaseGame/game/data/UI/guis/optionsMenu.gui index 9b76cb979..b7195557c 100644 --- a/Templates/BaseGame/game/data/UI/guis/optionsMenu.gui +++ b/Templates/BaseGame/game/data/UI/guis/optionsMenu.gui @@ -23,7 +23,7 @@ $guiContent = new GuiControl(OptionsMenu) { position = "48 56"; extent = "928 655"; minExtent = "8 2"; - horizSizing = "center"; + horizSizing = "aspectCenter"; vertSizing = "center"; profile = "GuiDefaultProfile"; visible = "1"; @@ -38,7 +38,27 @@ $guiContent = new GuiControl(OptionsMenu) { percent = "100"; vertical = "0"; flipClip = "0"; - bitmap = "data/ui/images/panel.png"; + BitmapAsset = "UI:panel_low_image"; + color = "255 255 255 255"; + position = "0 40"; + extent = "927 618"; + minExtent = "8 2"; + horizSizing = "width"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiBitmapBarCtrl() { + percent = "100"; + vertical = "0"; + flipClip = "0"; + BitmapAsset = "UI:panel_image"; color = "255 255 255 255"; position = "0 0"; extent = "927 40"; @@ -77,179 +97,6 @@ $guiContent = new GuiControl(OptionsMenu) { canSave = "1"; canSaveDynamicFields = "0"; }; - new GuiBitmapBarCtrl() { - percent = "100"; - vertical = "0"; - flipClip = "0"; - bitmap = "data/ui/images/panel_low.png"; - color = "255 255 255 255"; - position = "0 40"; - extent = "927 618"; - minExtent = "8 2"; - horizSizing = "width"; - vertSizing = "bottom"; - profile = "GuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new 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"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "1 83"; - extent = "622 573"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiMenuScrollProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - 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) { maxLength = "1024"; margin = "0 0 0 0"; @@ -258,10 +105,10 @@ $guiContent = new GuiControl(OptionsMenu) { anchorBottom = "0"; anchorLeft = "1"; anchorRight = "0"; - position = "635 94"; + position = "3 606"; extent = "293 17"; minExtent = "8 2"; - horizSizing = "right"; + horizSizing = "width"; vertSizing = "bottom"; profile = "MenuSubHeaderText"; visible = "1"; @@ -278,10 +125,10 @@ $guiContent = new GuiControl(OptionsMenu) { maxChars = "-1"; text = "This is a placeholder text for an option."; useURLMouseCursor = "0"; - position = "635 126"; + position = "3 625"; extent = "293 14"; minExtent = "8 2"; - horizSizing = "right"; + horizSizing = "width"; vertSizing = "bottom"; profile = "GuiMLTextProfile"; visible = "1"; @@ -292,24 +139,286 @@ $guiContent = new GuiControl(OptionsMenu) { 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 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) { - position = "109 711"; + position = "116 711"; extent = "791 40"; minExtent = "8 2"; horizSizing = "center"; @@ -326,7 +435,7 @@ $guiContent = new GuiControl(OptionsMenu) { new GuiIconButtonCtrl() { buttonMargin = "4 4"; - iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter"; + BitmapAsset = "UI:Keyboard_Black_Return_image"; iconLocation = "Left"; sizeIconToButton = "1"; makeIconSquare = "1"; @@ -345,7 +454,7 @@ $guiContent = new GuiControl(OptionsMenu) { profile = "GuiMenuButtonProfile"; visible = "1"; active = "1"; - command = "ChooseLevelDlg.beginLevel();"; + command = "OptionsMenu.apply();"; tooltipProfile = "GuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; @@ -356,7 +465,7 @@ $guiContent = new GuiControl(OptionsMenu) { }; new GuiIconButtonCtrl() { buttonMargin = "4 4"; - iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Esc"; + BitmapAsset = "UI:Keyboard_Black_Escape_image"; iconLocation = "Left"; sizeIconToButton = "1"; makeIconSquare = "1"; @@ -375,7 +484,7 @@ $guiContent = new GuiControl(OptionsMenu) { profile = "GuiMenuButtonProfile"; visible = "1"; active = "1"; - command = "ChooseLevelDlg.backOut();"; + command = "OptionsMenu.backOut();"; tooltipProfile = "GuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; @@ -386,7 +495,7 @@ $guiContent = new GuiControl(OptionsMenu) { }; new GuiIconButtonCtrl() { buttonMargin = "4 4"; - iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter"; + BitmapAsset = "UI:Switch_LB_image"; iconLocation = "Left"; sizeIconToButton = "1"; makeIconSquare = "1"; @@ -403,19 +512,21 @@ $guiContent = new GuiControl(OptionsMenu) { horizSizing = "right"; vertSizing = "bottom"; profile = "GuiMenuButtonProfile"; - visible = "1"; - active = "1"; + visible = "0"; + active = "0"; + command = "OptionsMenu.prevTab();"; tooltipProfile = "GuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; internalName = "prevTabButton"; class = "MenuInputButton"; + hidden = "1"; canSave = "1"; canSaveDynamicFields = "0"; }; new GuiIconButtonCtrl() { buttonMargin = "4 4"; - iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Esc"; + BitmapAsset = "UI:Switch_RB_image"; iconLocation = "Left"; sizeIconToButton = "1"; makeIconSquare = "1"; @@ -432,19 +543,21 @@ $guiContent = new GuiControl(OptionsMenu) { horizSizing = "right"; vertSizing = "bottom"; profile = "GuiMenuButtonProfile"; - visible = "1"; - active = "1"; + visible = "0"; + active = "0"; + command = "OptionsMenu.nextTab();"; tooltipProfile = "GuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; internalName = "nextTabButton"; class = "MenuInputButton"; + hidden = "1"; canSave = "1"; canSaveDynamicFields = "0"; }; new GuiIconButtonCtrl() { buttonMargin = "4 4"; - iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Esc"; + BitmapAsset = "UI:Keyboard_Black_R_image"; iconLocation = "Left"; sizeIconToButton = "1"; makeIconSquare = "1"; @@ -463,6 +576,7 @@ $guiContent = new GuiControl(OptionsMenu) { profile = "GuiMenuButtonProfile"; visible = "1"; active = "1"; + command = "OptionsMenu.resetToDefaults();"; tooltipProfile = "GuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; @@ -472,5 +586,26 @@ $guiContent = new GuiControl(OptionsMenu) { 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 --- diff --git a/Templates/BaseGame/game/data/UI/guis/optionsMenu.tscript b/Templates/BaseGame/game/data/UI/guis/optionsMenu.tscript index 63488c8d7..eac532203 100644 --- a/Templates/BaseGame/game/data/UI/guis/optionsMenu.tscript +++ b/Templates/BaseGame/game/data/UI/guis/optionsMenu.tscript @@ -54,20 +54,22 @@ function OptionsMenu::onWake(%this) { MainMenuButtonList.hidden = true; - %this.pageTabIndex = 0; - %tab = %this.getTab(); - %tab.performClick(); + OptionsMenuCategoryList.setAsActiveMenuList(); OptionsButtonHolder.setActive(); + + OptionsMenuInputHandler.setFirstResponder(); } 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-->applyButton.set("btn_start", "Return", "Apply", "OptionsMenu.apply();"); %this-->backButton.set("btn_b", "Escape", "Back", "OptionsMenu.backOut();"); + + //OptionsMenuCategoryList.getObject(0).performClick(); } function OptionsMenu::apply(%this) @@ -78,7 +80,7 @@ function OptionsMenu::apply(%this) } else if(%this.pageTabIndex == 1) { - %this.applyGraphicsSettings(); + %this.applyGraphicsSettings(); } else if(%this.pageTabIndex == 2) { @@ -130,26 +132,24 @@ function OptionsMenuSettingsList::onChange(%this) if(%currentRowText $= "Display") { - OptionsMenuList.populateDisplaySettingsList(); + populateDisplaySettingsList(); } else if(%currentRowText $= "Graphics") { - OptionsMenuList.populateGraphicsSettingsList(); + populateGraphicsSettingsList(); } else if(%currentRowText $= "Audio") { - OptionsMenuList.populateAudioSettingsList(); + populateAudioSettingsList(); } else if(%currentRowText $= "Keyboard + Mouse") { - OptionsMenuList.populateKeyboardMouseSettingsList(); + populateKeyboardMouseSettingsList(); } else if(%currentRowText $= "Gamepad") { - OptionsMenuList.populateGamepadSettingsList(); + populateGamepadSettingsList(); } - - } function OptionsMenu::prevTab(%this) @@ -188,10 +188,9 @@ function OptionsMenu::getTab(%this) return %this-->DisplayButton; } -function OptionsMenu::populateDisplaySettingsList(%this) +function populateDisplaySettingsList() { - %this.pageTabIndex = 0; - OptionsMenuSettingsList.clearRows(); + OptionsMenuSettingsList.clear(); OptionName.setText(""); OptionDescription.setText(""); @@ -221,7 +220,7 @@ function OptionsMenu::populateDisplaySettingsList(%this) 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(); %devicesList = ""; @@ -235,7 +234,7 @@ function OptionsMenu::populateDisplaySettingsList(%this) } %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) OptionsMenuSettingsList.setRowEnabled(1, true); @@ -243,10 +242,10 @@ function OptionsMenu::populateDisplaySettingsList(%this) OptionsMenuSettingsList.setRowEnabled(1, false); %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); - 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(%mode !$= "Borderless") @@ -254,19 +253,17 @@ function OptionsMenu::populateDisplaySettingsList(%this) else 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); - 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 - OptionsMenuSettingsList.addSliderRow("Field of View", 75, 5, "65 100", "", -1, -30); + OptionsMenuSettingsList.addSliderRow("Field of View", 75, 5, "65 100", ""); - OptionsMenuSettingsList.addSliderRow("Brightness", 0.5, 0.1, "0 1", "", -1, -30); - OptionsMenuSettingsList.addSliderRow("Contrast", 0.5, 0.1, "0 1", "", -1, -30); - - OptionsMenuSettingsList.refresh(); + OptionsMenuSettingsList.addSliderRow("Brightness", 0.5, 0.1, "0 1", ""); + OptionsMenuSettingsList.addSliderRow("Contrast", 0.5, 0.1, "0 1", ""); } function OptionsMenu::applyDisplaySettings(%this) @@ -290,10 +287,9 @@ function OptionsMenu::applyDisplaySettings(%this) export("$pref::*", %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension, false); } -function OptionsMenu::populateGraphicsSettingsList(%this) +function populateGraphicsSettingsList(%this) { - %this.pageTabIndex = 1; - OptionsMenuSettingsList.clearRows(); + OptionsMenuSettingsList.clear(); OptionName.setText(""); OptionDescription.setText(""); @@ -303,26 +299,24 @@ function OptionsMenu::populateGraphicsSettingsList(%this) %highMedLow = "Low\tMedium\tHigh"; %anisoFilter = "Off\t4\t8\t16"; %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) @@ -439,10 +433,9 @@ function updateDisplaySettings() } } -function OptionsMenu::populateAudioSettingsList(%this) +function populateAudioSettingsList(%this) { - %this.pageTabIndex = 2; - OptionsMenuSettingsList.clearRows(); + OptionsMenuSettingsList.clear(); OptionName.setText(""); OptionDescription.setText(""); @@ -477,18 +470,15 @@ function OptionsMenu::populateAudioSettingsList(%this) else %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.addOptionRow("Audio Provider", %audioProviderList, false, "audioProviderChanged", true, "", $currentAudioProvider); + OptionsMenuSettingsList.addOptionRow("Audio Device", %audioDeviceList, false, "", 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.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() @@ -498,7 +488,7 @@ function audioProviderChanged() $currentAudioProvider = %provider; //And now refresh the list to get the correct devices - OptionsMenu.populateAudioSettingsList(); + populateAudioSettingsList(); } 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(""); OptionDescription.setText(""); @@ -542,13 +531,12 @@ function OptionsMenu::populateKeyboardMouseSettingsList(%this) $remapListDevice = "keyboard"; fillRemapList(); - OptionsMenuSettingsList.refresh(); + //OptionsMenuSettingsList.refresh(); } -function OptionsMenu::populateGamepadSettingsList(%this) +function populateGamepadSettingsList(%this) { - %this.pageTabIndex = 4; - OptionsMenuSettingsList.clearRows(); + OptionsMenuSettingsList.clear(); OptionName.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) { if(%val $= "yes" || %val $= "on") @@ -685,4 +736,16 @@ function onDisplayResChange(%val) OptionsMenuSettingsList.setOptions(5, %refreshList); OptionsMenuSettingsList.selectOption(5, %newRate); +} + +function MenuOptionsButton::onMouseEnter(%this) +{ + OptionName.setText(%this.getLabel()); + OptionDescription.setText(%this.getToolTip()); +} + +function MenuOptionsButton::onMouseLeave(%this) +{ + OptionName.setText(""); + OptionDescription.setText(""); } \ No newline at end of file diff --git a/Templates/BaseGame/game/data/UI/images/scrollBar.png b/Templates/BaseGame/game/data/UI/images/scrollBar.png index 2699a7662781253fe3ba6bfd00468ba7a97e7ea3..4bd81576ba4217a429431e7806bf690f418ed775 100644 GIT binary patch literal 9187 zcmeHrXIN8Pw=O76I#NVXh*SX+l2AgBB1NQwbd+K$1PBR9D1y==Akq|6dXXv$3J6jZ z5RoE9svu23L=dD2(o{SF{r2`dci->a{XF;l+w*x=)|zv^;~itYYmB+FW~90484gw< zRysO54g-B%3))$hc4V_K(SBh7=S4a?9tnRdJBkIu7eFKtus9D4fO3(D0bu-aSUNht z;o@W*>1Zj(l^?5o@O>~MoU2iasQ)-aks!eBN`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cAbzXObk(En(FI6rcbF zC_o>?p3*dRZ?W4EXB*fP*PcR+D%7%U=7p~DURJ$Qik8czc;`h?P*D`!rl&T3<6e}W zI2*0k>!6))x7+qZuaqLC)W7$VaQ71W-YXL)+>+4$4tHyzw}smmdRw?3GW4DQFjb=x d8bjCkH-1^)Wxo$(c`^V1002ovPDHLkV1hvhrn~?E diff --git a/Templates/BaseGame/game/data/UI/scripts/controlsMenu.tscript b/Templates/BaseGame/game/data/UI/scripts/controlsMenu.tscript index 071902d99..b88efa0d6 100644 --- a/Templates/BaseGame/game/data/UI/scripts/controlsMenu.tscript +++ b/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.refresh(); + //OptionsMenuSettingsList.refresh(); //OptionsMenu.addRow( %i, %this.buildFullMapString( %i ) ); } diff --git a/Templates/BaseGame/game/data/UI/scripts/menuInputButtons.tscript b/Templates/BaseGame/game/data/UI/scripts/menuInputButtons.tscript deleted file mode 100644 index 3d4c76c90..000000000 --- a/Templates/BaseGame/game/data/UI/scripts/menuInputButtons.tscript +++ /dev/null @@ -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; - }*/ -} \ No newline at end of file diff --git a/Templates/BaseGame/game/data/UI/scripts/profiles.tscript b/Templates/BaseGame/game/data/UI/scripts/profiles.tscript index c9dfed5b5..3aae4df2a 100644 --- a/Templates/BaseGame/game/data/UI/scripts/profiles.tscript +++ b/Templates/BaseGame/game/data/UI/scripts/profiles.tscript @@ -145,6 +145,12 @@ new GuiControlProfile( GuiBlankMenuButtonProfile ) category = "Core"; }; +if( !isObject( GuiJoinServerButtonProfile ) ) +new GuiControlProfile( GuiJoinServerButtonProfile : GuiMenuButtonProfile ) +{ + justify = "left"; +}; + if( !isObject( GuiMenuTextProfile ) ) new GuiControlProfile( GuiMenuTextProfile ) {