diff --git a/Templates/BaseGame/game/data/UI/guis/SystemMenu.gui b/Templates/BaseGame/game/data/UI/guis/SystemMenu.gui index 381762506..18605ba85 100644 --- a/Templates/BaseGame/game/data/UI/guis/SystemMenu.gui +++ b/Templates/BaseGame/game/data/UI/guis/SystemMenu.gui @@ -22,6 +22,8 @@ $guiContent = new GuiControl(SystemMenu) { profile = "GuiMenuButtonProfile"; command = "Canvas.popDialog(GameMenu);"; tooltipProfile = "GuiToolTipProfile"; + groupNum = "1"; + class = "SystemMenuButton"; }; new GuiButtonCtrl() { text = "Options"; @@ -30,6 +32,8 @@ $guiContent = new GuiControl(SystemMenu) { profile = "GuiMenuButtonProfile"; command = "Canvas.pushDialog(OptionsMenu);"; tooltipProfile = "GuiToolTipProfile"; + groupNum = "1"; + class = "SystemMenuButton"; }; new GuiButtonCtrl() { text = "Exit to Menu"; @@ -38,6 +42,8 @@ $guiContent = new GuiControl(SystemMenu) { profile = "GuiMenuButtonProfile"; command = "systemMenuExitToMenu();"; tooltipProfile = "GuiToolTipProfile"; + groupNum = "1"; + class = "SystemMenuButton"; }; new GuiButtonCtrl() { text = "Exit to Desktop"; @@ -46,6 +52,8 @@ $guiContent = new GuiControl(SystemMenu) { profile = "GuiMenuButtonProfile"; command = "systemMenuExitToDesktop();"; tooltipProfile = "GuiToolTipProfile"; + groupNum = "1"; + class = "SystemMenuButton"; }; }; }; diff --git a/Templates/BaseGame/game/data/UI/guis/SystemMenu.tscript b/Templates/BaseGame/game/data/UI/guis/SystemMenu.tscript index 2b6b8ed27..1974b2d0f 100644 --- a/Templates/BaseGame/game/data/UI/guis/SystemMenu.tscript +++ b/Templates/BaseGame/game/data/UI/guis/SystemMenu.tscript @@ -2,6 +2,8 @@ function SystemMenu::onWake(%this) { $MenuList = SystemMenuButtonList; $MenuList.listPosition = 0; + + $MenuList.syncGui(); } function SystemMenu::onSleep(%this) @@ -19,10 +21,14 @@ function systemMenuExitToDesktop() MessageBoxOKCancel("Exit?", "Do you wish to exit to the desktop?", "quit();", ""); } +function SystemMenuButton::onHighlighted(%this, %highlighted) +{ + if(%highlighted) + $MenuList.listPosition = $MenuList.getObjectIndex(%this); +} + function SystemMenuButtonList::syncGUI(%this) { - %this.callOnChildren("setHighlighted", false); - %btn = %this.getObject(%this.listPosition); %btn.setHighlighted(true); diff --git a/Templates/BaseGame/game/data/UI/guis/joinServerMenu.gui b/Templates/BaseGame/game/data/UI/guis/joinServerMenu.gui index 30b6a8d04..f307a6e93 100644 --- a/Templates/BaseGame/game/data/UI/guis/joinServerMenu.gui +++ b/Templates/BaseGame/game/data/UI/guis/joinServerMenu.gui @@ -7,7 +7,7 @@ $guiContent = new GuiControl(JoinServerMenu) { tooltipProfile = "GuiToolTipProfile"; isContainer = "1"; canSaveDynamicFields = "1"; - + new GuiInputCtrl(JoinServerInputHandler) { ignoreMouseEvents = "1"; ActionMap = "JoinServerActionMap"; @@ -18,7 +18,6 @@ $guiContent = new GuiControl(JoinServerMenu) { profile = "GuiInputCtrlProfile"; tooltipProfile = "GuiToolTipProfile"; }; - new GuiPanel(JoinServerTitlePanel) { extent = "1281 60"; horizSizing = "width"; @@ -34,23 +33,45 @@ $guiContent = new GuiControl(JoinServerMenu) { }; }; new GuiContainer() { - position = "203 61"; + position = "190 61"; extent = "900 30"; - profile = GuiMenuPanelProfile; - tooltipProfile = "GuiToolTipProfile"; horizSizing = "center"; - vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + + new GuiTextCtrl() { + text = "Player Name"; + position = "0 5"; + extent = "98 23"; + vertSizing = "center"; + profile = "MenuMLSubHeaderText"; + tooltipProfile = "GuiToolTipProfile"; + }; + new GuiTextEditCtrl(JoinServerPlayerNameTxt) { + text = "Visitor"; + position = "606 7"; + extent = "295 18"; + horizSizing = "left"; + vertSizing = "center"; + profile = "MenuTextEditprofile"; + variable = "$pref::Player::Name"; + tooltipProfile = "GuiToolTipProfile"; + }; + }; + new GuiContainer() { + position = "190 97"; + extent = "900 30"; + horizSizing = "center"; + profile = "GuiMenuPanelProfile"; + tooltipProfile = "GuiToolTipProfile"; new GuiTextCtrl() { text = "Server Details"; - position = "0 0"; extent = "700 30"; - horizSizing = "right"; vertSizing = "center"; profile = "MenuSubHeaderText"; tooltipProfile = "GuiToolTipProfile"; }; - new GuiTextCtrl() { text = "Ping"; position = "700 0"; @@ -60,7 +81,6 @@ $guiContent = new GuiControl(JoinServerMenu) { profile = "MenuSubHeaderCenteredText"; tooltipProfile = "GuiToolTipProfile"; }; - new GuiTextCtrl() { text = "Player Count"; position = "770 0"; @@ -70,12 +90,12 @@ $guiContent = new GuiControl(JoinServerMenu) { profile = "MenuSubHeaderCenteredText"; tooltipProfile = "GuiToolTipProfile"; }; - }; + }; new GuiScrollCtrl() { hScrollBar = "alwaysOff"; vScrollBar = "dynamic"; - position = "203 91"; - extent = "900 621"; + position = "190 127"; + extent = "900 551"; minExtent = "8 8"; horizSizing = "center"; vertSizing = "height"; @@ -102,7 +122,7 @@ $guiContent = new GuiControl(JoinServerMenu) { tooltipProfile = "GuiToolTipProfile"; new GuiIconButtonCtrl(JoinServerJoinBtn) { - BitmapAsset = "UI:Keyboard_Black_Return_image"; + BitmapAsset = "UI:Keyboard_Black_Space_image"; sizeIconToButton = "1"; makeIconSquare = "1"; textLocation = "Center"; @@ -112,11 +132,12 @@ $guiContent = new GuiControl(JoinServerMenu) { horizSizing = "left"; vertSizing = "center"; profile = "GuiMenuButtonProfile"; + active = "0"; command = "JoinServerMenu.join();"; tooltipProfile = "GuiToolTipProfile"; }; new GuiIconButtonCtrl(JoinServerQLanBtn) { - BitmapAsset = "UI:Keyboard_Black_Escape_image"; + BitmapAsset = "UI:Keyboard_Black_E_image"; sizeIconToButton = "1"; makeIconSquare = "1"; textLocation = "Center"; @@ -130,7 +151,7 @@ $guiContent = new GuiControl(JoinServerMenu) { tooltipProfile = "GuiToolTipProfile"; }; new GuiIconButtonCtrl(JoinServerQServerBtn) { - BitmapAsset = "UI:Keyboard_Black_Escape_image"; + BitmapAsset = "UI:Keyboard_Black_Q_image"; sizeIconToButton = "1"; makeIconSquare = "1"; textLocation = "Center"; @@ -140,7 +161,7 @@ $guiContent = new GuiControl(JoinServerMenu) { horizSizing = "left"; vertSizing = "center"; profile = "GuiMenuButtonProfile"; - command = "JoinServerMenu.join();"; + command = "JoinServerMenu.query();"; tooltipProfile = "GuiToolTipProfile"; }; new GuiIconButtonCtrl(JoinServerBackBtn) { diff --git a/Templates/BaseGame/game/data/UI/guis/messageBoxDlg.tscript b/Templates/BaseGame/game/data/UI/guis/messageBoxDlg.tscript index 53133de0e..322b81082 100644 --- a/Templates/BaseGame/game/data/UI/guis/messageBoxDlg.tscript +++ b/Templates/BaseGame/game/data/UI/guis/messageBoxDlg.tscript @@ -157,7 +157,7 @@ function MessageBoxOK(%title, %message, %callback) Canvas.pushDialog(MessageBoxDlg); MessageBoxTitleText.text = %title; - %okButton = MessageBoxCtrl.createButton("OK", "messageBoxYesClicked();"); + %okButton = MessageBoxCtrl.createButton("OK", "messageBoxYesClicked(1);"); %bitmapAssetId = MessageBoxActionMap.getCommandButtonBitmap(Canvas.getLastInputDevice(), "messageBoxYesClicked"); %okButton.setBitmap(%bitmapAssetId); @@ -182,11 +182,11 @@ function MessageBoxOKCancel(%title, %message, %callback, %cancelCallback, %okLab else %cancelLabel = %cancelLabelOverride; - %okButton = MessageBoxCtrl.createButton(%okLabel, "messageBoxYesClicked();"); + %okButton = MessageBoxCtrl.createButton(%okLabel, "messageBoxYesClicked(1);"); %bitmapAssetId = MessageBoxActionMap.getCommandButtonBitmap(Canvas.getLastInputDevice(), "messageBoxYesClicked"); %okButton.setBitmap(%bitmapAssetId); - %cancelButton = MessageBoxCtrl.createButton(%cancelLabel, "messageBoxNoClicked();"); + %cancelButton = MessageBoxCtrl.createButton(%cancelLabel, "messageBoxNoClicked(1);"); %bitmapAssetId = MessageBoxActionMap.getCommandButtonBitmap(Canvas.getLastInputDevice(), "messageBoxNoClicked"); %cancelButton.setBitmap(%bitmapAssetId); diff --git a/Templates/BaseGame/game/data/UI/scripts/profiles.tscript b/Templates/BaseGame/game/data/UI/scripts/profiles.tscript index 60c7f4bf7..9b9b1490c 100644 --- a/Templates/BaseGame/game/data/UI/scripts/profiles.tscript +++ b/Templates/BaseGame/game/data/UI/scripts/profiles.tscript @@ -200,4 +200,30 @@ singleton GuiControlProfile(GuiMenuScrollProfile) bitmapAsset = "UI:scrollBar_image"; hasBitmapArray = true; category = "BaseUI"; -}; \ No newline at end of file +}; + +new GuiControlProfile(MenuTextEditprofile) +{ + opaque = true; + fillColor = "10 10 10 255"; + fillColorHL = "10 10 10 255"; + fontColor = "240 240 240"; + fontColorHL = "10 10 10 255"; + fontColorSEL = "255 255 255 255"; + fontColorNA = "200 200 200"; + textOffset = "4 2"; + autoSizeWidth = false; + autoSizeHeight = true; + justify = "left"; + tab = true; + canKeyFocus = true; + category = "BaseUI"; + borderColorSEL = "0 0 0 0"; + fontColors[0] = "240 240 240 255"; + fontColors[1] = "10 10 10 255"; + fontColors[2] = "200 200 200 255"; + fontColors[3] = "255 255 255 255"; + fillColorSEL = "10 10 10 255"; + fontSize = "18"; + cursorColor = "255 255 255 255"; +}; diff --git a/Templates/BaseGame/game/data/UI/scripts/utility.tscript b/Templates/BaseGame/game/data/UI/scripts/utility.tscript index a3d596088..e5eeac2de 100644 --- a/Templates/BaseGame/game/data/UI/scripts/utility.tscript +++ b/Templates/BaseGame/game/data/UI/scripts/utility.tscript @@ -113,6 +113,9 @@ function getButtonBitmap(%device, %button) } else if(%device $= "Keyboard" || %device $= "Mouse") { + if(%button $= "lshift" || %button $= "rshift") + %button = "shift"; + %assetId = "UI:Keyboard_Black_" @ %button @ "_image"; } else if(%device !$= "")