22 lines
653 B
C#
22 lines
653 B
C#
using Robust.Client.AutoGenerated;
|
|
using Robust.Client.Graphics;
|
|
using Robust.Client.UserInterface;
|
|
using Robust.Client.UserInterface.XAML;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Client._White.Cult.UI.Altar;
|
|
|
|
[GenerateTypedNameReferences]
|
|
public partial class AltarListingControl : Control
|
|
{
|
|
public AltarListingControl(EntityPrototype prototype, Texture icon, Action<string>? clickAction)
|
|
{
|
|
RobustXamlLoader.Load(this);
|
|
|
|
ToolTip = $"{prototype.Name}\n{prototype.Description}";
|
|
|
|
BuyListingButton.TextureNormal = icon;
|
|
BuyListingButton.OnButtonDown += _ => clickAction?.Invoke(prototype.ID);
|
|
}
|
|
}
|