From 2f40296bb344212f05c3dbbefd24cbbdc7af3b10 Mon Sep 17 00:00:00 2001 From: RedFlames Date: Sun, 25 Aug 2024 03:44:26 +0200 Subject: [PATCH] Show ExtraServers on Release builds as well if any are added. Only show 'Reload Extra Servers' button then as well, so initially you'd have to add some by config editing. --- CelesteNet.Client/CelesteNetClientSettings.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/CelesteNet.Client/CelesteNetClientSettings.cs b/CelesteNet.Client/CelesteNetClientSettings.cs index e38b9a41..542a013a 100644 --- a/CelesteNet.Client/CelesteNetClientSettings.cs +++ b/CelesteNet.Client/CelesteNetClientSettings.cs @@ -78,10 +78,13 @@ public bool Connected { public bool ConnectDefaultVisible { get => _ConnectDefaultVisible; set { - _ConnectDefaultVisible = value; - if (ConnectDefaultButton != null) ConnectDefaultButton.Visible = value; + + if (_ConnectDefaultVisible != value && ConnectDefaultButtonHint != null) + ConnectDefaultButtonHint.FadeVisible = value; + + _ConnectDefaultVisible = value; } } @@ -925,7 +928,6 @@ public void CreateEmotesEntry(TextMenu menu, bool inGame) { } public void CreateExtraServersEntry(TextMenu menu, bool inGame) { -#if DEBUG int selected = 0; for (int i = 0; i < ExtraServers.Length; i++) if (ExtraServers[i] == Server) @@ -962,6 +964,8 @@ public void CreateExtraServersEntry(TextMenu menu, bool inGame) { ExtraServersEntry.Visible = ExtraServers.Length > 0; }); item.AddDescription(menu, "modoptions_celestenetclient_reloadhint".DialogClean()); +#if !DEBUG + item.Visible = ExtraServers.Length > 0; #endif } @@ -1039,7 +1043,7 @@ public void CreateConnectDefaultButtonEntry(TextMenu menu, bool inGame) { ConnectDefaultButton.Visible = ConnectDefaultVisible; } - #endregion +#endregion public static ulong GenerateClientID() { return ulong.Parse(Guid.NewGuid().ToString().Replace("-", "").Substring(0, 16), System.Globalization.NumberStyles.HexNumber);