From cf7ce465a1139edf1b941391f11c846295f4c57c Mon Sep 17 00:00:00 2001 From: Vigers Ray Date: Fri, 1 Nov 2024 00:47:14 +0300 Subject: [PATCH] =?UTF-8?q?=D1=84=D0=B8=D0=BA=D1=81=20=D0=BD=D0=B0=D0=B7?= =?UTF-8?q?=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F=20=D1=81=D0=B5=D1=80=D0=B2=D0=B5?= =?UTF-8?q?=D1=80=D0=B0=20=D0=B2=20=D0=BB=D0=BE=D0=B1=D0=B1=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Content.Client/Lobby/UI/LobbyGui.xaml.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Content.Client/Lobby/UI/LobbyGui.xaml.cs b/Content.Client/Lobby/UI/LobbyGui.xaml.cs index 196ba7aacba..b3002fc54ab 100644 --- a/Content.Client/Lobby/UI/LobbyGui.xaml.cs +++ b/Content.Client/Lobby/UI/LobbyGui.xaml.cs @@ -30,6 +30,7 @@ public sealed partial class LobbyGui : UIScreen public string LobbyParallax = "FastSpace"; // Sunrise-edit public bool ShowParallax; // Sunrise-edit + private string _serverName = string.Empty; [ViewVariables(VVAccess.ReadWrite)] public Vector2 Offset { get; set; } // Sunrise-edit public const string DefaultIconExpanded = "/Textures/Interface/Nano/inverted_triangle.svg.png"; public const string DefaultIconCollapsed = "/Textures/Interface/Nano/top_triangle.svg.png"; @@ -131,18 +132,25 @@ public LobbyGui() _configurationManager.OnValueChanged(SunriseCCVars.LobbyOpacity, OnLobbyOpacityChanged); _configurationManager.OnValueChanged(SunriseCCVars.ServersHubEnable, OnServersHubEnableChanged); + _configurationManager.OnValueChanged(SunriseCCVars.InfoLinksDonate, OnServerNameChanged, true); SetLobbyOpacity(_configurationManager.GetCVar(SunriseCCVars.LobbyOpacity)); SetServersHubEnable(_configurationManager.GetCVar(SunriseCCVars.ServersHubEnable)); Chat.SetChatOpacity(); - ServerName.Text = Loc.GetString("ui-lobby-welcome", ("name", _configurationManager.GetCVar(SunriseCCVars.ServerName))); + ServerName.Text = Loc.GetString("ui-lobby-welcome", ("name", _serverName)); LoadIcons(); // Sunrise-end } // Sunrise-Start + private void OnServerNameChanged(string serverName) + { + ServerName.Text = Loc.GetString("ui-lobby-welcome", ("name", serverName)); + _serverName = serverName; + } + private void LoadIcons() { if (!TryGetStyleProperty(StylePropertyIconExpanded, out IconExpanded))