From c053733ea942ca927375f0402437ae343f731633 Mon Sep 17 00:00:00 2001 From: MrTheMake Date: Fri, 14 Jul 2017 12:09:55 +0200 Subject: [PATCH] Updated to use ppy's implementation --- osu.Game/Graphics/UserInterface/IconButton.cs | 4 ++-- osu.Game/OsuGame.cs | 2 -- osu.Game/Overlays/MusicController.cs | 7 ++----- osu.Game/Screens/OsuScreen.cs | 2 -- osu.Game/Screens/Play/Player.cs | 2 -- osu.Game/Screens/Ranking/Results.cs | 2 -- 6 files changed, 4 insertions(+), 15 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/IconButton.cs b/osu.Game/Graphics/UserInterface/IconButton.cs index 842c2d88dc..89be0316b2 100644 --- a/osu.Game/Graphics/UserInterface/IconButton.cs +++ b/osu.Game/Graphics/UserInterface/IconButton.cs @@ -93,7 +93,7 @@ namespace osu.Game.Graphics.UserInterface { FadeColour(Color4.White, 200, EasingTypes.OutQuint); - if (Hovering) + if (IsHovered) OnHover(new InputState()); } else @@ -101,7 +101,7 @@ namespace osu.Game.Graphics.UserInterface FadeColour(disableColour, 200, EasingTypes.OutQuint); content.ScaleTo(1, 200, EasingTypes.OutElastic); - if (Hovering) + if (IsHovered) OnHoverLost(new InputState()); } } diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index 576c55fd0e..843861c0da 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -329,8 +329,6 @@ namespace osu.Game } ScreenChanged?.Invoke(newScreen); - - Beatmap.Disabled = !currentScreen.AllowBeatmapChange; } protected override bool OnExiting() diff --git a/osu.Game/Overlays/MusicController.cs b/osu.Game/Overlays/MusicController.cs index e9fa9af038..81b1fef52e 100644 --- a/osu.Game/Overlays/MusicController.cs +++ b/osu.Game/Overlays/MusicController.cs @@ -262,7 +262,8 @@ namespace osu.Game.Overlays 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; - if (track.HasCompleted && !track.Looping && !beatmapBacking.Disabled) next(); + if (track.HasCompleted && !track.Looping && !beatmapBacking.Disabled) + next(); } else playButton.Icon = FontAwesome.fa_play_circle_o; @@ -287,16 +288,12 @@ namespace osu.Game.Overlays private void prev() { - if (beatmapBacking.Disabled) return; - queuedDirection = TransformDirection.Prev; playlist.PlayPrevious(); } private void next() { - if (beatmapBacking.Disabled) return; - queuedDirection = TransformDirection.Next; playlist.PlayNext(); } diff --git a/osu.Game/Screens/OsuScreen.cs b/osu.Game/Screens/OsuScreen.cs index e7cc84891a..64223db100 100644 --- a/osu.Game/Screens/OsuScreen.cs +++ b/osu.Game/Screens/OsuScreen.cs @@ -35,8 +35,6 @@ namespace osu.Game.Screens /// internal virtual bool AllowBeatmapRulesetChange => true; - internal virtual bool AllowBeatmapChange => true; - private readonly Bindable beatmap = new Bindable(); private readonly Bindable ruleset = new Bindable(); diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index e27631f6b8..c9ca91faa0 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -33,8 +33,6 @@ namespace osu.Game.Screens.Play internal override bool ShowOverlays => false; - internal override bool AllowBeatmapChange => false; - internal override bool HasLocalCursorDisplayed => !pauseContainer.IsPaused && !HasFailed && HitRenderer.ProvidingUserCursor; public BeatmapInfo BeatmapInfo; diff --git a/osu.Game/Screens/Ranking/Results.cs b/osu.Game/Screens/Ranking/Results.cs index 92732310f3..636851e14d 100644 --- a/osu.Game/Screens/Ranking/Results.cs +++ b/osu.Game/Screens/Ranking/Results.cs @@ -33,8 +33,6 @@ namespace osu.Game.Screens.Ranking internal override bool AllowBeatmapRulesetChange => false; - internal override bool AllowBeatmapChange => false; - private Container currentPage; private static readonly Vector2 background_blur = new Vector2(20);