2024-10-29 12:18:35 +03:00
|
|
|
using Content.Shared._CP14.Cargo;
|
2024-10-15 15:22:06 +03:00
|
|
|
using Robust.Client.AutoGenerated;
|
|
|
|
|
using Robust.Client.GameObjects;
|
|
|
|
|
using Robust.Client.UserInterface;
|
|
|
|
|
using Robust.Client.UserInterface.XAML;
|
|
|
|
|
using Robust.Shared.Utility;
|
|
|
|
|
|
|
|
|
|
namespace Content.Client._CP14.TravelingStoreShip;
|
|
|
|
|
|
|
|
|
|
[GenerateTypedNameReferences]
|
|
|
|
|
public sealed partial class CP14StoreProductControl : Control
|
|
|
|
|
{
|
|
|
|
|
[Dependency] private readonly IEntityManager _entity = default!;
|
|
|
|
|
|
|
|
|
|
private readonly SpriteSystem _sprite;
|
|
|
|
|
|
|
|
|
|
public CP14StoreProductControl(CP14StoreUiProductEntry entry)
|
|
|
|
|
{
|
|
|
|
|
RobustXamlLoader.Load(this);
|
|
|
|
|
IoCManager.InjectDependencies(this);
|
|
|
|
|
|
|
|
|
|
_sprite = _entity.System<SpriteSystem>();
|
|
|
|
|
|
|
|
|
|
PriceHolder.RemoveAllChildren();
|
2025-01-19 00:09:30 +03:00
|
|
|
PriceHolder.AddChild(new CP14PriceControl(entry.Price));
|
|
|
|
|
ProductName.Text = $"[bold]{entry.Name}[/bold]";
|
2024-10-15 15:22:06 +03:00
|
|
|
|
2025-01-19 00:09:30 +03:00
|
|
|
SpecialLabel.Visible = entry.Special;
|
|
|
|
|
View.Texture = _sprite.Frame0(entry.Icon);
|
2024-10-15 15:22:06 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void UpdateView(SpriteSpecifier spriteSpecifier)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|