Files
tbd-station-14/Content.Client/Strip/StrippingMenu.cs
metalgearsloth edb05e36bb Reapply "Remove some BUI boilerplate" (#30214) (#30219)
* Reapply "Remove some BUI boilerplate" (#30214)

This reverts commit cb0ba66be3.

* Fix gas tank

* Fix PA

* Fix microwave

* Comms console underwrap

* Fix rcd

* log wehs
2024-07-21 14:48:13 +10:00

43 lines
1.3 KiB
C#

using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.Timing;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Strip
{
public sealed class StrippingMenu : DefaultWindow
{
public LayoutContainer InventoryContainer = new();
public BoxContainer HandsContainer = new() { Orientation = LayoutOrientation.Horizontal };
public BoxContainer SnareContainer = new();
public bool Dirty = true;
public event Action? OnDirty;
public StrippingMenu()
{
var box = new BoxContainer() { Orientation = LayoutOrientation.Vertical, Margin = new Thickness(0, 8) };
Contents.AddChild(box);
box.AddChild(SnareContainer);
box.AddChild(HandsContainer);
box.AddChild(InventoryContainer);
}
public void ClearButtons()
{
InventoryContainer.DisposeAllChildren();
HandsContainer.DisposeAllChildren();
SnareContainer.DisposeAllChildren();
}
protected override void FrameUpdate(FrameEventArgs args)
{
if (!Dirty)
return;
Dirty = false;
OnDirty?.Invoke();
}
}
}