24 lines
700 B
C#
24 lines
700 B
C#
|
|
using Content.Shared.FixedPoint;
|
||
|
|
using Robust.Client.AutoGenerated;
|
||
|
|
using Robust.Client.Graphics;
|
||
|
|
using Robust.Client.UserInterface;
|
||
|
|
using Robust.Client.UserInterface.XAML;
|
||
|
|
|
||
|
|
namespace Content.Client._CP14.Trading;
|
||
|
|
|
||
|
|
[GenerateTypedNameReferences]
|
||
|
|
public sealed partial class CP14TradingFactionButtonControl : Control
|
||
|
|
{
|
||
|
|
public event Action? OnPressed;
|
||
|
|
|
||
|
|
public CP14TradingFactionButtonControl(Color color, string label, FixedPoint2 reputation)
|
||
|
|
{
|
||
|
|
RobustXamlLoader.Load(this);
|
||
|
|
|
||
|
|
ColorPanel.PanelOverride = new StyleBoxFlat { BackgroundColor = color };
|
||
|
|
SkillTreeLabel.Text = $"{reputation} {label}";
|
||
|
|
|
||
|
|
MainButton.OnPressed += args => OnPressed?.Invoke();
|
||
|
|
}
|
||
|
|
}
|