6
StarHorizon_Public/Content.Client/Shuttles/BUI/RadarConsoleBoundUserInterface.cs
2025-12-13 13:46:17 +03:00

35 lines
898 B
C#

using Content.Shared.Shuttles.BUIStates;
using JetBrains.Annotations;
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>();
_window?.SetConsole(Owner); // Frontier
}
protected override void UpdateState(BoundUserInterfaceState state)
{
base.UpdateState(state);
if (state is not NavBoundUserInterfaceState cState)
return;
_window?.UpdateState(cState.State);
}
}