- 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) {
text = "SINGLE PLAYER";
position = "22 23";
extent = "220 28";
extent = "1281 28";
profile = "MenuHeaderText";
tooltipProfile = "GuiToolTipProfile";
};

View file

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

View file

@ -64,7 +64,7 @@ function BaseUIStickNavigate(%val)
function BaseUIBackOut(%val)
{
//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();
%topMenu = Canvas.getObject(Canvas.getCount()-1);

View file

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

View file

@ -623,7 +623,7 @@ function tryCloseOptionsMenu(%val)
}
else
{
Canvas.popDialog(OptionsMenu);
BaseUIBackOut(1);
}
}
@ -642,7 +642,7 @@ function OptionsMenu::applyChangedOptions(%this)
%prefPath = getPrefpath();
export("$pref::*", %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension, false);
Canvas.popDialog(OptionsMenu);
BaseUIBackOut(1);
if($optionsChangeRequiresRestart)
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";
fillColorHL = "0 0 0 255";
modal = false;
};
singleton GuiControlProfile(GuiMenuScrollProfile)

View file

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