using Robust.Client.AutoGenerated; using Robust.Client.UserInterface.Controls; using FancyWindow = Content.Client.UserInterface.Controls.FancyWindow; using Robust.Client.UserInterface.XAML; using Robust.Shared.Timing; namespace Content.Client._NF.Kitchen.UI { [GenerateTypedNameReferences] public sealed partial class AssemblerMenu : FancyWindow { [Dependency] private readonly IGameTiming _timing = default!; public bool IsBusy; public TimeSpan CurrentCooktimeEnd; public AssemblerMenu() { RobustXamlLoader.Load(this); IoCManager.InjectDependencies(this); } public void ToggleBusyDisableOverlayPanel(bool shouldDisable) { DisableCookingPanelOverlay.Visible = shouldDisable; } protected override void FrameUpdate(FrameEventArgs args) { base.FrameUpdate(args); if (!IsBusy) return; if (CurrentCooktimeEnd > _timing.CurTime) { CookTimeInfoLabel.Text = Loc.GetString("assembler-bound-user-interface-cook-time-label", ("time", CurrentCooktimeEnd.Subtract(_timing.CurTime).Seconds)); } } } }