Improve Paper UI, allow an to entity configure how it's UI looks (#13494)
Co-authored-by: Eoin Mcloughlin <helloworld@eoinrul.es>
This commit is contained in:
@@ -19,14 +19,18 @@ namespace Content.Client.Paper.UI
|
||||
protected override void Open()
|
||||
{
|
||||
base.Open();
|
||||
_window = new PaperWindow
|
||||
{
|
||||
Title = IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(Owner.Owner).EntityName,
|
||||
};
|
||||
var entityMgr = IoCManager.Resolve<IEntityManager>();
|
||||
|
||||
_window = new PaperWindow();
|
||||
_window.OnClose += Close;
|
||||
_window.Input.OnTextEntered += Input_OnTextEntered;
|
||||
_window.OpenCentered();
|
||||
|
||||
if (entityMgr.TryGetComponent<PaperVisualsComponent>(Owner.Owner, out var visuals))
|
||||
{
|
||||
_window.InitVisuals(visuals);
|
||||
}
|
||||
|
||||
_window.OpenCentered();
|
||||
}
|
||||
|
||||
protected override void UpdateState(BoundUserInterfaceState state)
|
||||
|
||||
Reference in New Issue
Block a user