mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Revert UserTrackingScrollContainer
changes
This commit is contained in:
@ -25,6 +25,8 @@ namespace osu.Game.Graphics.Containers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool UserScrolling { get; private set; }
|
public bool UserScrolling { get; private set; }
|
||||||
|
|
||||||
|
public void CancelUserScroll() => UserScrolling = false;
|
||||||
|
|
||||||
public UserTrackingScrollContainer()
|
public UserTrackingScrollContainer()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -36,37 +38,26 @@ namespace osu.Game.Graphics.Containers
|
|||||||
|
|
||||||
protected override void OnUserScroll(float value, bool animated = true, double? distanceDecay = default)
|
protected override void OnUserScroll(float value, bool animated = true, double? distanceDecay = default)
|
||||||
{
|
{
|
||||||
|
UserScrolling = true;
|
||||||
base.OnUserScroll(value, animated, distanceDecay);
|
base.OnUserScroll(value, animated, distanceDecay);
|
||||||
OnScrollChange(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public new void ScrollIntoView(Drawable target, bool animated = true)
|
public new void ScrollIntoView(Drawable target, bool animated = true)
|
||||||
{
|
{
|
||||||
|
UserScrolling = false;
|
||||||
base.ScrollIntoView(target, animated);
|
base.ScrollIntoView(target, animated);
|
||||||
OnScrollChange(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public new void ScrollTo(float value, bool animated = true, double? distanceDecay = null)
|
public new void ScrollTo(float value, bool animated = true, double? distanceDecay = null)
|
||||||
{
|
{
|
||||||
|
UserScrolling = false;
|
||||||
base.ScrollTo(value, animated, distanceDecay);
|
base.ScrollTo(value, animated, distanceDecay);
|
||||||
OnScrollChange(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public new void ScrollToStart(bool animated = true, bool allowDuringDrag = false)
|
|
||||||
{
|
|
||||||
base.ScrollToStart(animated, allowDuringDrag);
|
|
||||||
OnScrollChange(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public new void ScrollToEnd(bool animated = true, bool allowDuringDrag = false)
|
public new void ScrollToEnd(bool animated = true, bool allowDuringDrag = false)
|
||||||
{
|
{
|
||||||
|
UserScrolling = false;
|
||||||
base.ScrollToEnd(animated, allowDuringDrag);
|
base.ScrollToEnd(animated, allowDuringDrag);
|
||||||
OnScrollChange(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Invoked when any scroll has been performed either programmatically or by user.
|
|
||||||
/// </summary>
|
|
||||||
protected virtual void OnScrollChange(bool byUser) => UserScrolling = byUser;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user