mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-02 18:17:09 +02:00
33 lines
846 B
C#
33 lines
846 B
C#
using System;
|
|
using Robust.Client.Graphics;
|
|
using Robust.Shared.Maths;
|
|
|
|
namespace Robust.Client.UserInterface.Controls
|
|
{
|
|
public abstract class UIRoot : Control
|
|
{
|
|
public const string StylePropBackground = "background";
|
|
|
|
public override UIRoot? Root
|
|
{
|
|
get => this;
|
|
internal set => throw new InvalidOperationException();
|
|
}
|
|
|
|
public new virtual IClydeWindow? Window => null;
|
|
|
|
public Color? BackgroundColor { get; set; }
|
|
|
|
private Color _styleBgColor;
|
|
|
|
internal Color ActualBgColor => BackgroundColor ?? _styleBgColor;
|
|
|
|
protected override void StylePropertiesChanged()
|
|
{
|
|
base.StylePropertiesChanged();
|
|
|
|
_styleBgColor = TryGetStyleProperty(StylePropBackground, out Color color) ? color : default;
|
|
}
|
|
}
|
|
}
|