* Remove some BUI boilerplate - The disposals overrides got removed due to the helper method handling it. - Replace window creation with CreateWindow helper. - Fixed some stinky code which would cause exceptions. * More * moar * weh * done * More BUIs * More updates * weh * moar * look who it is * weh * merge * weh * fixes
36 lines
917 B
C#
36 lines
917 B
C#
using Content.Client.Shuttles.UI;
|
|
using Content.Shared.Shuttles.BUIStates;
|
|
using JetBrains.Annotations;
|
|
using Robust.Client.GameObjects;
|
|
using Robust.Client.UserInterface;
|
|
using RadarConsoleWindow = Content.Client.Shuttles.UI.RadarConsoleWindow;
|
|
|
|
namespace Content.Client.Shuttles.BUI;
|
|
|
|
[UsedImplicitly]
|
|
public sealed class RadarConsoleBoundUserInterface : BoundUserInterface
|
|
{
|
|
[ViewVariables]
|
|
private RadarConsoleWindow? _window;
|
|
|
|
public RadarConsoleBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
|
|
{
|
|
}
|
|
|
|
protected override void Open()
|
|
{
|
|
base.Open();
|
|
|
|
_window = this.CreateWindow<RadarConsoleWindow>();
|
|
}
|
|
|
|
protected override void UpdateState(BoundUserInterfaceState state)
|
|
{
|
|
base.UpdateState(state);
|
|
if (state is not NavBoundUserInterfaceState cState)
|
|
return;
|
|
|
|
_window?.UpdateState(cState.State);
|
|
}
|
|
}
|