Updated to use ppy's implementation

This commit is contained in:
MrTheMake
2017-07-14 12:09:55 +02:00
parent 8e0d59bfed
commit c053733ea9
6 changed files with 4 additions and 15 deletions

View File

@ -93,7 +93,7 @@ namespace osu.Game.Graphics.UserInterface
{ {
FadeColour(Color4.White, 200, EasingTypes.OutQuint); FadeColour(Color4.White, 200, EasingTypes.OutQuint);
if (Hovering) if (IsHovered)
OnHover(new InputState()); OnHover(new InputState());
} }
else else
@ -101,7 +101,7 @@ namespace osu.Game.Graphics.UserInterface
FadeColour(disableColour, 200, EasingTypes.OutQuint); FadeColour(disableColour, 200, EasingTypes.OutQuint);
content.ScaleTo(1, 200, EasingTypes.OutElastic); content.ScaleTo(1, 200, EasingTypes.OutElastic);
if (Hovering) if (IsHovered)
OnHoverLost(new InputState()); OnHoverLost(new InputState());
} }
} }

View File

@ -329,8 +329,6 @@ namespace osu.Game
} }
ScreenChanged?.Invoke(newScreen); ScreenChanged?.Invoke(newScreen);
Beatmap.Disabled = !currentScreen.AllowBeatmapChange;
} }
protected override bool OnExiting() protected override bool OnExiting()

View File

@ -262,7 +262,8 @@ namespace osu.Game.Overlays
progressBar.UpdatePosition(track.Length == 0 ? 0 : (float)(track.CurrentTime / track.Length)); progressBar.UpdatePosition(track.Length == 0 ? 0 : (float)(track.CurrentTime / track.Length));
playButton.Icon = track.IsRunning ? FontAwesome.fa_pause_circle_o : FontAwesome.fa_play_circle_o; playButton.Icon = track.IsRunning ? FontAwesome.fa_pause_circle_o : FontAwesome.fa_play_circle_o;
if (track.HasCompleted && !track.Looping && !beatmapBacking.Disabled) next(); if (track.HasCompleted && !track.Looping && !beatmapBacking.Disabled)
next();
} }
else else
playButton.Icon = FontAwesome.fa_play_circle_o; playButton.Icon = FontAwesome.fa_play_circle_o;
@ -287,16 +288,12 @@ namespace osu.Game.Overlays
private void prev() private void prev()
{ {
if (beatmapBacking.Disabled) return;
queuedDirection = TransformDirection.Prev; queuedDirection = TransformDirection.Prev;
playlist.PlayPrevious(); playlist.PlayPrevious();
} }
private void next() private void next()
{ {
if (beatmapBacking.Disabled) return;
queuedDirection = TransformDirection.Next; queuedDirection = TransformDirection.Next;
playlist.PlayNext(); playlist.PlayNext();
} }

View File

@ -35,8 +35,6 @@ namespace osu.Game.Screens
/// </summary> /// </summary>
internal virtual bool AllowBeatmapRulesetChange => true; internal virtual bool AllowBeatmapRulesetChange => true;
internal virtual bool AllowBeatmapChange => true;
private readonly Bindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>(); private readonly Bindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>();
private readonly Bindable<RulesetInfo> ruleset = new Bindable<RulesetInfo>(); private readonly Bindable<RulesetInfo> ruleset = new Bindable<RulesetInfo>();

View File

@ -33,8 +33,6 @@ namespace osu.Game.Screens.Play
internal override bool ShowOverlays => false; internal override bool ShowOverlays => false;
internal override bool AllowBeatmapChange => false;
internal override bool HasLocalCursorDisplayed => !pauseContainer.IsPaused && !HasFailed && HitRenderer.ProvidingUserCursor; internal override bool HasLocalCursorDisplayed => !pauseContainer.IsPaused && !HasFailed && HitRenderer.ProvidingUserCursor;
public BeatmapInfo BeatmapInfo; public BeatmapInfo BeatmapInfo;

View File

@ -33,8 +33,6 @@ namespace osu.Game.Screens.Ranking
internal override bool AllowBeatmapRulesetChange => false; internal override bool AllowBeatmapRulesetChange => false;
internal override bool AllowBeatmapChange => false;
private Container currentPage; private Container currentPage;
private static readonly Vector2 background_blur = new Vector2(20); private static readonly Vector2 background_blur = new Vector2(20);