From 260ec47d147369f1dda36d1bf41ec723e85cd58a Mon Sep 17 00:00:00 2001 From: mah_boi <61310813+MahBoiDeveloper@users.noreply.github.com> Date: Thu, 25 Apr 2024 00:00:10 +0300 Subject: [PATCH] Fix `BtnSaveLoadGameOptions` button naming (#534) * 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 --- DXMainClient/DXGUI/Multiplayer/GameLobby/GameLobbyBase.cs | 8 ++++---- .../DXGUI/Multiplayer/GameLobby/MultiplayerGameLobby.cs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/DXMainClient/DXGUI/Multiplayer/GameLobby/GameLobbyBase.cs b/DXMainClient/DXGUI/Multiplayer/GameLobby/GameLobbyBase.cs index ecd568d4a..b397ed24f 100644 --- a/DXMainClient/DXGUI/Multiplayer/GameLobby/GameLobbyBase.cs +++ b/DXMainClient/DXGUI/Multiplayer/GameLobby/GameLobbyBase.cs @@ -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; } @@ -309,9 +309,9 @@ private void InitBtnMapSort() private void InitializeGameOptionPresetUI() { - BtnSaveLoadGameOptions = FindChild(nameof(BtnSaveLoadGameOptions), true); + btnSaveLoadGameOptions = FindChild(nameof(btnSaveLoadGameOptions), true); - if (BtnSaveLoadGameOptions != null) + if (btnSaveLoadGameOptions != null) { loadOrSaveGameOptionPresetWindow = new LoadOrSaveGameOptionPresetWindow(WindowManager); loadOrSaveGameOptionPresetWindow.Name = nameof(loadOrSaveGameOptionPresetWindow); @@ -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); diff --git a/DXMainClient/DXGUI/Multiplayer/GameLobby/MultiplayerGameLobby.cs b/DXMainClient/DXGUI/Multiplayer/GameLobby/MultiplayerGameLobby.cs index 4b9a44063..cd0b6b8a7 100644 --- a/DXMainClient/DXGUI/Multiplayer/GameLobby/MultiplayerGameLobby.cs +++ b/DXMainClient/DXGUI/Multiplayer/GameLobby/MultiplayerGameLobby.cs @@ -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; @@ -640,7 +640,7 @@ protected void Refresh(bool isHost) else { HideMapList(); - BtnSaveLoadGameOptions?.Disable(); + btnSaveLoadGameOptions?.Disable(); btnLockGame.Enabled = false; btnLockGame.Visible = false;