Files
OldThink/Content.Client/Shuttles/BUI/RadarConsoleBoundUserInterface.cs

46 lines
1.1 KiB
C#
Raw Permalink Normal View History

using Content.Client.Shuttles.UI;
using Content.Shared.Shuttles.BUIStates;
using JetBrains.Annotations;
using Robust.Client.GameObjects;
using RadarConsoleWindow = Content.Client.Shuttles.UI.RadarConsoleWindow;
namespace Content.Client.Shuttles.BUI;
[UsedImplicitly]
public sealed class RadarConsoleBoundUserInterface : BoundUserInterface
{
2023-07-08 09:02:17 -07:00
[ViewVariables]
private RadarConsoleWindow? _window;
2023-07-08 09:02:17 -07:00
public RadarConsoleBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
{
}
protected override void Open()
{
base.Open();
2023-07-08 09:02:17 -07:00
_window = new RadarConsoleWindow();
2022-07-06 14:33:54 +10:00
_window.OnClose += Close;
_window.OpenCentered();
}
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
if (disposing)
{
_window?.Dispose();
}
}
protected override void UpdateState(BoundUserInterfaceState state)
{
base.UpdateState(state);
if (state is not NavBoundUserInterfaceState cState)
return;
_window?.UpdateState(cState.State);
}
}