using Content.Client.UserInterface.Controls; using Content.Shared._NF.Pirate; using Robust.Client.AutoGenerated; using Robust.Client.UserInterface; using Robust.Client.UserInterface.XAML; namespace Content.Client._NF.Pirate.UI; [GenerateTypedNameReferences] public sealed partial class PirateBountyMenu : FancyWindow { public Action? OnLabelButtonPressed; public Action? OnSkipButtonPressed; public PirateBountyMenu() { RobustXamlLoader.Load(this); } public void UpdateEntries(List bounties, TimeSpan untilNextSkip) { PirateBountyEntriesContainer.Children.Clear(); foreach (var b in bounties) { var entry = new PirateBountyEntry(b, untilNextSkip); entry.OnLabelButtonPressed += () => OnLabelButtonPressed?.Invoke(b.Id); entry.OnSkipButtonPressed += () => OnSkipButtonPressed?.Invoke(b.Id); PirateBountyEntriesContainer.AddChild(entry); } PirateBountyEntriesContainer.AddChild(new Control { MinHeight = 10 }); } }