From 65a02f032fd686bbeebeddc32752a25c95ed5b37 Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Tue, 5 Sep 2023 08:25:25 -0500 Subject: [PATCH] Expose helpful slider data. --- Source/Engine/UI/GUI/Common/Slider.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Source/Engine/UI/GUI/Common/Slider.cs b/Source/Engine/UI/GUI/Common/Slider.cs index 06c73f15e..b0344f055 100644 --- a/Source/Engine/UI/GUI/Common/Slider.cs +++ b/Source/Engine/UI/GUI/Common/Slider.cs @@ -83,6 +83,24 @@ public class Slider : ContainerControl } } } + + /// + /// The local position of the thumb center + /// + [HideInEditor] + public float ThumbCenter => _thumbCenter; + + /// + /// The local position of the beginning of the track. + /// + [HideInEditor] + public float TrackBeginning => _thumbSize.X / 2; + + /// + /// The local position of the end of the track. + /// + [HideInEditor] + public float TrackEnd => Width - _thumbSize.X / 2; /// /// The height of the track.