1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-16 08:42:55 +08:00

Merge branch 'master' into skin-scaling

This commit is contained in:
Dan Balasescu 2018-03-22 20:11:30 +09:00 committed by GitHub
commit 4e2c6ccedc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 3 deletions

@ -1 +1 @@
Subproject commit 241133f0a65326a563ba23b7166167a882d1d5cb
Subproject commit d8d4f55e10ac553223db75874bae6ae4894b739a

View File

@ -302,6 +302,21 @@ namespace osu.Game
};
}
var singleDisplaySideOverlays = new OverlayContainer[] { settings, notifications };
foreach (var overlay in singleDisplaySideOverlays)
{
overlay.StateChanged += state =>
{
if (state == Visibility.Hidden) return;
foreach (var c in singleDisplaySideOverlays)
{
if (c == overlay) continue;
c.State = Visibility.Hidden;
}
};
}
// eventually informational overlays should be displayed in a stack, but for now let's only allow one to stay open at a time.
var informationalOverlays = new OverlayContainer[] { beatmapSetOverlay, userProfile };
foreach (var overlay in informationalOverlays)

View File

@ -139,8 +139,7 @@ namespace osu.Game.Screens.Play
{
// as the pushDebounce below has a delay, we need to keep checking and cancel a future debounce
// if we become unready for push during the delay.
pushDebounce?.Cancel();
pushDebounce = null;
cancelLoad();
return;
}
@ -172,10 +171,23 @@ namespace osu.Game.Screens.Play
}
}
private void cancelLoad()
{
pushDebounce?.Cancel();
pushDebounce = null;
}
protected override void OnSuspending(Screen next)
{
base.OnSuspending(next);
cancelLoad();
}
protected override bool OnExiting(Screen next)
{
Content.ScaleTo(0.7f, 150, Easing.InQuint);
this.FadeOut(150);
cancelLoad();
return base.OnExiting(next);
}