Revert "Remove some BUI boilerplate" (#30214)

Revert "Remove some BUI boilerplate (#28399)"

This reverts commit cbf329a82d.
This commit is contained in:
Nemanja
2024-07-20 20:42:27 -04:00
committed by GitHub
parent 6d664c9157
commit cb0ba66be3
137 changed files with 1755 additions and 1096 deletions

View File

@@ -22,7 +22,7 @@ public sealed partial class GatewayWindow : FancyWindow,
public event Action<NetEntity>? OpenPortal;
private List<GatewayDestinationData> _destinations = new();
public NetEntity Owner;
public readonly NetEntity Owner;
private NetEntity? _current;
private TimeSpan _nextReady;
@@ -46,20 +46,16 @@ public sealed partial class GatewayWindow : FancyWindow,
/// </summary>
private bool _isCooldownPending = true;
public GatewayWindow()
public GatewayWindow(NetEntity netEntity)
{
RobustXamlLoader.Load(this);
var dependencies = IoCManager.Instance!;
_timing = dependencies.Resolve<IGameTiming>();
Owner = netEntity;
NextUnlockBar.ForegroundStyleBoxOverride = new StyleBoxFlat(Color.FromHex("#C74EBD"));
}
public void SetEntity(NetEntity entity)
{
}
public void UpdateState(GatewayBoundUserInterfaceState state)
{
_destinations = state.Destinations;