mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-01 09:37:03 +02:00
25 lines
669 B
C#
25 lines
669 B
C#
using Robust.Client.Graphics;
|
|
using Robust.Shared.Maths;
|
|
|
|
namespace Robust.Client.UserInterface;
|
|
|
|
internal sealed class ProfAltBackground : Control
|
|
{
|
|
public bool IsAltBackground { get; set; }
|
|
public Color Color = DefaultColor;
|
|
public static readonly Color DefaultColor = Color.FromHex("#222222");
|
|
|
|
protected override void StylePropertiesChanged()
|
|
{
|
|
base.StylePropertiesChanged();
|
|
if (!TryGetStyleProperty("color", out Color))
|
|
Color = DefaultColor;
|
|
}
|
|
|
|
protected internal override void Draw(DrawingHandleScreen handle)
|
|
{
|
|
if (IsAltBackground)
|
|
handle.DrawRect(PixelSizeBox, Color);
|
|
}
|
|
}
|