2021-09-19 19:01:01 +02:00
|
|
|
|
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]
|
2022-02-16 00:23:23 -07:00
|
|
|
|
public sealed partial class PaperWindow : DefaultWindow
|
2021-09-19 19:01:01 +02:00
|
|
|
|
{
|
|
|
|
|
|
public PaperWindow()
|
|
|
|
|
|
{
|
|
|
|
|
|
RobustXamlLoader.Load(this);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void Populate(SharedPaperComponent.PaperBoundUserInterfaceState state)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (state.Mode == SharedPaperComponent.PaperAction.Write)
|
|
|
|
|
|
{
|
|
|
|
|
|
Input.Visible = true;
|
|
|
|
|
|
}
|
2021-12-20 12:42:42 +01:00
|
|
|
|
var msg = new FormattedMessage();
|
2021-09-19 19:01:01 +02:00
|
|
|
|
msg.AddMarkupPermissive(state.Text);
|
2021-12-20 12:42:42 +01:00
|
|
|
|
Label.SetMessage(msg);
|
2021-09-19 19:01:01 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|