From: beck-thompson <107373427+beck-thompson@users.noreply.github.com> Date: Sat, 25 Oct 2025 17:32:07 +0000 (-0700) Subject: Fix the pin texture not rendering (#41093) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=27af3ab934dca09deacda02596976d8de376f2ab;p=space-station-14.git Fix the pin texture not rendering (#41093) --- diff --git a/Content.Client/Administration/UI/CustomControls/PlayerListEntry.xaml.cs b/Content.Client/Administration/UI/CustomControls/PlayerListEntry.xaml.cs index cd6a56ea71..cf2e776ea8 100644 --- a/Content.Client/Administration/UI/CustomControls/PlayerListEntry.xaml.cs +++ b/Content.Client/Administration/UI/CustomControls/PlayerListEntry.xaml.cs @@ -11,6 +11,9 @@ namespace Content.Client.Administration.UI.CustomControls; [GenerateTypedNameReferences] public sealed partial class PlayerListEntry : BoxContainer { + private readonly ResPath _pinnedResPath = new("/Textures/Interface/Bwoink/pinned.png"); + private readonly ResPath _unPinnedResPath = new("/Textures/Interface/Bwoink/un_pinned.png"); + public PlayerListEntry() { RobustXamlLoader.Load(this); @@ -44,15 +47,6 @@ public sealed partial class PlayerListEntry : BoxContainer private void UpdatePinButtonTexture(bool isPinned) { - if (isPinned) - { - PlayerEntryPinButton?.RemoveStyleClass(StyleNano.StyleClassPinButtonUnpinned); - PlayerEntryPinButton?.AddStyleClass(StyleNano.StyleClassPinButtonPinned); - } - else - { - PlayerEntryPinButton?.RemoveStyleClass(StyleNano.StyleClassPinButtonPinned); - PlayerEntryPinButton?.AddStyleClass(StyleNano.StyleClassPinButtonUnpinned); - } + PlayerEntryPinButton.TexturePath = isPinned ? _pinnedResPath.CanonPath : _unPinnedResPath.CanonPath; } } diff --git a/Content.Client/Stylesheets/StyleNano.cs b/Content.Client/Stylesheets/StyleNano.cs index b1c20d1814..5c8e863194 100644 --- a/Content.Client/Stylesheets/StyleNano.cs +++ b/Content.Client/Stylesheets/StyleNano.cs @@ -159,10 +159,6 @@ namespace Content.Client.Stylesheets public static readonly Color ChatBackgroundColor = Color.FromHex("#25252ADD"); - //Bwoink - public const string StyleClassPinButtonPinned = "pinButtonPinned"; - public const string StyleClassPinButtonUnpinned = "pinButtonUnpinned"; - // i'm not sure what the missing symbols were referencing, and this is getting obseleted anyway so: public const string ButtonOpenRight = "OpenRight"; public const string ButtonOpenLeft = "OpenLeft"; @@ -1768,21 +1764,6 @@ namespace Content.Client.Stylesheets // Silicon law edit ui Element