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

Use UserTriggered in Player

This commit is contained in:
Dean Herbert 2018-06-06 15:10:09 +09:00
parent 6be382aab6
commit 86be1bef6b
3 changed files with 13 additions and 12 deletions

View File

@ -53,20 +53,18 @@ namespace osu.Game.Graphics.Containers
private void onStateChanged(Visibility visibility) private void onStateChanged(Visibility visibility)
{ {
if (allowOverlays == OverlayActivation.All) switch (visibility)
{ {
switch (visibility) case Visibility.Visible:
{ if (allowOverlays != OverlayActivation.Disabled)
case Visibility.Visible:
samplePopIn?.Play(); samplePopIn?.Play();
break; else
case Visibility.Hidden: State = Visibility.Hidden;
samplePopOut?.Play(); break;
break; case Visibility.Hidden:
} samplePopOut?.Play();
break;
} }
else
State = Visibility.Hidden;
} }
} }
} }

View File

@ -6,7 +6,7 @@ namespace osu.Game.Overlays
public enum OverlayActivation public enum OverlayActivation
{ {
Disabled, Disabled,
//UserTriggered, // currently there is no way to discern user action UserTriggered,
All All
} }
} }

View File

@ -21,6 +21,7 @@ using osu.Game.Configuration;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Cursor; using osu.Game.Graphics.Cursor;
using osu.Game.Online.API; using osu.Game.Online.API;
using osu.Game.Overlays;
using osu.Game.Rulesets; using osu.Game.Rulesets;
using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Scoring; using osu.Game.Rulesets.Scoring;
@ -37,6 +38,8 @@ namespace osu.Game.Screens.Play
protected override bool HideOverlaysOnEnter => true; protected override bool HideOverlaysOnEnter => true;
protected override OverlayActivation OverlayActivationLevel => OverlayActivation.UserTriggered;
public Action RestartRequested; public Action RestartRequested;
public bool HasFailed { get; private set; } public bool HasFailed { get; private set; }