39 lines
906 B
C#
39 lines
906 B
C#
using Robust.Client.AutoGenerated;
|
|
using Robust.Client.UserInterface;
|
|
using Robust.Client.UserInterface.Controls;
|
|
using Robust.Client.UserInterface.XAML;
|
|
|
|
namespace Content.Client._DV.UserInterfaces.BuildInfo.Controls;
|
|
|
|
[GenerateTypedNameReferences]
|
|
public sealed partial class BuildInfoRow : BoxContainer
|
|
{
|
|
[Dependency] private readonly IClipboardManager _clipboard = default!;
|
|
|
|
public string? LabelText
|
|
{
|
|
get => Label.Text;
|
|
set => Label.Text = value;
|
|
}
|
|
|
|
public string? ValueText
|
|
{
|
|
get => Value.Text;
|
|
set => Value.Text = value;
|
|
}
|
|
|
|
private void CopyValue(BaseButton.ButtonEventArgs args)
|
|
{
|
|
if (ValueText is { } value)
|
|
_clipboard.SetText(value);
|
|
}
|
|
|
|
public BuildInfoRow()
|
|
{
|
|
IoCManager.InjectDependencies(this);
|
|
RobustXamlLoader.Load(this);
|
|
|
|
CopyButton.OnPressed += CopyValue;
|
|
}
|
|
}
|