Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions Content.Client/Administration/UI/CustomControls/HSeparator.cs
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
using Robust.Client.Graphics;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Shared.Maths;

namespace Content.Client.Administration.UI.CustomControls;

public sealed class HSeparator : Control
{
private static readonly Color SeparatorColor = Color.FromHex("#191919");
private static readonly Color SeparatorColor = Color.FromHex("#3D4059");

private readonly StyleBoxFlat _styleBox;

public Color Color
{
get => _styleBox.BackgroundColor;
set => _styleBox.BackgroundColor = value;
}

public HSeparator(Color color)
{
AddChild(new PanelContainer
_styleBox = new StyleBoxFlat
{
PanelOverride = new StyleBoxFlat
{
BackgroundColor = color,
ContentMarginBottomOverride = 2, ContentMarginLeftOverride = 2
}
});
BackgroundColor = color,
ContentMarginBottomOverride = 2, ContentMarginLeftOverride = 2
};

AddChild(new PanelContainer { PanelOverride = _styleBox });
}

public HSeparator() : this(SeparatorColor) { }
Expand Down
Loading