Expose helpful slider data.

This commit is contained in:
Chandler Cox
2023-09-05 08:25:25 -05:00
parent 20f35e332f
commit 65a02f032f

View File

@@ -83,6 +83,24 @@ public class Slider : ContainerControl
}
}
}
/// <summary>
/// The local position of the thumb center
/// </summary>
[HideInEditor]
public float ThumbCenter => _thumbCenter;
/// <summary>
/// The local position of the beginning of the track.
/// </summary>
[HideInEditor]
public float TrackBeginning => _thumbSize.X / 2;
/// <summary>
/// The local position of the end of the track.
/// </summary>
[HideInEditor]
public float TrackEnd => Width - _thumbSize.X / 2;
/// <summary>
/// The height of the track.