]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fixes Chameleon menu icons appearing incorrectly (#29539)
authorPlykiya <58439124+Plykiya@users.noreply.github.com>
Fri, 28 Jun 2024 21:21:36 +0000 (14:21 -0700)
committerGitHub <noreply@github.com>
Fri, 28 Jun 2024 21:21:36 +0000 (17:21 -0400)
EntityPrototypeView my beloved

Co-authored-by: plykiya <plykiya@protonmail.com>
Content.Client/Clothing/UI/ChameleonMenu.xaml.cs

index 131ee3b1e9027c76043f4c787ba432f166d6ea0e..4532484d8a3b5cea4f6aa8d6942bda1bfcd5a62d 100644 (file)
@@ -1,4 +1,4 @@
-using System.Linq;
+using System.Linq;
 using System.Numerics;
 using Content.Client.Clothing.Systems;
 using Content.Client.Stylesheets;
@@ -74,13 +74,9 @@ public sealed partial class ChameleonMenu : DefaultWindow
             };
             button.OnPressed += _ => OnIdSelected?.Invoke(id);
             Grid.AddChild(button);
-
-            var texture = _sprite.GetPrototypeIcon(proto);
-            button.AddChild(new TextureRect
-            {
-                Stretch = TextureRect.StretchMode.KeepAspectCentered,
-                Texture = texture.Default
-            });
+            var entityPrototypeView = new EntityPrototypeView();
+            entityPrototypeView.SetPrototype(proto);
+            button.AddChild(entityPrototypeView);
         }
     }