EntityPrototypeView my beloved
Co-authored-by: plykiya <plykiya@protonmail.com>
-using System.Linq;
+using System.Linq;
using System.Numerics;
using Content.Client.Clothing.Systems;
using Content.Client.Stylesheets;
};
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);
}
}