From 2645967dc4c3aa26ae1c53a8daf5a9ed53b68ce9 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 2 Jul 2019 15:17:35 +0900 Subject: [PATCH 1/7] Fix wave-based overlays always being present before initial display --- .../Graphics/Containers/OsuFocusedOverlayContainer.cs | 2 +- osu.Game/Graphics/Containers/WaveContainer.cs | 9 ++------- osu.Game/Overlays/WaveOverlayContainer.cs | 4 ++++ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/osu.Game/Graphics/Containers/OsuFocusedOverlayContainer.cs b/osu.Game/Graphics/Containers/OsuFocusedOverlayContainer.cs index f6db3102f2..5606328575 100644 --- a/osu.Game/Graphics/Containers/OsuFocusedOverlayContainer.cs +++ b/osu.Game/Graphics/Containers/OsuFocusedOverlayContainer.cs @@ -15,7 +15,7 @@ using osu.Game.Overlays; namespace osu.Game.Graphics.Containers { - public class OsuFocusedOverlayContainer : FocusedOverlayContainer, IPreviewTrackOwner, IKeyBindingHandler + public abstract class OsuFocusedOverlayContainer : FocusedOverlayContainer, IPreviewTrackOwner, IKeyBindingHandler { private SampleChannel samplePopIn; private SampleChannel samplePopOut; diff --git a/osu.Game/Graphics/Containers/WaveContainer.cs b/osu.Game/Graphics/Containers/WaveContainer.cs index f87909ab17..64a897088b 100644 --- a/osu.Game/Graphics/Containers/WaveContainer.cs +++ b/osu.Game/Graphics/Containers/WaveContainer.cs @@ -95,6 +95,7 @@ namespace osu.Game.Graphics.Containers AddInternal(contentContainer = new Container { RelativeSizeAxes = Axes.Both, + RelativePositionAxes = Axes.Both, Anchor = Anchor.BottomCentre, Origin = Anchor.BottomCentre, }); @@ -105,21 +106,15 @@ namespace osu.Game.Graphics.Containers foreach (var w in wavesContainer.Children) w.Show(); - this.FadeIn(100, Easing.OutQuint); contentContainer.MoveToY(0, APPEAR_DURATION, Easing.OutQuint); - - this.FadeIn(100, Easing.OutQuint); } protected override void PopOut() { - this.FadeOut(DISAPPEAR_DURATION, Easing.InQuint); - contentContainer.MoveToY(DrawHeight * 2f, DISAPPEAR_DURATION, Easing.In); - foreach (var w in wavesContainer.Children) w.Hide(); - this.FadeOut(DISAPPEAR_DURATION, Easing.InQuint); + contentContainer.MoveToY(2, DISAPPEAR_DURATION, Easing.In); } protected override void UpdateAfterChildren() diff --git a/osu.Game/Overlays/WaveOverlayContainer.cs b/osu.Game/Overlays/WaveOverlayContainer.cs index 05d3e7df0a..5059b136ee 100644 --- a/osu.Game/Overlays/WaveOverlayContainer.cs +++ b/osu.Game/Overlays/WaveOverlayContainer.cs @@ -25,13 +25,17 @@ namespace osu.Game.Overlays protected override void PopIn() { base.PopIn(); + Waves.Show(); + this.FadeIn(100, Easing.OutQuint); } protected override void PopOut() { base.PopOut(); + Waves.Hide(); + this.FadeOut(WaveContainer.DISAPPEAR_DURATION, Easing.InQuint); } } } From d27a0db45c2bfe2df8e7788c1c9b8cda5682ac2f Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 2 Jul 2019 15:21:57 +0900 Subject: [PATCH 2/7] Enforce StartHidden on relevant overlays --- osu.Game/Graphics/Containers/WaveContainer.cs | 2 ++ osu.Game/Overlays/WaveOverlayContainer.cs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/osu.Game/Graphics/Containers/WaveContainer.cs b/osu.Game/Graphics/Containers/WaveContainer.cs index 64a897088b..9050e775f7 100644 --- a/osu.Game/Graphics/Containers/WaveContainer.cs +++ b/osu.Game/Graphics/Containers/WaveContainer.cs @@ -29,6 +29,8 @@ namespace osu.Game.Graphics.Containers protected override Container Content => contentContainer; + protected override bool StartHidden => true; + public Color4 FirstWaveColour { get => firstWave.Colour; diff --git a/osu.Game/Overlays/WaveOverlayContainer.cs b/osu.Game/Overlays/WaveOverlayContainer.cs index 5059b136ee..5c87096dd4 100644 --- a/osu.Game/Overlays/WaveOverlayContainer.cs +++ b/osu.Game/Overlays/WaveOverlayContainer.cs @@ -14,6 +14,8 @@ namespace osu.Game.Overlays protected override bool BlockNonPositionalInput => true; protected override Container Content => Waves; + protected override bool StartHidden => true; + protected WaveOverlayContainer() { AddInternal(Waves = new WaveContainer From 93511266e5d771b4c2099ddd1b5b45b39b6c81b1 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 2 Jul 2019 22:33:33 +0900 Subject: [PATCH 3/7] Fix waves not displaying at all --- osu.Game/Graphics/Containers/WaveContainer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Graphics/Containers/WaveContainer.cs b/osu.Game/Graphics/Containers/WaveContainer.cs index 9050e775f7..17e4f0afd5 100644 --- a/osu.Game/Graphics/Containers/WaveContainer.cs +++ b/osu.Game/Graphics/Containers/WaveContainer.cs @@ -125,7 +125,7 @@ namespace osu.Game.Graphics.Containers // This is done as an optimization, such that invisible parts of the waves // are masked away, and thus do not consume fill rate. - wavesContainer.Height = Math.Max(0, DrawHeight - (contentContainer.DrawHeight - contentContainer.Y)); + wavesContainer.Height = Math.Max(0, DrawHeight - (contentContainer.DrawHeight - contentContainer.Y * DrawHeight)); } private class Wave : VisibilityContainer From e1d0d2666997580a47f510c088cc3d0af4046f18 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 3 Jul 2019 00:21:16 +0900 Subject: [PATCH 4/7] Add a note about local optimisation that may not be required in the future --- osu.Game/Graphics/Containers/WaveContainer.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/osu.Game/Graphics/Containers/WaveContainer.cs b/osu.Game/Graphics/Containers/WaveContainer.cs index 17e4f0afd5..c01674f5b4 100644 --- a/osu.Game/Graphics/Containers/WaveContainer.cs +++ b/osu.Game/Graphics/Containers/WaveContainer.cs @@ -125,6 +125,7 @@ namespace osu.Game.Graphics.Containers // This is done as an optimization, such that invisible parts of the waves // are masked away, and thus do not consume fill rate. + // todo: revert https://github.com/ppy/osu/commit/aff9e3617da0c8fe252169fae287e39b44575b5e after FTB is fixed on iOS. wavesContainer.Height = Math.Max(0, DrawHeight - (contentContainer.DrawHeight - contentContainer.Y * DrawHeight)); } From ccae4ce95ef77a5475ea122653bbc5f393a886e2 Mon Sep 17 00:00:00 2001 From: naoey Date: Wed, 3 Jul 2019 14:39:11 +0530 Subject: [PATCH 5/7] Fix local beatmap leaderboard displaying scores from all game modes --- osu.Game/Screens/Select/Leaderboards/BeatmapLeaderboard.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/Select/Leaderboards/BeatmapLeaderboard.cs b/osu.Game/Screens/Select/Leaderboards/BeatmapLeaderboard.cs index aafa6bb0eb..62f93afbbb 100644 --- a/osu.Game/Screens/Select/Leaderboards/BeatmapLeaderboard.cs +++ b/osu.Game/Screens/Select/Leaderboards/BeatmapLeaderboard.cs @@ -55,7 +55,9 @@ namespace osu.Game.Screens.Select.Leaderboards { if (Scope == BeatmapLeaderboardScope.Local) { - Scores = scoreManager.QueryScores(s => !s.DeletePending && s.Beatmap.ID == Beatmap.ID).OrderByDescending(s => s.TotalScore).ToArray(); + Scores = scoreManager + .QueryScores(s => !s.DeletePending && s.Beatmap.ID == Beatmap.ID && s.Ruleset.ID == ruleset.Value.ID) + .OrderByDescending(s => s.TotalScore).ToArray(); PlaceholderState = Scores.Any() ? PlaceholderState.Successful : PlaceholderState.NoScores; return null; } From b901aab19da0572328ddc6851cd18a78e91f1f0a Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 3 Jul 2019 23:06:16 +0900 Subject: [PATCH 6/7] Fix update notification not correctly restarting the game --- osu.Desktop/Updater/SquirrelUpdateManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Desktop/Updater/SquirrelUpdateManager.cs b/osu.Desktop/Updater/SquirrelUpdateManager.cs index 69064a40cb..78a1e680ec 100644 --- a/osu.Desktop/Updater/SquirrelUpdateManager.cs +++ b/osu.Desktop/Updater/SquirrelUpdateManager.cs @@ -129,7 +129,7 @@ namespace osu.Desktop.Updater Activated = () => { updateManager.PrepareUpdateAsync() - .ContinueWith(_ => Schedule(() => game.GracefullyExit())); + .ContinueWith(_ => updateManager.Schedule(() => game.GracefullyExit())); return true; } }; From 1824d2999650969f54ff50c45e4dcc150b41a5a8 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 4 Jul 2019 00:34:39 +0900 Subject: [PATCH 7/7] Update framework --- osu.Android.props | 2 +- osu.Game/osu.Game.csproj | 2 +- osu.iOS.props | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/osu.Android.props b/osu.Android.props index 8ef635fe75..400b43dbe6 100644 --- a/osu.Android.props +++ b/osu.Android.props @@ -64,6 +64,6 @@ - + diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index b59828a52e..e872cd1387 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -15,7 +15,7 @@ - + diff --git a/osu.iOS.props b/osu.iOS.props index ddbdaf3d18..a319094cb1 100644 --- a/osu.iOS.props +++ b/osu.iOS.props @@ -105,8 +105,8 @@ - - + +