XAMLify ID card computer, Alerts and AME window (#4322)

* Refactor ID card computer to XAML UI

* Alerts

* XAMLify AME window

* Use Control.SetButtonDisabledRecursive() instead
This commit is contained in:
Visne
2021-07-27 20:09:12 +02:00
committed by GitHub
parent e38d7e0a2f
commit 273eaa493f
11 changed files with 295 additions and 459 deletions

View File

@@ -19,14 +19,9 @@ namespace Content.Client.AME.UI
{
base.Open();
_window = new AMEWindow();
_window = new AMEWindow(this);
_window.OnClose += Close;
_window.OpenCentered();
_window.EjectButton.OnPressed += _ => ButtonPressed(UiButton.Eject);
_window.ToggleInjection.OnPressed += _ => ButtonPressed(UiButton.ToggleInjection);
_window.IncreaseFuelButton.OnPressed += _ => ButtonPressed(UiButton.IncreaseFuel);
_window.DecreaseFuelButton.OnPressed += _ => ButtonPressed(UiButton.DecreaseFuel);
}
/// <summary>
@@ -44,7 +39,7 @@ namespace Content.Client.AME.UI
_window?.UpdateState(castState); //Update window state
}
private void ButtonPressed(UiButton button, int dispenseIndex = -1)
public void ButtonPressed(UiButton button, int dispenseIndex = -1)
{
SendMessage(new UiButtonPressedMessage(button));
}