diff --git a/Source/Engine/UI/GUI/Panels/ScrollBar.cs b/Source/Engine/UI/GUI/Panels/ScrollBar.cs index e6064e881..bb45accf7 100644 --- a/Source/Engine/UI/GUI/Panels/ScrollBar.cs +++ b/Source/Engine/UI/GUI/Panels/ScrollBar.cs @@ -74,6 +74,21 @@ namespace FlaxEngine.GUI /// public bool EnableSmoothing { get; set; } = true; + /// + /// The track color. + /// + public Color TrackColor; + + /// + /// The thumb color. + /// + public Color ThumbColor; + + /// + /// The selected thumb color. + /// + public Color ThumbSelectedColor; + /// /// Gets or sets the minimum value. /// @@ -209,6 +224,10 @@ namespace FlaxEngine.GUI AutoFocus = false; _orientation = orientation; + var style = Style.Current; + TrackColor = style.BackgroundHighlighted; + ThumbColor = style.BackgroundNormal; + ThumbSelectedColor = style.BackgroundSelected; } /// @@ -377,8 +396,8 @@ namespace FlaxEngine.GUI base.Draw(); var style = Style.Current; - Render2D.FillRectangle(_trackRect, style.BackgroundHighlighted * _thumbOpacity); - Render2D.FillRectangle(_thumbRect, (_thumbClicked ? style.BackgroundSelected : style.BackgroundNormal) * _thumbOpacity); + Render2D.FillRectangle(_trackRect, TrackColor * _thumbOpacity); + Render2D.FillRectangle(_thumbRect, (_thumbClicked ? ThumbSelectedColor : ThumbColor) * _thumbOpacity); } ///