- Fixed Back on-screen menu button for OptionsMenu wasn't working

- Fixed MainMenu buttonlist not navigating with keybinds after going to optionsMenu and going back
- Fixed menu title text clipping
- Fixed keybind preview images on keybind lists in OptionsMenu being modal
- Fixed btn_l and btn_r bitmap button binding not working
- Fixed a/b and x/y button bitmaps on xbox controllers being flipped
This commit is contained in:
Areloch 2023-12-27 01:36:58 -06:00
parent 6e101595d6
commit 36d00e09d3
7 changed files with 28 additions and 19 deletions

View file

@ -31,7 +31,7 @@ $guiContent = new GuiControl(ChooseLevelMenu) {
new GuiTextCtrl(ChooseLevelTitleText) { new GuiTextCtrl(ChooseLevelTitleText) {
text = "SINGLE PLAYER"; text = "SINGLE PLAYER";
position = "22 23"; position = "22 23";
extent = "220 28"; extent = "1281 28";
profile = "MenuHeaderText"; profile = "MenuHeaderText";
tooltipProfile = "GuiToolTipProfile"; tooltipProfile = "GuiToolTipProfile";
}; };

View file

@ -28,7 +28,7 @@ $guiContent = new GuiControl(JoinServerMenu) {
new GuiTextCtrl() { new GuiTextCtrl() {
text = "JOIN SERVER"; text = "JOIN SERVER";
position = "22 23"; position = "22 23";
extent = "220 28"; extent = "1281 28";
profile = "MenuHeaderText"; profile = "MenuHeaderText";
tooltipProfile = "GuiToolTipProfile"; tooltipProfile = "GuiToolTipProfile";
}; };

View file

@ -64,7 +64,7 @@ function BaseUIStickNavigate(%val)
function BaseUIBackOut(%val) function BaseUIBackOut(%val)
{ {
//we can't navigate further back than the MainMenuGui //we can't navigate further back than the MainMenuGui
if(%val && Canvas.getObject(Canvas.getCount()-1) != MainMenuGui) if(%val && Canvas.getObject(Canvas.getCount()-1).getId() != MainMenuGui.getId())
{ {
Canvas.popDialog(); Canvas.popDialog();
%topMenu = Canvas.getObject(Canvas.getCount()-1); %topMenu = Canvas.getObject(Canvas.getCount()-1);

View file

@ -165,7 +165,7 @@ $guiContent = new GuiControl(OptionsMenu) {
new GuiTextCtrl() { new GuiTextCtrl() {
text = "OPTIONS"; text = "OPTIONS";
position = "22 23"; position = "22 23";
extent = "220 28"; extent = "1281 28";
profile = "MenuHeaderText"; profile = "MenuHeaderText";
tooltipProfile = "GuiToolTipProfile"; tooltipProfile = "GuiToolTipProfile";
}; };
@ -188,7 +188,7 @@ $guiContent = new GuiControl(OptionsMenu) {
extent = "140 40"; extent = "140 40";
vertSizing = "center"; vertSizing = "center";
profile = "GuiMenuButtonProfile"; profile = "GuiMenuButtonProfile";
command = "tryCloseOptionsMenu();"; command = "tryCloseOptionsMenu(1);";
tooltipProfile = "GuiToolTipProfile"; tooltipProfile = "GuiToolTipProfile";
class = "MenuInputButton"; class = "MenuInputButton";
}; };

View file

@ -623,7 +623,7 @@ function tryCloseOptionsMenu(%val)
} }
else else
{ {
Canvas.popDialog(OptionsMenu); BaseUIBackOut(1);
} }
} }
@ -642,7 +642,7 @@ function OptionsMenu::applyChangedOptions(%this)
%prefPath = getPrefpath(); %prefPath = getPrefpath();
export("$pref::*", %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension, false); export("$pref::*", %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension, false);
Canvas.popDialog(OptionsMenu); BaseUIBackOut(1);
if($optionsChangeRequiresRestart) if($optionsChangeRequiresRestart)
MessageBoxOK("Restart Required", "Some of your changes require the game to be restarted."); MessageBoxOK("Restart Required", "Some of your changes require the game to be restarted.");

View file

@ -187,6 +187,7 @@ singleton GuiControlProfile( GuiRemapActionMapButtonProfile : GuiMenuButtonProfi
{ {
fillColor = "18 18 18 255"; fillColor = "18 18 18 255";
fillColorHL = "0 0 0 255"; fillColorHL = "0 0 0 255";
modal = false;
}; };
singleton GuiControlProfile(GuiMenuScrollProfile) singleton GuiControlProfile(GuiMenuScrollProfile)

View file

@ -45,13 +45,13 @@ function getButtonBitmap(%device, %button)
%assetId = %assetId @ "Square"; %assetId = %assetId @ "Square";
else if(%button $= "Y" || %button $= "btn_y") else if(%button $= "Y" || %button $= "btn_y")
%assetId = %assetId @ "Triangle"; %assetId = %assetId @ "Triangle";
else if(%button $= "LB") else if(%button $= "LB" || %button $= "btn_l")
%assetId = %assetId @ "L1"; %assetId = %assetId @ "L1";
else if(%button $= "LT") else if(%button $= "LT" || %button $= "btn_lt")
%assetId = %assetId @ "L2"; %assetId = %assetId @ "L2";
else if(%button $= "RB") else if(%button $= "RB" || %button $= "btn_r")
%assetId = %assetId @ "R1"; %assetId = %assetId @ "R1";
else if(%button $= "RT") else if(%button $= "RT" || %button $= "btn_rt")
%assetId = %assetId @ "R2"; %assetId = %assetId @ "R2";
else if(%button $= "thumbrx" || %button $= "thumbry") else if(%button $= "thumbrx" || %button $= "thumbry")
%assetId = %assetId @ "Right_Stick"; %assetId = %assetId @ "Right_Stick";
@ -84,13 +84,13 @@ function getButtonBitmap(%device, %button)
%assetId = %assetId @ "Y"; %assetId = %assetId @ "Y";
else if(%button $= "Y" || %button $= "btn_y") else if(%button $= "Y" || %button $= "btn_y")
%assetId = %assetId @ "X"; %assetId = %assetId @ "X";
else if(%button $= "LB") else if(%button $= "LB" || %button $= "btn_l")
%assetId = %assetId @ "LB"; %assetId = %assetId @ "LB";
else if(%button $= "LT") else if(%button $= "LT" || %button $= "btn_lt")
%assetId = %assetId @ "LT"; %assetId = %assetId @ "LT";
else if(%button $= "RB") else if(%button $= "RB" || %button $= "btn_r")
%assetId = %assetId @ "RB"; %assetId = %assetId @ "RB";
else if(%button $= "RT") else if(%button $= "RT" || %button $= "btn_rt")
%assetId = %assetId @ "RT"; %assetId = %assetId @ "RT";
else if(%button $= "thumbrx" || %button $= "thumbry") else if(%button $= "thumbrx" || %button $= "thumbry")
%assetId = %assetId @ "Right_Stick"; %assetId = %assetId @ "Right_Stick";
@ -120,13 +120,21 @@ function getButtonBitmap(%device, %button)
%assetId = "UI:Xbox_"; %assetId = "UI:Xbox_";
if(%button $= "btn_a") if(%button $= "btn_a")
%assetId = %assetId @ "B";
else if(%button $= "btn_b")
%assetId = %assetId @ "A"; %assetId = %assetId @ "A";
else if(%button $= "btn_b")
%assetId = %assetId @ "B";
else if(%button $= "btn_x") else if(%button $= "btn_x")
%assetId = %assetId @ "Y";
else if(%button $= "btn_y")
%assetId = %assetId @ "X"; %assetId = %assetId @ "X";
else if(%button $= "btn_y")
%assetId = %assetId @ "Y";
else if(%button $= "LB" || %button $= "btn_l")
%assetId = %assetId @ "LB";
else if(%button $= "LT" || %button $= "btn_lt")
%assetId = %assetId @ "LT";
else if(%button $= "RB" || %button $= "btn_r")
%assetId = %assetId @ "RB";
else if(%button $= "RT" || %button $= "btn_rt")
%assetId = %assetId @ "RT";
else if(%button $= "thumbrx" || %button $= "thumbry") else if(%button $= "thumbrx" || %button $= "thumbry")
%assetId = %assetId @ "Right_Stick"; %assetId = %assetId @ "Right_Stick";
else if(%button $= "thumblx" || %button $= "thumbly") else if(%button $= "thumblx" || %button $= "thumbly")