mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
* 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
42 lines
1.3 KiB
C#
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();
|
|
}
|
|
}
|
|
}
|