Skip to content

Commit

Permalink
Show ExtraServers on Release builds as well if any are added. Only sh…
Browse files Browse the repository at this point in the history
…ow 'Reload Extra Servers' button then as well, so initially you'd have to add some by config editing.
  • Loading branch information
RedFlames committed Aug 25, 2024
1 parent 456efdf commit 2f40296
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions CelesteNet.Client/CelesteNetClientSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 2f40296

Please sign in to comment.