You can now cancel the timer (recall)
This commit is contained in:
@@ -20,7 +20,7 @@ namespace Content.Client.Command
|
||||
|
||||
private CommunicationsConsoleBoundUserInterface Owner { get; set; }
|
||||
private readonly CancellationTokenSource _timerCancelTokenSource = new CancellationTokenSource();
|
||||
|
||||
private readonly Button _emergencyShuttleButton;
|
||||
private readonly RichTextLabel _countdownLabel;
|
||||
|
||||
public CommunicationsConsoleMenu(CommunicationsConsoleBoundUserInterface owner)
|
||||
@@ -31,14 +31,13 @@ namespace Content.Client.Command
|
||||
Owner = owner;
|
||||
|
||||
_countdownLabel = new RichTextLabel(){CustomMinimumSize = new Vector2(0, 200)};
|
||||
var emergencyShuttleButton = new Button() {Text = _localizationManager.GetString("Call emergency shuttle")};
|
||||
|
||||
emergencyShuttleButton.OnPressed += (e) => Owner.CallShuttle();
|
||||
_emergencyShuttleButton = new Button();
|
||||
_emergencyShuttleButton.OnPressed += (e) => Owner.EmergencyShuttleButtonPressed();
|
||||
|
||||
var vbox = new VBoxContainer() {SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsVertical = SizeFlags.FillExpand};
|
||||
|
||||
vbox.AddChild(_countdownLabel);
|
||||
vbox.AddChild(emergencyShuttleButton);
|
||||
vbox.AddChild(_emergencyShuttleButton);
|
||||
|
||||
var hbox = new HBoxContainer() {SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsVertical = SizeFlags.FillExpand};
|
||||
hbox.AddChild(new Control(){CustomMinimumSize = new Vector2(100,0), SizeFlagsHorizontal = SizeFlags.FillExpand});
|
||||
@@ -56,9 +55,11 @@ namespace Content.Client.Command
|
||||
if (!Owner.CountdownStarted)
|
||||
{
|
||||
_countdownLabel.SetMessage("");
|
||||
_emergencyShuttleButton.Text = _localizationManager.GetString("Call emergency shuttle");
|
||||
return;
|
||||
}
|
||||
|
||||
_emergencyShuttleButton.Text = _localizationManager.GetString("Recall emergency shuttle");
|
||||
_countdownLabel.SetMessage($"Time remaining\n{Owner.Countdown.ToString()}s");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user