fish-station/Content.Client/Administration/UI/CustomControls/HSeparator.cs
Vigers Ray 1d7a75070c
Roadmap (#188)
* Копипаст смуглефа

* Дорожная карта санрайза

* Мелкие фиксы

* Небольшие фиксы

---------

Co-authored-by: DrSmugleaf <drsmugleaf@gmail.com>
2024-07-12 04:13:29 +03:00

31 lines
808 B
C#

using Robust.Client.Graphics;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
namespace Content.Client.Administration.UI.CustomControls;
public sealed class HSeparator : Control
{
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)
{
_styleBox = new StyleBoxFlat
{
BackgroundColor = color,
ContentMarginBottomOverride = 2, ContentMarginLeftOverride = 2
};
AddChild(new PanelContainer { PanelOverride = _styleBox });
}
public HSeparator() : this(SeparatorColor) { }
}