using Content.Shared.Disposal.Components; using Robust.Client.AutoGenerated; using Robust.Client.UserInterface.CustomControls; using Robust.Client.UserInterface.XAML; using Robust.Shared.Timing; using static Content.Shared.Disposal.Components.SharedDisposalUnitComponent; namespace Content.Client.Disposal.UI { /// /// Client-side UI used to control a /// [GenerateTypedNameReferences] public sealed partial class DisposalUnitWindow : DefaultWindow { public TimeSpan FullPressure; public DisposalUnitWindow() { IoCManager.InjectDependencies(this); RobustXamlLoader.Load(this); } /// /// Update the interface state for the disposals window. /// /// true if we should stop updating every frame. public void UpdateState(DisposalUnitBoundUserInterfaceState state) { Title = state.UnitName; UnitState.Text = state.UnitState; Power.Pressed = state.Powered; Engage.Pressed = state.Engaged; FullPressure = state.FullPressureTime; } protected override void FrameUpdate(FrameEventArgs args) { base.FrameUpdate(args); PressureBar.UpdatePressure(FullPressure); } } }