1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 15:07:44 +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)
{
if (allowOverlays == OverlayActivation.All)
switch (visibility)
{
switch (visibility)
{
case Visibility.Visible:
case Visibility.Visible:
if (allowOverlays != OverlayActivation.Disabled)
samplePopIn?.Play();
break;
case Visibility.Hidden:
samplePopOut?.Play();
break;
}
else
State = Visibility.Hidden;
break;
case Visibility.Hidden:
samplePopOut?.Play();
break;
}
else
State = Visibility.Hidden;
}
}
}

View File

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

View File

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