From 99603ca0b67f29edc9fad584cc1e6a4e1fa5526b Mon Sep 17 00:00:00 2001 From: iiSaLMaN Date: Thu, 4 Jul 2019 04:50:49 +0300 Subject: [PATCH 01/12] Fade out game volume on exiting Invokes 'this.Exit()' on completion (simplify lines) --- osu.Game/Screens/Menu/Intro.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/Menu/Intro.cs b/osu.Game/Screens/Menu/Intro.cs index dab5066c52..2883559bbd 100644 --- a/osu.Game/Screens/Menu/Intro.cs +++ b/osu.Game/Screens/Menu/Intro.cs @@ -33,6 +33,8 @@ namespace osu.Game.Screens.Menu protected override BackgroundScreen CreateBackground() => new BackgroundScreenBlack(); + private readonly BindableDouble exitingVolumeFade = new BindableDouble(1); + private Bindable menuVoice; private Bindable menuMusic; private Track track; @@ -72,6 +74,8 @@ namespace osu.Game.Screens.Menu welcome = audio.Samples.Get(@"welcome"); seeya = audio.Samples.Get(@"seeya"); + + audio.AddAdjustment(AdjustableProperty.Volume, exitingVolumeFade); } private const double delay_step_one = 2300; @@ -161,7 +165,7 @@ namespace osu.Game.Screens.Menu else fadeOutTime = 500; - Scheduler.AddDelayed(this.Exit, fadeOutTime); + this.TransformBindableTo(exitingVolumeFade, 0, fadeOutTime).OnComplete(_ => this.Exit()); //don't want to fade out completely else we will stop running updates. Game.FadeTo(0.01f, fadeOutTime); From b53aeec90de21feca625932e2163d45ab379d757 Mon Sep 17 00:00:00 2001 From: iiSaLMaN Date: Thu, 4 Jul 2019 05:18:29 +0300 Subject: [PATCH 02/12] Move audio adjustment inside OnResuming --- osu.Game/Screens/Menu/Intro.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/osu.Game/Screens/Menu/Intro.cs b/osu.Game/Screens/Menu/Intro.cs index 2883559bbd..f6fbcf6498 100644 --- a/osu.Game/Screens/Menu/Intro.cs +++ b/osu.Game/Screens/Menu/Intro.cs @@ -35,13 +35,16 @@ namespace osu.Game.Screens.Menu private readonly BindableDouble exitingVolumeFade = new BindableDouble(1); + [Resolved] + private AudioManager audio { get; set; } + private Bindable menuVoice; private Bindable menuMusic; private Track track; private WorkingBeatmap introBeatmap; [BackgroundDependencyLoader] - private void load(AudioManager audio, OsuConfigManager config, BeatmapManager beatmaps, Framework.Game game) + private void load(OsuConfigManager config, BeatmapManager beatmaps, Framework.Game game) { menuVoice = config.GetBindable(OsuSetting.MenuVoice); menuMusic = config.GetBindable(OsuSetting.MenuMusic); @@ -74,8 +77,6 @@ namespace osu.Game.Screens.Menu welcome = audio.Samples.Get(@"welcome"); seeya = audio.Samples.Get(@"seeya"); - - audio.AddAdjustment(AdjustableProperty.Volume, exitingVolumeFade); } private const double delay_step_one = 2300; @@ -165,6 +166,7 @@ namespace osu.Game.Screens.Menu else fadeOutTime = 500; + audio.AddAdjustment(AdjustableProperty.Volume, exitingVolumeFade); this.TransformBindableTo(exitingVolumeFade, 0, fadeOutTime).OnComplete(_ => this.Exit()); //don't want to fade out completely else we will stop running updates. From 7795a16c36d3809768a72240c89ba6c64d681085 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 4 Jul 2019 11:38:25 +0900 Subject: [PATCH 03/12] Update android metadata in line with standards --- osu.Android/Properties/AndroidManifest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Android/Properties/AndroidManifest.xml b/osu.Android/Properties/AndroidManifest.xml index 326d32f7ab..0cf2b786b1 100644 --- a/osu.Android/Properties/AndroidManifest.xml +++ b/osu.Android/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@  - + From 70e2b83f294a943dca2369198d9d8a0f73b434a8 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 4 Jul 2019 11:40:05 +0900 Subject: [PATCH 04/12] Target newer api version --- osu.Android/Properties/AndroidManifest.xml | 2 +- .../Properties/AndroidManifest.xml | 2 +- .../Properties/AndroidManifest.xml | 2 +- .../Properties/AndroidManifest.xml | 2 +- .../Properties/AndroidManifest.xml | 2 +- osu.Game.Tests.Android/Properties/AndroidManifest.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/osu.Android/Properties/AndroidManifest.xml b/osu.Android/Properties/AndroidManifest.xml index 0cf2b786b1..acd21f9587 100644 --- a/osu.Android/Properties/AndroidManifest.xml +++ b/osu.Android/Properties/AndroidManifest.xml @@ -1,6 +1,6 @@  - + diff --git a/osu.Game.Rulesets.Catch.Tests.Android/Properties/AndroidManifest.xml b/osu.Game.Rulesets.Catch.Tests.Android/Properties/AndroidManifest.xml index b04b0718f5..db95e18f13 100644 --- a/osu.Game.Rulesets.Catch.Tests.Android/Properties/AndroidManifest.xml +++ b/osu.Game.Rulesets.Catch.Tests.Android/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/osu.Game.Rulesets.Mania.Tests.Android/Properties/AndroidManifest.xml b/osu.Game.Rulesets.Mania.Tests.Android/Properties/AndroidManifest.xml index c315581606..e6728c801d 100644 --- a/osu.Game.Rulesets.Mania.Tests.Android/Properties/AndroidManifest.xml +++ b/osu.Game.Rulesets.Mania.Tests.Android/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/osu.Game.Rulesets.Osu.Tests.Android/Properties/AndroidManifest.xml b/osu.Game.Rulesets.Osu.Tests.Android/Properties/AndroidManifest.xml index dac9c19477..aad907b241 100644 --- a/osu.Game.Rulesets.Osu.Tests.Android/Properties/AndroidManifest.xml +++ b/osu.Game.Rulesets.Osu.Tests.Android/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/osu.Game.Rulesets.Taiko.Tests.Android/Properties/AndroidManifest.xml b/osu.Game.Rulesets.Taiko.Tests.Android/Properties/AndroidManifest.xml index f731042a4c..cd4b74aa16 100644 --- a/osu.Game.Rulesets.Taiko.Tests.Android/Properties/AndroidManifest.xml +++ b/osu.Game.Rulesets.Taiko.Tests.Android/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/osu.Game.Tests.Android/Properties/AndroidManifest.xml b/osu.Game.Tests.Android/Properties/AndroidManifest.xml index 146f96c2a3..bb996dc5ca 100644 --- a/osu.Game.Tests.Android/Properties/AndroidManifest.xml +++ b/osu.Game.Tests.Android/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@  - + \ No newline at end of file From d2ebf296d99858c715a4e09a14150c6680589197 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 4 Jul 2019 13:07:59 +0900 Subject: [PATCH 05/12] Release with better compilation options --- osu.Android/osu.Android.csproj | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/osu.Android/osu.Android.csproj b/osu.Android/osu.Android.csproj index 42a3185cd1..ac3905a372 100644 --- a/osu.Android/osu.Android.csproj +++ b/osu.Android/osu.Android.csproj @@ -14,6 +14,11 @@ Properties\AndroidManifest.xml armeabi-v7a;x86;arm64-v8a + + cjk;mideast;other;rare;west + d8 + r8 + From 4758914f7fced0da59361bfb18d8556f5f42eaeb Mon Sep 17 00:00:00 2001 From: Morilli <35152647+Morilli@users.noreply.github.com> Date: Thu, 4 Jul 2019 15:14:15 +0200 Subject: [PATCH 06/12] Bump android TargetFrameworkVersion --- osu.Android.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Android.props b/osu.Android.props index 7b22b76e0e..5ee0573c58 100644 --- a/osu.Android.props +++ b/osu.Android.props @@ -11,7 +11,7 @@ Off True Xamarin.Android.Net.AndroidClientHandler - v8.1 + v9.0 false From 9b2ebed669aacbbfc81b46379f017c111a897c1e Mon Sep 17 00:00:00 2001 From: Joehu Date: Thu, 4 Jul 2019 08:36:34 -0700 Subject: [PATCH 07/12] Remove unused EditSongSelect file --- osu.Game/Screens/Select/EditSongSelect.cs | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 osu.Game/Screens/Select/EditSongSelect.cs diff --git a/osu.Game/Screens/Select/EditSongSelect.cs b/osu.Game/Screens/Select/EditSongSelect.cs deleted file mode 100644 index bdf5f905fe..0000000000 --- a/osu.Game/Screens/Select/EditSongSelect.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. -// See the LICENCE file in the repository root for full licence text. - -using osu.Framework.Screens; - -namespace osu.Game.Screens.Select -{ - public class EditSongSelect : SongSelect - { - protected override bool ShowFooter => false; - - protected override bool OnStart() - { - this.Exit(); - return true; - } - } -} From 5f6544eebfc913cde2c505825a37eb429311951f Mon Sep 17 00:00:00 2001 From: Joehu Date: Thu, 4 Jul 2019 12:05:07 -0700 Subject: [PATCH 08/12] Fix beatmap leaderboards requiring supporter when signed out --- osu.Game/Online/Leaderboards/Leaderboard.cs | 6 ------ osu.Game/Screens/Select/Leaderboards/BeatmapLeaderboard.cs | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/osu.Game/Online/Leaderboards/Leaderboard.cs b/osu.Game/Online/Leaderboards/Leaderboard.cs index b91de93a4a..dea2ff1a21 100644 --- a/osu.Game/Online/Leaderboards/Leaderboard.cs +++ b/osu.Game/Online/Leaderboards/Leaderboard.cs @@ -231,12 +231,6 @@ namespace osu.Game.Online.Leaderboards if (getScoresRequest == null) return; - if (api?.IsLoggedIn != true) - { - PlaceholderState = PlaceholderState.NotLoggedIn; - return; - } - getScoresRequest.Failure += e => Schedule(() => { if (e is OperationCanceledException) diff --git a/osu.Game/Screens/Select/Leaderboards/BeatmapLeaderboard.cs b/osu.Game/Screens/Select/Leaderboards/BeatmapLeaderboard.cs index 62f93afbbb..68f153a97d 100644 --- a/osu.Game/Screens/Select/Leaderboards/BeatmapLeaderboard.cs +++ b/osu.Game/Screens/Select/Leaderboards/BeatmapLeaderboard.cs @@ -62,6 +62,12 @@ namespace osu.Game.Screens.Select.Leaderboards return null; } + if (api?.IsLoggedIn != true) + { + PlaceholderState = PlaceholderState.NotLoggedIn; + return null; + } + if (Beatmap?.OnlineBeatmapID == null) { PlaceholderState = PlaceholderState.Unavailable; From ae7da2557e15e634d140340d7e0a150a0ad31eb3 Mon Sep 17 00:00:00 2001 From: Joehu Date: Thu, 4 Jul 2019 13:24:13 -0700 Subject: [PATCH 09/12] Fix initial colour of leaderboard mod filter --- .../UserInterface/OsuTabControlCheckbox.cs | 29 +++++-------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/OsuTabControlCheckbox.cs b/osu.Game/Graphics/UserInterface/OsuTabControlCheckbox.cs index 869005d05c..908fbb67bb 100644 --- a/osu.Game/Graphics/UserInterface/OsuTabControlCheckbox.cs +++ b/osu.Game/Graphics/UserInterface/OsuTabControlCheckbox.cs @@ -37,6 +37,8 @@ namespace osu.Game.Graphics.UserInterface text.Colour = AccentColour; icon.Colour = AccentColour; } + + updateFade(); } } @@ -48,28 +50,22 @@ namespace osu.Game.Graphics.UserInterface private const float transition_length = 500; - private void fadeIn() + private void updateFade() { - box.FadeIn(transition_length, Easing.OutQuint); - text.FadeColour(Color4.White, transition_length, Easing.OutQuint); - } - - private void fadeOut() - { - box.FadeOut(transition_length, Easing.OutQuint); - text.FadeColour(AccentColour, transition_length, Easing.OutQuint); + box.FadeTo(IsHovered ? 1 : 0, transition_length, Easing.OutQuint); + text.FadeColour(IsHovered ? Color4.White : AccentColour, transition_length, Easing.OutQuint); } protected override bool OnHover(HoverEvent e) { - fadeIn(); + updateFade(); return base.OnHover(e); } protected override void OnHoverLost(HoverLostEvent e) { if (!Current.Value) - fadeOut(); + updateFade(); base.OnHoverLost(e); } @@ -117,16 +113,7 @@ namespace osu.Game.Graphics.UserInterface Current.ValueChanged += selected => { - if (selected.NewValue) - { - fadeIn(); - icon.Icon = FontAwesome.Regular.CheckCircle; - } - else - { - fadeOut(); - icon.Icon = FontAwesome.Regular.Circle; - } + icon.Icon = selected.NewValue ? FontAwesome.Regular.CheckCircle : FontAwesome.Regular.Circle; }; } } From 38dceddc2710567b683144a908e1cc19374726fd Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 5 Jul 2019 10:07:45 +0900 Subject: [PATCH 10/12] Fix file ordering --- .../UserInterface/OsuTabControlCheckbox.cs | 59 +++++++++---------- 1 file changed, 28 insertions(+), 31 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/OsuTabControlCheckbox.cs b/osu.Game/Graphics/UserInterface/OsuTabControlCheckbox.cs index 908fbb67bb..8134cfb42d 100644 --- a/osu.Game/Graphics/UserInterface/OsuTabControlCheckbox.cs +++ b/osu.Game/Graphics/UserInterface/OsuTabControlCheckbox.cs @@ -50,33 +50,6 @@ namespace osu.Game.Graphics.UserInterface private const float transition_length = 500; - private void updateFade() - { - box.FadeTo(IsHovered ? 1 : 0, transition_length, Easing.OutQuint); - text.FadeColour(IsHovered ? Color4.White : AccentColour, transition_length, Easing.OutQuint); - } - - protected override bool OnHover(HoverEvent e) - { - updateFade(); - return base.OnHover(e); - } - - protected override void OnHoverLost(HoverLostEvent e) - { - if (!Current.Value) - updateFade(); - - base.OnHoverLost(e); - } - - [BackgroundDependencyLoader] - private void load(OsuColour colours) - { - if (accentColour == null) - AccentColour = colours.Blue; - } - public OsuTabControlCheckbox() { AutoSizeAxes = Axes.Both; @@ -111,10 +84,34 @@ namespace osu.Game.Graphics.UserInterface } }; - Current.ValueChanged += selected => - { - icon.Icon = selected.NewValue ? FontAwesome.Regular.CheckCircle : FontAwesome.Regular.Circle; - }; + Current.ValueChanged += selected => { icon.Icon = selected.NewValue ? FontAwesome.Regular.CheckCircle : FontAwesome.Regular.Circle; }; + } + + [BackgroundDependencyLoader] + private void load(OsuColour colours) + { + if (accentColour == null) + AccentColour = colours.Blue; + } + + protected override bool OnHover(HoverEvent e) + { + updateFade(); + return base.OnHover(e); + } + + protected override void OnHoverLost(HoverLostEvent e) + { + if (!Current.Value) + updateFade(); + + base.OnHoverLost(e); + } + + private void updateFade() + { + box.FadeTo(IsHovered ? 1 : 0, transition_length, Easing.OutQuint); + text.FadeColour(IsHovered ? Color4.White : AccentColour, transition_length, Easing.OutQuint); } } } From a30f0c03bb071dbb4d959dc7da0c09ed4314ce51 Mon Sep 17 00:00:00 2001 From: iiSaLMaN Date: Fri, 5 Jul 2019 05:32:30 +0300 Subject: [PATCH 11/12] Fix incorrect xmldoc --- osu.Game/Online/DownloadTrackingComposite.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Online/DownloadTrackingComposite.cs b/osu.Game/Online/DownloadTrackingComposite.cs index 786afdf450..62d6efcb6f 100644 --- a/osu.Game/Online/DownloadTrackingComposite.cs +++ b/osu.Game/Online/DownloadTrackingComposite.cs @@ -11,7 +11,7 @@ using osu.Game.Online.API; namespace osu.Game.Online { /// - /// A component which tracks a beatmap through potential download/import/deletion. + /// A component which tracks a through potential download/import/deletion. /// public abstract class DownloadTrackingComposite : CompositeDrawable where TModel : class, IEquatable @@ -22,7 +22,7 @@ namespace osu.Game.Online private TModelManager manager; /// - /// Holds the current download state of the beatmap, whether is has already been downloaded, is in progress, or is not downloaded. + /// Holds the current download state of the , whether is has already been downloaded, is in progress, or is not downloaded. /// protected readonly Bindable State = new Bindable(); From df7d31350c8fe8e22478d88f5a57da0b83d88a30 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 5 Jul 2019 14:47:55 +0900 Subject: [PATCH 12/12] Stop import failures from being added to the imported model list --- osu.Game/Database/ArchiveModelManager.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/osu.Game/Database/ArchiveModelManager.cs b/osu.Game/Database/ArchiveModelManager.cs index 01455e7d50..7d81b95203 100644 --- a/osu.Game/Database/ArchiveModelManager.cs +++ b/osu.Game/Database/ArchiveModelManager.cs @@ -114,7 +114,8 @@ namespace osu.Game.Database lock (imported) { - imported.Add(model); + if (model != null) + imported.Add(model); current++; notification.Text = $"Imported {current} of {paths.Length} {HumanisedModelName}s"; @@ -140,7 +141,7 @@ namespace osu.Game.Database { notification.CompletionText = imported.Count == 1 ? $"Imported {imported.First()}!" - : $"Imported {current} {HumanisedModelName}s!"; + : $"Imported {imported.Count} {HumanisedModelName}s!"; if (imported.Count > 0 && PresentImport != null) {