32 lines
877 B
C#
32 lines
877 B
C#
using Content.Shared.Paper;
|
|
using Robust.Client.AutoGenerated;
|
|
using Robust.Client.UserInterface.Controls;
|
|
using Robust.Client.UserInterface.CustomControls;
|
|
using Robust.Client.UserInterface.XAML;
|
|
using Robust.Shared.Utility;
|
|
|
|
namespace Content.Client.Paper.UI
|
|
{
|
|
[GenerateTypedNameReferences]
|
|
public partial class PaperWindow : SS14Window
|
|
{
|
|
public LineEdit Input => InputProtected;
|
|
|
|
public PaperWindow()
|
|
{
|
|
RobustXamlLoader.Load(this);
|
|
}
|
|
|
|
public void Populate(SharedPaperComponent.PaperBoundUserInterfaceState state)
|
|
{
|
|
if (state.Mode == SharedPaperComponent.PaperAction.Write)
|
|
{
|
|
Input.Visible = true;
|
|
}
|
|
var msg = new FormattedMessage();
|
|
msg.AddMarkupPermissive(state.Text);
|
|
Label.SetMessage(msg);
|
|
}
|
|
}
|
|
}
|