Agent ID Cards (#7041)
This commit is contained in:
32
Content.Client/Access/UI/AgentIDCardWindow.xaml.cs
Normal file
32
Content.Client/Access/UI/AgentIDCardWindow.xaml.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using Robust.Client.UserInterface.CustomControls;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
|
||||
namespace Content.Client.Access.UI
|
||||
{
|
||||
[GenerateTypedNameReferences]
|
||||
public sealed partial class AgentIDCardWindow : DefaultWindow
|
||||
{
|
||||
public event Action<string>? OnNameEntered;
|
||||
|
||||
public event Action<string>? OnJobEntered;
|
||||
|
||||
public AgentIDCardWindow()
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
|
||||
NameLineEdit.OnTextEntered += e => OnNameEntered?.Invoke(e.Text);
|
||||
JobLineEdit.OnTextEntered += e => OnJobEntered?.Invoke(e.Text);
|
||||
}
|
||||
|
||||
public void SetCurrentName(string name)
|
||||
{
|
||||
NameLineEdit.Text = name;
|
||||
}
|
||||
|
||||
public void SetCurrentJob(string job)
|
||||
{
|
||||
JobLineEdit.Text = job;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user