mirror of
https://github.com/ppy/osu
synced 2024-12-14 10:57:41 +00:00
Fix slight threading scheduling issue.
This commit is contained in:
parent
1a4f0a92a5
commit
b0d5d88fe9
@ -37,7 +37,7 @@ namespace osu.Game.Screens.Tournament
|
||||
|
||||
private double lastTime;
|
||||
|
||||
private ScheduledDelegate idleDelegate;
|
||||
private ScheduledDelegate delayedModeChangeDelegate;
|
||||
|
||||
public ScrollingTeamContainer()
|
||||
{
|
||||
@ -87,11 +87,11 @@ namespace osu.Game.Screens.Tournament
|
||||
{
|
||||
_scrollState = value;
|
||||
|
||||
delayedModeChangeDelegate?.Cancel();
|
||||
|
||||
switch (value)
|
||||
{
|
||||
case ScrollState.Scrolling:
|
||||
idleDelegate?.Cancel();
|
||||
|
||||
resetSelected();
|
||||
|
||||
OnScrollStarted?.Invoke();
|
||||
@ -103,7 +103,7 @@ namespace osu.Game.Screens.Tournament
|
||||
speedTo(0f, 2000);
|
||||
tracker.FadeIn(200);
|
||||
|
||||
Delay(2300).Schedule(() => scrollState = ScrollState.Stopped);
|
||||
delayedModeChangeDelegate = Delay(2300).Schedule(() => scrollState = ScrollState.Stopped);
|
||||
break;
|
||||
case ScrollState.Stopped:
|
||||
// Find closest to center
|
||||
@ -135,7 +135,7 @@ namespace osu.Game.Screens.Tournament
|
||||
st.Selected = true;
|
||||
OnSelected?.Invoke(st);
|
||||
|
||||
idleDelegate = Delay(10000).Schedule(() => scrollState = ScrollState.Idle);
|
||||
delayedModeChangeDelegate = Delay(10000).Schedule(() => scrollState = ScrollState.Idle);
|
||||
break;
|
||||
case ScrollState.Idle:
|
||||
resetSelected();
|
||||
|
Loading…
Reference in New Issue
Block a user