CatStation/Content.Client/Strip/StrippingMenu.cs
beck-thompson 5f37c95e9f
Admins can now see what items are contraband and chameleon in the strip menu (#43658)
* Admins can now see what items are contraband and chameleon in the strip menu

* Fix the color, the default is now red

* better admin view comment

* Simplify logic, make new simple slot overlay to combine logic

* Make isadmin logic a little clearer

* Minor cleanup / spelling mistakes

* change  button shape

* change to res path

* opps

* Add option to change default behavior

* Fix spacing

* Remove unused

* Rename to default

* Take away the soul of the overlay

* Add tooltip

* Fix error
2026-05-10 10:45:58 +00:00

42 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 LayoutContainer HandsContainer = new();
public BoxContainer ButtonContainer = new() { Orientation = LayoutOrientation.Vertical, Margin = new Thickness(0, 0, 0, 5 ) };
public bool Dirty = true;
public event Action? OnDirty;
public StrippingMenu()
{
var box = new BoxContainer() { Orientation = LayoutOrientation.Vertical };
ContentsContainer.AddChild(box);
box.AddChild(ButtonContainer);
box.AddChild(HandsContainer);
box.AddChild(InventoryContainer);
}
public void ClearButtons()
{
InventoryContainer.RemoveAllChildren();
HandsContainer.RemoveAllChildren();
ButtonContainer.RemoveAllChildren();
}
protected override void FrameUpdate(FrameEventArgs args)
{
if (!Dirty)
return;
Dirty = false;
OnDirty?.Invoke();
}
}
}