diff --git a/Robust.Client/UserInterface/Controls/ContainerButton.cs b/Robust.Client/UserInterface/Controls/ContainerButton.cs index f3ecffb8d..f981e9f76 100644 --- a/Robust.Client/UserInterface/Controls/ContainerButton.cs +++ b/Robust.Client/UserInterface/Controls/ContainerButton.cs @@ -15,6 +15,8 @@ namespace Robust.Client.UserInterface.Controls public const string StylePseudoClassHover = "hover"; public const string StylePseudoClassDisabled = "disabled"; + public StyleBox? StyleBoxOverride { get; set; } + public ContainerButton() { DrawModeChanged(); @@ -24,6 +26,11 @@ namespace Robust.Client.UserInterface.Controls { get { + if (StyleBoxOverride != null) + { + return StyleBoxOverride; + } + if (TryGetStyleProperty(StylePropertyStyleBox, out var box)) { return box; diff --git a/Robust.Client/UserInterface/Controls/TabContainer.cs b/Robust.Client/UserInterface/Controls/TabContainer.cs index 33114d66a..623ac18ac 100644 --- a/Robust.Client/UserInterface/Controls/TabContainer.cs +++ b/Robust.Client/UserInterface/Controls/TabContainer.cs @@ -65,6 +65,10 @@ namespace Robust.Client.UserInterface.Controls } } + public StyleBox? PanelStyleBoxOverride { get; set; } + public Color? TabFontColorOverride { get; set; } + public Color? TabFontColorInactiveOverride { get; set; } + public event Action? OnTabChanged; public TabContainer() @@ -361,6 +365,9 @@ namespace Robust.Client.UserInterface.Controls [System.Diagnostics.Contracts.Pure] private Color _getTabFontColorActive() { + if (TabFontColorOverride != null) + return TabFontColorOverride.Value; + if (TryGetStyleProperty(stylePropertyTabFontColor, out Color color)) { return color; @@ -371,6 +378,9 @@ namespace Robust.Client.UserInterface.Controls [System.Diagnostics.Contracts.Pure] private Color _getTabFontColorInactive() { + if (TabFontColorInactiveOverride != null) + return TabFontColorInactiveOverride.Value; + if (TryGetStyleProperty(StylePropertyTabFontColorInactive, out Color color)) { return color; @@ -381,6 +391,9 @@ namespace Robust.Client.UserInterface.Controls [System.Diagnostics.Contracts.Pure] private StyleBox? _getPanel() { + if (PanelStyleBoxOverride != null) + return PanelStyleBoxOverride; + TryGetStyleProperty(StylePropertyPanelStyleBox, out var box); return box; }