1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-22 12:58:33 +01:00

expose a property in ScrollBar determining if we're currently scrolling it

This commit is contained in:
Ellpeck 2020-06-16 22:51:31 +02:00
parent 46939f7877
commit 914761519f

View file

@ -84,6 +84,10 @@ namespace MLEM.Ui.Elements {
/// An event that is called when this scroll bar is automatically hidden from a <see cref="Panel"/>
/// </summary>
public GenericCallback OnAutoHide;
/// <summary>
/// This property is true while the user scrolls on the scroll bar using the mouse or touch input
/// </summary>
public bool IsBeingScrolled => this.isMouseHeld || this.isDragging || this.isTouchHeld;
private bool isMouseHeld;
private bool isDragging;
private bool isTouchHeld;