diff --git a/Content.Client/_NF/M_Emp/UI/M_EmpBoundUserInterface.cs b/Content.Client/_NF/M_Emp/UI/M_EmpBoundUserInterface.cs new file mode 100644 index 00000000000..6b758fde9c9 --- /dev/null +++ b/Content.Client/_NF/M_Emp/UI/M_EmpBoundUserInterface.cs @@ -0,0 +1,56 @@ +using Content.Shared._NF.M_Emp; +using JetBrains.Annotations; +using Robust.Client.GameObjects; + +namespace Content.Client._NF.M_Emp.UI +{ + [UsedImplicitly] + public sealed class M_EmpBoundUserInterface : BoundUserInterface + { + private M_EmpWindow? _window; + + public M_EmpBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) + { + } + + protected override void Open() + { + base.Open(); + + _window = new M_EmpWindow(this); + _window.OnClose += Close; + _window.OpenCentered(); + } + + /// + /// Update the ui each time new state data is sent from the server. + /// + /// + /// Data of the that this ui represents. + /// Sent from the server. + /// + protected override void UpdateState(BoundUserInterfaceState state) + { + base.UpdateState(state); + + // var castState = (M_EmpBoundUserInterfaceState) state; + // _window?.UpdateState(castState); //Update window state + } + + public void ButtonPressed(UiButton button) + { + SendMessage(new UiButtonPressedMessage(button)); + } + + protected override void Dispose(bool disposing) + { + base.Dispose(disposing); + + if (disposing) + { + _window?.Dispose(); + } + } + } +} + diff --git a/Content.Client/_NF/M_Emp/UI/M_EmpWindow.xaml b/Content.Client/_NF/M_Emp/UI/M_EmpWindow.xaml new file mode 100644 index 00000000000..cba7f432053 --- /dev/null +++ b/Content.Client/_NF/M_Emp/UI/M_EmpWindow.xaml @@ -0,0 +1,37 @@ + + + + + +