Disposals UI to XAML (#4623)
* DisposalUnitWindow to XAML * DisposalTaggerWindow to XAML * Remove unused imports * DisposalRouterWindow to XAML * Fix localization
This commit is contained in:
32
Content.Client/Disposal/UI/DisposalRouterWindow.xaml.cs
Normal file
32
Content.Client/Disposal/UI/DisposalRouterWindow.xaml.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using Content.Shared.Disposal.Components;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.CustomControls;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
using static Content.Shared.Disposal.Components.SharedDisposalRouterComponent;
|
||||
|
||||
namespace Content.Client.Disposal.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// Client-side UI used to control a <see cref="SharedDisposalRouterComponent"/>
|
||||
/// </summary>
|
||||
[GenerateTypedNameReferences]
|
||||
public partial class DisposalRouterWindow : SS14Window
|
||||
{
|
||||
public LineEdit TagInput => TagInputProtected;
|
||||
public Button Confirm => ConfirmProtected;
|
||||
|
||||
public DisposalRouterWindow()
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
|
||||
TagInput.IsValid = tags => TagRegex.IsMatch(tags);
|
||||
}
|
||||
|
||||
|
||||
public void UpdateState(DisposalRouterUserInterfaceState state)
|
||||
{
|
||||
TagInput.Text = state.Tags;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user