From 482235dbfd4700fd8c52ea8889dc705bb7d61e6a Mon Sep 17 00:00:00 2001 From: beck-thompson <107373427+beck-thompson@users.noreply.github.com> Date: Sat, 25 Oct 2025 10:32:07 -0700 Subject: [PATCH] Fix the pin texture not rendering (#41093) --- .../UI/CustomControls/PlayerListEntry.xaml.cs | 14 ++++---------- Content.Client/Stylesheets/StyleNano.cs | 19 ------------------- 2 files changed, 4 insertions(+), 29 deletions(-) diff --git a/Content.Client/Administration/UI/CustomControls/PlayerListEntry.xaml.cs b/Content.Client/Administration/UI/CustomControls/PlayerListEntry.xaml.cs index f62a6c71e4..ffc886464d 100644 --- a/Content.Client/Administration/UI/CustomControls/PlayerListEntry.xaml.cs +++ b/Content.Client/Administration/UI/CustomControls/PlayerListEntry.xaml.cs @@ -9,6 +9,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); @@ -42,15 +45,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 42a03cc835..1034a21803 100644 --- a/Content.Client/Stylesheets/StyleNano.cs +++ b/Content.Client/Stylesheets/StyleNano.cs @@ -188,10 +188,6 @@ namespace Content.Client.Stylesheets public static readonly Color ServiceColorHovered = Color.FromHex("#667A76"); // End DeltaV - //Bwoink - public const string StyleClassPinButtonPinned = "pinButtonPinned"; - public const string StyleClassPinButtonUnpinned = "pinButtonUnpinned"; - public const string StyleClassCrewManifestGender = "CrewManifestGender"; //Delta-V - Manifest pronouns // i'm not sure what the missing symbols were referencing, and this is getting obseleted anyway so: @@ -1959,21 +1955,6 @@ namespace Content.Client.Stylesheets // Silicon law edit ui Element