Remove usages of obsolete SpriteView.Sprite.set() (#19500)
This commit is contained in:
@@ -113,26 +113,26 @@ namespace Content.Client.Storage.UI
|
||||
|| !_entityManager.EntityExists(entity))
|
||||
return;
|
||||
|
||||
_entityManager.TryGetComponent(entity, out SpriteComponent? sprite);
|
||||
_entityManager.TryGetComponent(entity, out ItemComponent? item);
|
||||
_entityManager.TryGetComponent(entity, out StackComponent? stack);
|
||||
var count = stack?.Count ?? 1;
|
||||
var size = item?.Size;
|
||||
|
||||
var spriteView = new SpriteView
|
||||
{
|
||||
HorizontalAlignment = HAlignment.Left,
|
||||
VerticalAlignment = VAlignment.Center,
|
||||
SetSize = new Vector2(32.0f, 32.0f),
|
||||
OverrideDirection = Direction.South,
|
||||
};
|
||||
spriteView.SetEntity(entity);
|
||||
button.AddChild(new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Horizontal,
|
||||
SeparationOverride = 2,
|
||||
Children =
|
||||
{
|
||||
new SpriteView
|
||||
{
|
||||
HorizontalAlignment = HAlignment.Left,
|
||||
VerticalAlignment = VAlignment.Center,
|
||||
SetSize = new Vector2(32.0f, 32.0f),
|
||||
OverrideDirection = Direction.South,
|
||||
Sprite = sprite
|
||||
},
|
||||
spriteView,
|
||||
new Label
|
||||
{
|
||||
HorizontalExpand = true,
|
||||
|
||||
Reference in New Issue
Block a user