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

@@ -284,29 +284,6 @@ namespace Content.Client.Chemistry.UI
}
}
/// <summary>
/// This searches recursively through all the children of "parent"
/// and sets the Disabled value of any buttons found to "val"
/// </summary>
/// <param name="parent">The control which childrens get searched</param>
/// <param name="val">The value to which disabled gets set</param>
private void SetButtonDisabledRecursive(Control parent, bool val)
{
foreach (var child in parent.Children)
{
if (child is Button but)
{
but.Disabled = val;
continue;
}
if (child.Children != null)
{
SetButtonDisabledRecursive(child, val);
}
}
}
/// <summary>
/// Update the container, buffer, and packaging panels.
/// </summary>