Skip to content

Commit

Permalink
Fix BtnSaveLoadGameOptions button naming (#534)
Browse files Browse the repository at this point in the history
* Fix BtnSaveLoadGameOptions button naming

This button is like a black sheep in the client configuration files. All buttons in the config files have `btn` in lower case, for example `btnLaunchGame`, but `BtnSaveLoadGameOptions` is an exception to this rule. It was a typo, I suppose.

* Fix BtnSaveLoadGameOptions name in MultiplayerGameLobby.cs
  • Loading branch information
MahBoiDeveloper authored Apr 24, 2024
1 parent d1682f1 commit 260ec47
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions DXMainClient/DXGUI/Multiplayer/GameLobby/GameLobbyBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ protected GameModeMap GameModeMap
protected bool RemoveStartingLocations { get; set; } = false;
protected IniFile GameOptionsIni { get; private set; }

protected XNAClientButton BtnSaveLoadGameOptions { get; set; }
protected XNAClientButton btnSaveLoadGameOptions { get; set; }

private XNAContextMenu loadSaveGameOptionsMenu { get; set; }

Expand Down Expand Up @@ -309,9 +309,9 @@ private void InitBtnMapSort()

private void InitializeGameOptionPresetUI()
{
BtnSaveLoadGameOptions = FindChild<XNAClientButton>(nameof(BtnSaveLoadGameOptions), true);
btnSaveLoadGameOptions = FindChild<XNAClientButton>(nameof(btnSaveLoadGameOptions), true);

if (BtnSaveLoadGameOptions != null)
if (btnSaveLoadGameOptions != null)
{
loadOrSaveGameOptionPresetWindow = new LoadOrSaveGameOptionPresetWindow(WindowManager);
loadOrSaveGameOptionPresetWindow.Name = nameof(loadOrSaveGameOptionPresetWindow);
Expand All @@ -335,7 +335,7 @@ private void InitializeGameOptionPresetUI()
loadSaveGameOptionsMenu.Items.Add(loadConfigMenuItem);
loadSaveGameOptionsMenu.Items.Add(saveConfigMenuItem);

BtnSaveLoadGameOptions.LeftClick += (sender, args) =>
btnSaveLoadGameOptions.LeftClick += (sender, args) =>
loadSaveGameOptionsMenu.Open(GetCursorPoint());

AddChild(loadSaveGameOptionsMenu);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ protected void Refresh(bool isHost)
if (IsHost)
{
ShowMapList();
BtnSaveLoadGameOptions?.Enable();
btnSaveLoadGameOptions?.Enable();

btnLockGame.Text = "Lock Game".L10N("Client:Main:ButtonLockGame");
btnLockGame.Enabled = true;
Expand All @@ -640,7 +640,7 @@ protected void Refresh(bool isHost)
else
{
HideMapList();
BtnSaveLoadGameOptions?.Disable();
btnSaveLoadGameOptions?.Disable();

btnLockGame.Enabled = false;
btnLockGame.Visible = false;
Expand Down

0 comments on commit 260ec47

Please sign in to comment.