23 lines
614 B
C#
23 lines
614 B
C#
|
|
using Robust.Client.AutoGenerated;
|
||
|
|
using Robust.Client.Graphics;
|
||
|
|
using Robust.Client.UserInterface;
|
||
|
|
using Robust.Client.UserInterface.XAML;
|
||
|
|
|
||
|
|
namespace Content.Client._CP14.Skill.Ui;
|
||
|
|
|
||
|
|
[GenerateTypedNameReferences]
|
||
|
|
public sealed partial class CP14SkillTreeButtonControl : Control
|
||
|
|
{
|
||
|
|
public event Action? OnPressed;
|
||
|
|
|
||
|
|
public CP14SkillTreeButtonControl(Color color, string label)
|
||
|
|
{
|
||
|
|
RobustXamlLoader.Load(this);
|
||
|
|
|
||
|
|
ColorPanel.PanelOverride = new StyleBoxFlat { BackgroundColor = color };
|
||
|
|
SkillTreeLabel.Text = label;
|
||
|
|
|
||
|
|
MainButton.OnPressed += args => OnPressed?.Invoke();
|
||
|
|
}
|
||
|
|
}
|