using Content.Client.UserInterface.Controls; using Robust.Client.AutoGenerated; using Robust.Client.UserInterface.XAML; namespace Content.Client.DeviceLinking.UI; /// /// Window for setting up the random gate probability. /// [GenerateTypedNameReferences] public sealed partial class RandomGateSetupWindow : FancyWindow { /// /// Event triggered when the "Apply" button is pressed. /// public event Action? OnApplyPressed; public RandomGateSetupWindow() { RobustXamlLoader.Load(this); ApplyButton.OnPressed += _ => OnApplyPressed?.Invoke(ProbabilityInput.Text); } public void SetProbability(float probability) { ProbabilityInput.Text = probability.ToString("0.00"); } }