mirror of
https://github.com/corvax-team/ss14-wl.git
synced 2026-02-14 19:29:57 +01:00
* Added random gate * minor edit * cleaning up my shit after trying to do something faster * new lines * some changes * joke * UI * Long Division * Dont use ctrl + x in 3 am * I hope these are the final touches * One thing, I don't know why * noname commit * no way, 1kk of code lines edit * sudo rm -rf ... and something there... * update * sometimes its sad
29 lines
788 B
C#
29 lines
788 B
C#
using Content.Client.UserInterface.Controls;
|
|
using Robust.Client.AutoGenerated;
|
|
using Robust.Client.UserInterface.XAML;
|
|
|
|
namespace Content.Client.DeviceLinking.UI;
|
|
|
|
/// <summary>
|
|
/// Window for setting up the random gate probability.
|
|
/// </summary>
|
|
[GenerateTypedNameReferences]
|
|
public sealed partial class RandomGateSetupWindow : FancyWindow
|
|
{
|
|
/// <summary>
|
|
/// Event triggered when the "Apply" button is pressed.
|
|
/// </summary>
|
|
public event Action<string>? OnApplyPressed;
|
|
|
|
public RandomGateSetupWindow()
|
|
{
|
|
RobustXamlLoader.Load(this);
|
|
ApplyButton.OnPressed += _ => OnApplyPressed?.Invoke(ProbabilityInput.Text);
|
|
}
|
|
|
|
public void SetProbability(float probability)
|
|
{
|
|
ProbabilityInput.Text = probability.ToString("0.00");
|
|
}
|
|
}
|