diff --git a/Source/Editor/GUI/Input/SliderControl.cs b/Source/Editor/GUI/Input/SliderControl.cs index 67bf8a654..bc2523ae5 100644 --- a/Source/Editor/GUI/Input/SliderControl.cs +++ b/Source/Editor/GUI/Input/SliderControl.cs @@ -71,20 +71,25 @@ namespace FlaxEditor.GUI.Input public Action ValueChanged; /// - /// The color of the slider track line + /// The color of the slider track line. /// public Color TrackLineColor { get; set; } /// - /// The color of the slider thumb when it's not selected + /// The color of the slider thumb when it's not selected. /// public Color ThumbColor { get; set; } /// - /// The color of the slider thumb when it's selected + /// The color of the slider thumb when it's selected. /// public Color ThumbColorSelected { get; set; } + /// + /// The color of the slider thumb when it's hovered. + /// + public Color ThumbColorHovered { get; set; } + /// /// Gets a value indicating whether user is using a slider. /// @@ -112,6 +117,7 @@ namespace FlaxEditor.GUI.Input TrackLineColor = style.BackgroundHighlighted; ThumbColor = style.BackgroundNormal; ThumbColorSelected = style.BackgroundSelected; + ThumbColorHovered = style.BackgroundHighlighted; } private void UpdateThumb() @@ -151,7 +157,8 @@ namespace FlaxEditor.GUI.Input Render2D.FillRectangle(lineRect, TrackLineColor); // Draw thumb - Render2D.FillRectangle(_thumbRect, _isSliding ? ThumbColorSelected : ThumbColor); + bool mouseOverThumb = _thumbRect.Contains(PointFromWindow(Root.MousePosition)); + Render2D.FillRectangle(_thumbRect, _isSliding ? ThumbColorSelected : mouseOverThumb ? ThumbColorHovered : ThumbColor); } ///