mirror of
https://github.com/ppy/osu.git
synced 2026-05-18 13:20:32 +08:00
Fix "reveal background" triggering in one more case it shouldn't
Closes https://github.com/ppy/osu/issues/34393 again. Hopefully for the last time.
This commit is contained in:
@@ -71,6 +71,11 @@ namespace osu.Game.Graphics.Carousel
|
||||
/// </summary>
|
||||
public bool IsFiltering => !filterTask.IsCompleted;
|
||||
|
||||
/// <summary>
|
||||
/// Whether absolute scrolling is currently triggered.
|
||||
/// </summary>
|
||||
public bool AbsoluteScrolling => Scroll.AbsoluteScrolling;
|
||||
|
||||
/// <summary>
|
||||
/// The number of times filter operations have been triggered.
|
||||
/// </summary>
|
||||
|
||||
@@ -120,9 +120,12 @@ namespace osu.Game.Graphics.Carousel
|
||||
|
||||
#region Absolute scrolling
|
||||
|
||||
private bool absoluteScrolling;
|
||||
/// <summary>
|
||||
/// Whether absolute scrolling is currently triggered.
|
||||
/// </summary>
|
||||
public bool AbsoluteScrolling { get; private set; }
|
||||
|
||||
protected override bool IsDragging => base.IsDragging || absoluteScrolling;
|
||||
protected override bool IsDragging => base.IsDragging || AbsoluteScrolling;
|
||||
|
||||
public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||
{
|
||||
@@ -169,7 +172,7 @@ namespace osu.Game.Graphics.Carousel
|
||||
|
||||
protected override bool OnMouseMove(MouseMoveEvent e)
|
||||
{
|
||||
if (absoluteScrolling)
|
||||
if (AbsoluteScrolling)
|
||||
{
|
||||
ScrollToAbsolutePosition(e.CurrentState.Mouse.Position);
|
||||
return true;
|
||||
@@ -181,10 +184,10 @@ namespace osu.Game.Graphics.Carousel
|
||||
private void beginAbsoluteScrolling(UIEvent e)
|
||||
{
|
||||
ScrollToAbsolutePosition(e.CurrentState.Mouse.Position);
|
||||
absoluteScrolling = true;
|
||||
AbsoluteScrolling = true;
|
||||
}
|
||||
|
||||
private void endAbsoluteScrolling() => absoluteScrolling = false;
|
||||
private void endAbsoluteScrolling() => AbsoluteScrolling = false;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -849,7 +849,7 @@ namespace osu.Game.Screens.SelectV2
|
||||
// For simplicity, disable this functionality on mobile.
|
||||
bool isTouchInput = e.CurrentState.Mouse.LastSource is ISourcedFromTouch;
|
||||
|
||||
if (e.PressedButtons.SequenceEqual([MouseButton.Left]) && !isTouchInput && mouseDownPriority)
|
||||
if (!carousel.AbsoluteScrolling && !isTouchInput && mouseDownPriority)
|
||||
{
|
||||
revealingBackground = Scheduler.AddDelayed(() =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user