From 4f0aff3d9c2ad06df4c0197644f51cf6ec63df0c Mon Sep 17 00:00:00 2001 From: andy840119 Date: Fri, 14 Jun 2019 01:12:56 +0900 Subject: [PATCH 01/32] hide label when mod is empty --- osu.Game/Overlays/Mods/ModSection.cs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/osu.Game/Overlays/Mods/ModSection.cs b/osu.Game/Overlays/Mods/ModSection.cs index 50400e254f..9d9bb2ba6e 100644 --- a/osu.Game/Overlays/Mods/ModSection.cs +++ b/osu.Game/Overlays/Mods/ModSection.cs @@ -50,6 +50,34 @@ namespace osu.Game.Overlays.Mods ButtonsContainer.Children = modContainers; buttons = modContainers.OfType().ToArray(); + + Expanded = value.Any(); + } + } + + private bool expanded = true; + + public bool Expanded + { + set + { + if (expanded == value) return; + + expanded = value; + + this.ClearTransforms(); + + if (expanded) + { + this.AutoSizeAxes = Axes.Y; + this.headerLabel.FadeIn(200); + } + else + { + this.AutoSizeAxes = Axes.None; + this.headerLabel.FadeOut(200); + this.ResizeHeightTo(0, 200, Easing.OutQuint); + } } } From 3a14794c431a1fb13a09b5e3ec5eb77e586006ef Mon Sep 17 00:00:00 2001 From: andy840119 Date: Fri, 14 Jun 2019 01:43:20 +0900 Subject: [PATCH 02/32] use show/hide instead because FillFlowContainer's spacing --- osu.Game/Overlays/Mods/ModSection.cs | 19 +++---------------- osu.Game/Overlays/Mods/ModSelectOverlay.cs | 2 ++ 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/osu.Game/Overlays/Mods/ModSection.cs b/osu.Game/Overlays/Mods/ModSection.cs index 9d9bb2ba6e..7b032f1fcf 100644 --- a/osu.Game/Overlays/Mods/ModSection.cs +++ b/osu.Game/Overlays/Mods/ModSection.cs @@ -51,32 +51,19 @@ namespace osu.Game.Overlays.Mods ButtonsContainer.Children = modContainers; buttons = modContainers.OfType().ToArray(); - Expanded = value.Any(); - } - } - - private bool expanded = true; - - public bool Expanded - { - set - { - if (expanded == value) return; - - expanded = value; - - this.ClearTransforms(); + var expanded = value.Any(); if (expanded) { this.AutoSizeAxes = Axes.Y; this.headerLabel.FadeIn(200); + Show(); } else { this.AutoSizeAxes = Axes.None; this.headerLabel.FadeOut(200); - this.ResizeHeightTo(0, 200, Easing.OutQuint); + this.ResizeHeightTo(0, 200, Easing.OutQuint).OnComplete((c) => Hide()); } } } diff --git a/osu.Game/Overlays/Mods/ModSelectOverlay.cs b/osu.Game/Overlays/Mods/ModSelectOverlay.cs index 8e5c9588ce..9ff320841a 100644 --- a/osu.Game/Overlays/Mods/ModSelectOverlay.cs +++ b/osu.Game/Overlays/Mods/ModSelectOverlay.cs @@ -172,6 +172,8 @@ namespace osu.Game.Overlays.Mods AutoSizeAxes = Axes.Y, Spacing = new Vector2(0f, 10f), Width = content_width, + LayoutDuration = 200, + LayoutEasing = Easing.OutQuint, Children = new ModSection[] { new DifficultyReductionSection { Action = modButtonPressed }, From c30e4677179f426e066175f62b84cc6b49fd86c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=82=BA=E4=BB=80=E9=BA=BC?= Date: Fri, 14 Jun 2019 11:12:30 +0800 Subject: [PATCH 03/32] oops --- osu.Game/Overlays/Mods/ModSection.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/osu.Game/Overlays/Mods/ModSection.cs b/osu.Game/Overlays/Mods/ModSection.cs index 7b032f1fcf..07b1c53b3b 100644 --- a/osu.Game/Overlays/Mods/ModSection.cs +++ b/osu.Game/Overlays/Mods/ModSection.cs @@ -55,15 +55,15 @@ namespace osu.Game.Overlays.Mods if (expanded) { - this.AutoSizeAxes = Axes.Y; - this.headerLabel.FadeIn(200); + AutoSizeAxes = Axes.Y; + headerLabel.FadeIn(200); Show(); } else { - this.AutoSizeAxes = Axes.None; - this.headerLabel.FadeOut(200); - this.ResizeHeightTo(0, 200, Easing.OutQuint).OnComplete((c) => Hide()); + AutoSizeAxes = Axes.None; + headerLabel.FadeOut(200); + this.ResizeHeightTo(0, 200, Easing.OutQuint).OnComplete(c => Hide()); } } } From 0db9816321c893c5cdb073e763819f83c1ed0a56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=82=BA=E4=BB=80=E9=BA=BC?= Date: Fri, 14 Jun 2019 11:23:41 +0800 Subject: [PATCH 04/32] expanded -> expand --- osu.Game/Overlays/Mods/ModSection.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Overlays/Mods/ModSection.cs b/osu.Game/Overlays/Mods/ModSection.cs index 07b1c53b3b..34dede62de 100644 --- a/osu.Game/Overlays/Mods/ModSection.cs +++ b/osu.Game/Overlays/Mods/ModSection.cs @@ -51,9 +51,9 @@ namespace osu.Game.Overlays.Mods ButtonsContainer.Children = modContainers; buttons = modContainers.OfType().ToArray(); - var expanded = value.Any(); + var expand = value.Any(); - if (expanded) + if (expand) { AutoSizeAxes = Axes.Y; headerLabel.FadeIn(200); From 9114c8dee7ee96f1a6bb81fcc3312350f8c54e14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=82=BA=E4=BB=80=E9=BA=BC?= Date: Fri, 14 Jun 2019 11:44:03 +0800 Subject: [PATCH 05/32] remve unnecessary effect. --- osu.Game/Overlays/Mods/ModSection.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/osu.Game/Overlays/Mods/ModSection.cs b/osu.Game/Overlays/Mods/ModSection.cs index 34dede62de..c110f58b7a 100644 --- a/osu.Game/Overlays/Mods/ModSection.cs +++ b/osu.Game/Overlays/Mods/ModSection.cs @@ -55,15 +55,13 @@ namespace osu.Game.Overlays.Mods if (expand) { - AutoSizeAxes = Axes.Y; headerLabel.FadeIn(200); Show(); } else { - AutoSizeAxes = Axes.None; headerLabel.FadeOut(200); - this.ResizeHeightTo(0, 200, Easing.OutQuint).OnComplete(c => Hide()); + Hide(); } } } From 1a731782603d6eebd7918cabf2b2d4d56e183226 Mon Sep 17 00:00:00 2001 From: andy840119 Date: Sat, 15 Jun 2019 13:28:03 +0800 Subject: [PATCH 06/32] using FadeTo() instead of FadeIn()/FadeOut() --- osu.Game/Overlays/Mods/ModSection.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/osu.Game/Overlays/Mods/ModSection.cs b/osu.Game/Overlays/Mods/ModSection.cs index c110f58b7a..1eaa3deea4 100644 --- a/osu.Game/Overlays/Mods/ModSection.cs +++ b/osu.Game/Overlays/Mods/ModSection.cs @@ -52,17 +52,12 @@ namespace osu.Game.Overlays.Mods buttons = modContainers.OfType().ToArray(); var expand = value.Any(); - if (expand) - { - headerLabel.FadeIn(200); Show(); - } else - { - headerLabel.FadeOut(200); Hide(); - } + + headerLabel.FadeTo(expand ? 1 : 0, 200); } } From 84b4e877f8fa443d79969c7c25bf89847781b50b Mon Sep 17 00:00:00 2001 From: andy840119 Date: Sun, 16 Jun 2019 13:27:01 +0900 Subject: [PATCH 07/32] using FadeTo instead of show/hide headerLabel.FadeTo() is still remain because effect can be visible when expand== true --- osu.Game/Overlays/Mods/ModSection.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/osu.Game/Overlays/Mods/ModSection.cs b/osu.Game/Overlays/Mods/ModSection.cs index 1eaa3deea4..155e8ebb75 100644 --- a/osu.Game/Overlays/Mods/ModSection.cs +++ b/osu.Game/Overlays/Mods/ModSection.cs @@ -52,12 +52,8 @@ namespace osu.Game.Overlays.Mods buttons = modContainers.OfType().ToArray(); var expand = value.Any(); - if (expand) - Show(); - else - Hide(); - headerLabel.FadeTo(expand ? 1 : 0, 200); + this.FadeTo(expand ? 1 : 0); } } From bc35a30a257e3509fd360c43c55684dfc622b5f2 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Mon, 17 Jun 2019 12:27:53 +0900 Subject: [PATCH 08/32] Fix audio being dimmed during multiplayer --- osu.Game/Screens/Multi/Multiplayer.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/osu.Game/Screens/Multi/Multiplayer.cs b/osu.Game/Screens/Multi/Multiplayer.cs index 9e5c11e098..9939915e16 100644 --- a/osu.Game/Screens/Multi/Multiplayer.cs +++ b/osu.Game/Screens/Multi/Multiplayer.cs @@ -255,7 +255,6 @@ namespace osu.Game.Screens.Multi if (!track.IsRunning) { - game.Audio.AddItem(track); track.Seek(Beatmap.Value.Metadata.PreviewTime); track.Start(); } From c1d2fff651b090da3337f763324f77d516c9d47e Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Mon, 17 Jun 2019 12:44:19 +0900 Subject: [PATCH 09/32] Use RestartPoint --- osu.Game/Screens/Multi/Multiplayer.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/osu.Game/Screens/Multi/Multiplayer.cs b/osu.Game/Screens/Multi/Multiplayer.cs index 9939915e16..c76f132395 100644 --- a/osu.Game/Screens/Multi/Multiplayer.cs +++ b/osu.Game/Screens/Multi/Multiplayer.cs @@ -251,13 +251,11 @@ namespace osu.Game.Screens.Multi if (track != null) { + track.RestartPoint = Beatmap.Value.Metadata.PreviewTime; track.Looping = true; if (!track.IsRunning) - { - track.Seek(Beatmap.Value.Metadata.PreviewTime); - track.Start(); - } + track.Restart(); } createButton.Hide(); From d7d6feb00182330a55bb77b6032703546e27b892 Mon Sep 17 00:00:00 2001 From: Lucas A Date: Mon, 17 Jun 2019 12:31:23 +0200 Subject: [PATCH 10/32] Fade volume in / out when game window becomes active / inactive --- osu.Game/OsuGame.cs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index d5fbcdfee3..978d9cc20c 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -181,7 +181,7 @@ namespace osu.Game configSkin.ValueChanged += skinId => SkinManager.CurrentSkinInfo.Value = SkinManager.Query(s => s.ID == skinId.NewValue) ?? SkinInfo.Default; configSkin.TriggerChange(); - LocalConfig.BindWith(OsuSetting.VolumeInactive, inactiveVolumeAdjust); + LocalConfig.BindWith(OsuSetting.VolumeInactive, inactiveVolume); IsActive.BindValueChanged(active => updateActiveState(active.NewValue), true); } @@ -686,14 +686,22 @@ namespace osu.Game return false; } - private readonly BindableDouble inactiveVolumeAdjust = new BindableDouble(); + private readonly BindableDouble inactiveVolume = new BindableDouble(); + + private readonly BindableDouble inactiveVolAdjust = new BindableDouble(); private void updateActiveState(bool isActive) { if (isActive) - Audio.RemoveAdjustment(AdjustableProperty.Volume, inactiveVolumeAdjust); + { + this.TransformBindableTo(inactiveVolAdjust, 1, 750, Easing.In) + .Finally(_ => Audio.RemoveAdjustment(AdjustableProperty.Volume, inactiveVolAdjust)); //wait for the transition to finish to remove the inactive audio adjustement + } else - Audio.AddAdjustment(AdjustableProperty.Volume, inactiveVolumeAdjust); + { + Audio.AddAdjustment(AdjustableProperty.Volume, inactiveVolAdjust); + this.TransformBindableTo(inactiveVolAdjust, inactiveVolume.Value, 750, Easing.Out); + } } public bool OnReleased(GlobalAction action) => false; From ad4c9babe791346402a193c0de2dd4f5d4c10b8e Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 17 Jun 2019 23:24:52 +0900 Subject: [PATCH 11/32] Adjust naming and transitions --- osu.Game/OsuGame.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index 978d9cc20c..7f9da9a645 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -181,7 +181,7 @@ namespace osu.Game configSkin.ValueChanged += skinId => SkinManager.CurrentSkinInfo.Value = SkinManager.Query(s => s.ID == skinId.NewValue) ?? SkinInfo.Default; configSkin.TriggerChange(); - LocalConfig.BindWith(OsuSetting.VolumeInactive, inactiveVolume); + LocalConfig.BindWith(OsuSetting.VolumeInactive, userInactiveVolume); IsActive.BindValueChanged(active => updateActiveState(active.NewValue), true); } @@ -686,21 +686,21 @@ namespace osu.Game return false; } - private readonly BindableDouble inactiveVolume = new BindableDouble(); + private readonly BindableDouble userInactiveVolume = new BindableDouble(); - private readonly BindableDouble inactiveVolAdjust = new BindableDouble(); + private readonly BindableDouble inactiveVolumeFade = new BindableDouble(); private void updateActiveState(bool isActive) { if (isActive) { - this.TransformBindableTo(inactiveVolAdjust, 1, 750, Easing.In) - .Finally(_ => Audio.RemoveAdjustment(AdjustableProperty.Volume, inactiveVolAdjust)); //wait for the transition to finish to remove the inactive audio adjustement + this.TransformBindableTo(inactiveVolumeFade, 1, 500, Easing.OutQuint) + .Finally(_ => Audio.RemoveAdjustment(AdjustableProperty.Volume, inactiveVolumeFade)); //wait for the transition to finish to remove the inactive audio adjustement } else { - Audio.AddAdjustment(AdjustableProperty.Volume, inactiveVolAdjust); - this.TransformBindableTo(inactiveVolAdjust, inactiveVolume.Value, 750, Easing.Out); + Audio.AddAdjustment(AdjustableProperty.Volume, inactiveVolumeFade); + this.TransformBindableTo(inactiveVolumeFade, userInactiveVolume.Value, 1500, Easing.OutSine); } } From 3a04684efb21ace6ff19d3d9226c04cfc6583f71 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 17 Jun 2019 23:25:16 +0900 Subject: [PATCH 12/32] Add region --- osu.Game/OsuGame.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index 7f9da9a645..aa891f6c87 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -686,6 +686,8 @@ namespace osu.Game return false; } + #region Inactive audio dimming + private readonly BindableDouble userInactiveVolume = new BindableDouble(); private readonly BindableDouble inactiveVolumeFade = new BindableDouble(); @@ -704,6 +706,8 @@ namespace osu.Game } } + #endregion + public bool OnReleased(GlobalAction action) => false; private Container overlayContent; From 04dc1c1744da9f4e7c1efe33da66192d6d6c8d51 Mon Sep 17 00:00:00 2001 From: Lucas A Date: Mon, 17 Jun 2019 16:44:53 +0200 Subject: [PATCH 13/32] Fix typo in comment Co-Authored-By: Joseph Madamba --- osu.Game/OsuGame.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index aa891f6c87..f38eecef81 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -697,7 +697,7 @@ namespace osu.Game if (isActive) { this.TransformBindableTo(inactiveVolumeFade, 1, 500, Easing.OutQuint) - .Finally(_ => Audio.RemoveAdjustment(AdjustableProperty.Volume, inactiveVolumeFade)); //wait for the transition to finish to remove the inactive audio adjustement + .Finally(_ => Audio.RemoveAdjustment(AdjustableProperty.Volume, inactiveVolumeFade)); //wait for the transition to finish to remove the inactive audio adjustment } else { From 07ea0f9755268e163c282847f4f01b5106936c4f Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 18 Jun 2019 14:16:54 +0900 Subject: [PATCH 14/32] Make OsuButton non-abstract again --- osu.Game/Graphics/UserInterface/OsuButton.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/OsuButton.cs b/osu.Game/Graphics/UserInterface/OsuButton.cs index 494d4e4262..7a27f825f6 100644 --- a/osu.Game/Graphics/UserInterface/OsuButton.cs +++ b/osu.Game/Graphics/UserInterface/OsuButton.cs @@ -17,11 +17,11 @@ namespace osu.Game.Graphics.UserInterface /// /// A button with added default sound effects. /// - public abstract class OsuButton : Button + public class OsuButton : Button { private Box hover; - protected OsuButton() + public OsuButton() { Height = 40; From 5bb8649f3b3502707db16c9a5963d74b7f98039a Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 18 Jun 2019 14:22:59 +0900 Subject: [PATCH 15/32] Remove unused property from chat message --- osu.Game/Online/Chat/Message.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/osu.Game/Online/Chat/Message.cs b/osu.Game/Online/Chat/Message.cs index 62f20daddf..2e41038a59 100644 --- a/osu.Game/Online/Chat/Message.cs +++ b/osu.Game/Online/Chat/Message.cs @@ -13,10 +13,6 @@ namespace osu.Game.Online.Chat [JsonProperty(@"message_id")] public readonly long? Id; - //todo: this should be inside sender. - [JsonProperty(@"sender_id")] - public long UserId; - [JsonProperty(@"channel_id")] public long ChannelId; From 6823ba1ab08ce335f08b7b5a82c8c715cce2e315 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 18 Jun 2019 14:24:44 +0900 Subject: [PATCH 16/32] Unbind from previous bindable when rebinding a SettingsItem --- osu.Game/Overlays/Settings/SettingsItem.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/osu.Game/Overlays/Settings/SettingsItem.cs b/osu.Game/Overlays/Settings/SettingsItem.cs index 4776cd6442..ae840c8c00 100644 --- a/osu.Game/Overlays/Settings/SettingsItem.cs +++ b/osu.Game/Overlays/Settings/SettingsItem.cs @@ -63,6 +63,9 @@ namespace osu.Game.Overlays.Settings set { + if (bindable != null) + controlWithCurrent?.Current.UnbindFrom(bindable); + bindable = value; controlWithCurrent?.Current.BindTo(bindable); From 2d20c088f7ab9d7e39c721efe760430cb20b9cfe Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 18 Jun 2019 18:31:42 +0900 Subject: [PATCH 17/32] Remove test which is failing due to magic numbers --- .../SongSelect/TestScenePlaySongSelect.cs | 31 ------------------- 1 file changed, 31 deletions(-) diff --git a/osu.Game.Tests/Visual/SongSelect/TestScenePlaySongSelect.cs b/osu.Game.Tests/Visual/SongSelect/TestScenePlaySongSelect.cs index 738b7f14f3..962e0fb362 100644 --- a/osu.Game.Tests/Visual/SongSelect/TestScenePlaySongSelect.cs +++ b/osu.Game.Tests/Visual/SongSelect/TestScenePlaySongSelect.cs @@ -214,37 +214,6 @@ namespace osu.Game.Tests.Visual.SongSelect AddAssert("start not requested", () => !startRequested); } - [Test] - public void TestAddNewBeatmapWhileSelectingRandom() - { - const int test_count = 10; - int beatmapChangedCount = 0; - int debounceCount = 0; - createSongSelect(); - AddStep("Setup counters", () => - { - beatmapChangedCount = 0; - debounceCount = 0; - songSelect.Carousel.SelectionChanged += _ => beatmapChangedCount++; - }); - AddRepeatStep($"Create beatmaps {test_count} times", () => - { - importForRuleset(0); - - Scheduler.AddDelayed(() => - { - // Wait for debounce - songSelect.Carousel.SelectNextRandom(); - ++debounceCount; - }, 400); - }, test_count); - - AddUntilStep("Debounce limit reached", () => debounceCount == test_count); - - // The selected beatmap should have changed an additional 2 times since both initially loading songselect and the first import also triggers selectionChanged - AddAssert($"Beatmap changed {test_count + 2} times", () => beatmapChangedCount == test_count + 2); - } - [Test] public void TestHideSetSelectsCorrectBeatmap() { From 03d560ed4127f97a153c7ef30edfdd2b27f5f2de Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Tue, 18 Jun 2019 19:13:21 +0300 Subject: [PATCH 18/32] Initial implementation --- osu.Game/Overlays/Profile/Header/BottomHeaderContainer.cs | 7 ++++++- osu.Game/Users/User.cs | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/osu.Game/Overlays/Profile/Header/BottomHeaderContainer.cs b/osu.Game/Overlays/Profile/Header/BottomHeaderContainer.cs index ffbb9ad218..7da7293c6c 100644 --- a/osu.Game/Overlays/Profile/Header/BottomHeaderContainer.cs +++ b/osu.Game/Overlays/Profile/Header/BottomHeaderContainer.cs @@ -87,7 +87,12 @@ namespace osu.Game.Overlays.Profile.Header addSpacer(topLinkContainer); - if (user.LastVisit.HasValue) + if (user.IsOnline) + { + topLinkContainer.AddText("Currently online"); + addSpacer(topLinkContainer); + } + else if(user.LastVisit.HasValue) { topLinkContainer.AddText("Last seen "); topLinkContainer.AddText(new DrawableDate(user.LastVisit.Value), embolden); diff --git a/osu.Game/Users/User.cs b/osu.Game/Users/User.cs index c3ecd62e10..df41e194b0 100644 --- a/osu.Game/Users/User.cs +++ b/osu.Game/Users/User.cs @@ -78,6 +78,9 @@ namespace osu.Game.Users [JsonProperty(@"is_active")] public bool Active; + [JsonProperty(@"is_online")] + public bool IsOnline; + [JsonProperty(@"pm_friends_only")] public bool PMFriendsOnly; From a5adc8983920d97b5488c5a59be6410b954bb99c Mon Sep 17 00:00:00 2001 From: KingLuigi4932 Date: Tue, 18 Jun 2019 20:37:56 +0300 Subject: [PATCH 19/32] Update framework --- osu.Game/osu.Game.csproj | 2 +- osu.iOS.props | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 957d365724..9dd8c8572e 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 9b146fa490..1482b6ed03 100644 --- a/osu.iOS.props +++ b/osu.iOS.props @@ -105,8 +105,8 @@ - - + + From 2fb1052a1ef2fbd7ff4d0a8a3359abc68bc6f29d Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Tue, 18 Jun 2019 21:04:36 +0300 Subject: [PATCH 20/32] Add missing space --- osu.Game/Overlays/Profile/Header/BottomHeaderContainer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Overlays/Profile/Header/BottomHeaderContainer.cs b/osu.Game/Overlays/Profile/Header/BottomHeaderContainer.cs index 7da7293c6c..e7f7c2f490 100644 --- a/osu.Game/Overlays/Profile/Header/BottomHeaderContainer.cs +++ b/osu.Game/Overlays/Profile/Header/BottomHeaderContainer.cs @@ -92,7 +92,7 @@ namespace osu.Game.Overlays.Profile.Header topLinkContainer.AddText("Currently online"); addSpacer(topLinkContainer); } - else if(user.LastVisit.HasValue) + else if (user.LastVisit.HasValue) { topLinkContainer.AddText("Last seen "); topLinkContainer.AddText(new DrawableDate(user.LastVisit.Value), embolden); From 6426983de0d20fc89f31504f8ed20fbd4ece662b Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 19 Jun 2019 13:15:58 +0900 Subject: [PATCH 21/32] Move logic out of update (and simplify, hopefully) --- osu.Game/Screens/Multi/Multiplayer.cs | 98 ++++++++++++++++----------- 1 file changed, 59 insertions(+), 39 deletions(-) diff --git a/osu.Game/Screens/Multi/Multiplayer.cs b/osu.Game/Screens/Multi/Multiplayer.cs index c76f132395..5252b41dfd 100644 --- a/osu.Game/Screens/Multi/Multiplayer.cs +++ b/osu.Game/Screens/Multi/Multiplayer.cs @@ -9,6 +9,7 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; using osu.Framework.Logging; using osu.Framework.Screens; +using osu.Game.Beatmaps; using osu.Game.Graphics; using osu.Game.Graphics.Backgrounds; using osu.Game.Graphics.Containers; @@ -185,6 +186,28 @@ namespace osu.Game.Screens.Multi { this.FadeIn(); waves.Show(); + + beginHandlingTrack(); + } + + public override void OnResuming(IScreen last) + { + this.FadeIn(250); + this.ScaleTo(1, 250, Easing.OutSine); + + base.OnResuming(last); + + beginHandlingTrack(); + } + + public override void OnSuspending(IScreen next) + { + this.ScaleTo(1.1f, 250, Easing.InSine); + this.FadeOut(250); + + endHandlingTrack(); + + roomManager.TimeBetweenPolls = 0; } public override bool OnExiting(IScreen next) @@ -193,12 +216,10 @@ namespace osu.Game.Screens.Multi this.Delay(WaveContainer.DISAPPEAR_DURATION).FadeOut(); - cancelLooping(); - if (screenStack.CurrentScreen != null) loungeSubScreen.MakeCurrent(); - updatePollingRate(isIdle.Value); + endHandlingTrack(); base.OnExiting(next); return false; @@ -212,42 +233,44 @@ namespace osu.Game.Screens.Multi logo.Delay(WaveContainer.DISAPPEAR_DURATION / 2).FadeOut(); } - public override void OnResuming(IScreen last) + private void beginHandlingTrack() { - this.FadeIn(250); - this.ScaleTo(1, 250, Easing.OutSine); - - base.OnResuming(last); - - updatePollingRate(isIdle.Value); + Beatmap.BindValueChanged(updateTrack, true); } - public override void OnSuspending(IScreen next) + private void endHandlingTrack() { - this.ScaleTo(1.1f, 250, Easing.InSine); - this.FadeOut(250); - cancelLooping(); - roomManager.TimeBetweenPolls = 0; + Beatmap.ValueChanged -= updateTrack; } - private void cancelLooping() - { - var track = Beatmap?.Value?.Track; + private void screenPushed(IScreen lastScreen, IScreen newScreen) => subScreenChanged(newScreen); - if (track != null) - track.Looping = false; + private void screenExited(IScreen lastScreen, IScreen newScreen) + { + subScreenChanged(newScreen); + + if (screenStack.CurrentScreen == null && this.IsCurrentScreen()) + this.Exit(); } - protected override void Update() + private void subScreenChanged(IScreen newScreen) { - base.Update(); + updatePollingRate(isIdle.Value); + createButton.FadeTo(newScreen is MatchSubScreen ? 0 : 1, 200); - if (!this.IsCurrentScreen()) return; + updateTrack(); + } - if (screenStack.CurrentScreen is MatchSubScreen) + private void updateTrack(ValueChangedEvent _ = null) + { + bool isMatch = screenStack.CurrentScreen is MatchSubScreen; + + Beatmap.Disabled = isMatch; + + if (isMatch) { - var track = Beatmap.Value.Track; + var track = Beatmap.Value?.Track; if (track != null) { @@ -257,25 +280,22 @@ namespace osu.Game.Screens.Multi if (!track.IsRunning) track.Restart(); } - - createButton.Hide(); } - else if (screenStack.CurrentScreen is LoungeSubScreen) - createButton.Show(); + else + { + cancelLooping(); + } } - private void screenPushed(IScreen lastScreen, IScreen newScreen) - => updatePollingRate(isIdle.Value); - - private void screenExited(IScreen lastScreen, IScreen newScreen) + private void cancelLooping() { - if (lastScreen is MatchSubScreen) - cancelLooping(); + var track = Beatmap?.Value?.Track; - updatePollingRate(isIdle.Value); - - if (screenStack.CurrentScreen == null && this.IsCurrentScreen()) - this.Exit(); + if (track != null) + { + track.Looping = false; + track.RestartPoint = 0; + } } protected override void Dispose(bool isDisposing) From f26fe53feb5c1d92c97a207a03a655974eec45e8 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 19 Jun 2019 13:16:19 +0900 Subject: [PATCH 22/32] Fix startup crash if main menu does not load fast enough --- osu.Game/Screens/Menu/MainMenu.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Screens/Menu/MainMenu.cs b/osu.Game/Screens/Menu/MainMenu.cs index 3afe9b9371..c81f6ae8ea 100644 --- a/osu.Game/Screens/Menu/MainMenu.cs +++ b/osu.Game/Screens/Menu/MainMenu.cs @@ -28,7 +28,7 @@ namespace osu.Game.Screens.Menu { private ButtonSystem buttons; - public override bool HideOverlaysOnEnter => buttons.State == ButtonSystemState.Initial; + public override bool HideOverlaysOnEnter => buttons == null || buttons.State == ButtonSystemState.Initial; protected override bool AllowBackButton => buttons.State != ButtonSystemState.Initial && host.CanExit; From e16de58450ce1b1eb3d289576bba76092d54301d Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Wed, 19 Jun 2019 12:34:01 +0300 Subject: [PATCH 23/32] Add a testcase --- .../Visual/Online/TestSceneUserProfileHeader.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/osu.Game.Tests/Visual/Online/TestSceneUserProfileHeader.cs b/osu.Game.Tests/Visual/Online/TestSceneUserProfileHeader.cs index d9230090fc..2285c9b799 100644 --- a/osu.Game.Tests/Visual/Online/TestSceneUserProfileHeader.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneUserProfileHeader.cs @@ -39,13 +39,27 @@ namespace osu.Game.Tests.Visual.Online header = new ProfileHeader(); Add(header); - AddStep("Show offline dummy", () => header.User.Value = TestSceneUserProfileOverlay.TEST_USER); + AddStep("Show test dummy", () => header.User.Value = TestSceneUserProfileOverlay.TEST_USER); AddStep("Show null dummy", () => header.User.Value = new User { Username = "Null" }); + AddStep("Show online dummy", () => header.User.Value = new User + { + Username = "IAmOnline", + LastVisit = DateTimeOffset.Now, + IsOnline = true, + }); + + AddStep("Show offline dummy", () => header.User.Value = new User + { + Username = "IAmOffline", + LastVisit = DateTimeOffset.Now, + IsOnline = false, + }); + addOnlineStep("Show ppy", new User { Username = @"peppy", From 5fb4f2fadf6a59aadca7052d884fd23f986ca367 Mon Sep 17 00:00:00 2001 From: iiSaLMaN Date: Wed, 19 Jun 2019 17:38:43 +0300 Subject: [PATCH 24/32] Add TOP_PADDING --- osu.Game/Overlays/BeatmapSetOverlay.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/osu.Game/Overlays/BeatmapSetOverlay.cs b/osu.Game/Overlays/BeatmapSetOverlay.cs index 1e687267a3..205909ce7d 100644 --- a/osu.Game/Overlays/BeatmapSetOverlay.cs +++ b/osu.Game/Overlays/BeatmapSetOverlay.cs @@ -24,6 +24,7 @@ namespace osu.Game.Overlays private const int fade_duration = 300; public const float X_PADDING = 40; + public const float TOP_PADDING = 25; public const float RIGHT_WIDTH = 275; private readonly Header header; From 15229f3a239fe31c3e765d18157a305ffe7cf023 Mon Sep 17 00:00:00 2001 From: iiSaLMaN Date: Wed, 19 Jun 2019 17:45:39 +0300 Subject: [PATCH 25/32] Make header expandable --- osu.Game/Overlays/BeatmapSet/Header.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/osu.Game/Overlays/BeatmapSet/Header.cs b/osu.Game/Overlays/BeatmapSet/Header.cs index a0f71d05c0..89b0d94783 100644 --- a/osu.Game/Overlays/BeatmapSet/Header.cs +++ b/osu.Game/Overlays/BeatmapSet/Header.cs @@ -45,7 +45,7 @@ namespace osu.Game.Overlays.BeatmapSet ExternalLinkButton externalLink; RelativeSizeAxes = Axes.X; - Height = 400; + AutoSizeAxes = Axes.Y; Masking = true; EdgeEffect = new EdgeEffectParameters @@ -72,7 +72,8 @@ namespace osu.Game.Overlays.BeatmapSet }, new Container { - RelativeSizeAxes = Axes.Both, + RelativeSizeAxes = Axes.X, + AutoSizeAxes = Axes.Y, Padding = new MarginPadding { Top = tabs_height }, Children = new Drawable[] { @@ -94,18 +95,20 @@ namespace osu.Game.Overlays.BeatmapSet }, new Container { - RelativeSizeAxes = Axes.Both, + RelativeSizeAxes = Axes.X, + AutoSizeAxes = Axes.Y, Padding = new MarginPadding { Top = 20, Bottom = 30, Horizontal = BeatmapSetOverlay.X_PADDING }, Child = new FillFlowContainer { - RelativeSizeAxes = Axes.Both, + RelativeSizeAxes = Axes.X, + AutoSizeAxes = Axes.Y, Direction = FillDirection.Vertical, Children = new Drawable[] { new Container { RelativeSizeAxes = Axes.X, - Height = 113, + AutoSizeAxes = Axes.Y, Child = Picker = new BeatmapPicker(), }, new FillFlowContainer @@ -158,7 +161,7 @@ namespace osu.Game.Overlays.BeatmapSet Anchor = Anchor.BottomRight, Origin = Anchor.BottomRight, AutoSizeAxes = Axes.Both, - Margin = new MarginPadding { Right = BeatmapSetOverlay.X_PADDING }, + Margin = new MarginPadding { Top = BeatmapSetOverlay.TOP_PADDING, Right = BeatmapSetOverlay.X_PADDING }, Direction = FillDirection.Vertical, Spacing = new Vector2(10), Children = new Drawable[] From 3e285e5dde6d4ebfc177af214ea2e7027995aafe Mon Sep 17 00:00:00 2001 From: iiSaLMaN Date: Wed, 19 Jun 2019 17:47:47 +0300 Subject: [PATCH 26/32] Separate beatmap info container from details (avoid overlapping) --- osu.Game/Overlays/BeatmapSet/Header.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/osu.Game/Overlays/BeatmapSet/Header.cs b/osu.Game/Overlays/BeatmapSet/Header.cs index 89b0d94783..7d6a35c537 100644 --- a/osu.Game/Overlays/BeatmapSet/Header.cs +++ b/osu.Game/Overlays/BeatmapSet/Header.cs @@ -97,7 +97,13 @@ namespace osu.Game.Overlays.BeatmapSet { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, - Padding = new MarginPadding { Top = 20, Bottom = 30, Horizontal = BeatmapSetOverlay.X_PADDING }, + Padding = new MarginPadding + { + Top = 20, + Bottom = 30, + Left = BeatmapSetOverlay.X_PADDING, + Right = BeatmapSetOverlay.X_PADDING + BeatmapSetOverlay.RIGHT_WIDTH, + }, Child = new FillFlowContainer { RelativeSizeAxes = Axes.X, From 08cf8dd2997e2efc04e82210d0fc2247ea5e83e3 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 20 Jun 2019 01:39:54 +0900 Subject: [PATCH 27/32] Adjust for readability --- osu.Game/Overlays/Mods/ModSection.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/osu.Game/Overlays/Mods/ModSection.cs b/osu.Game/Overlays/Mods/ModSection.cs index 155e8ebb75..4c44aad87d 100644 --- a/osu.Game/Overlays/Mods/ModSection.cs +++ b/osu.Game/Overlays/Mods/ModSection.cs @@ -51,9 +51,17 @@ namespace osu.Game.Overlays.Mods ButtonsContainer.Children = modContainers; buttons = modContainers.OfType().ToArray(); - var expand = value.Any(); - headerLabel.FadeTo(expand ? 1 : 0, 200); - this.FadeTo(expand ? 1 : 0); + if (value.Any()) + { + headerLabel.FadeIn(200); + this.FadeIn(200); + } + else + { + // transition here looks weird as mods instantly disappear. + headerLabel.Hide(); + Hide(); + } } } From cd2999d0d19ccee256592ac84c5c948064e93741 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 20 Jun 2019 01:40:58 +0900 Subject: [PATCH 28/32] Rename mod select test scene --- .../{TestSceneMods.cs => TestSceneModSelectOverlay.cs} | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) rename osu.Game.Tests/Visual/UserInterface/{TestSceneMods.cs => TestSceneModSelectOverlay.cs} (99%) diff --git a/osu.Game.Tests/Visual/UserInterface/TestSceneMods.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneModSelectOverlay.cs similarity index 99% rename from osu.Game.Tests/Visual/UserInterface/TestSceneMods.cs rename to osu.Game.Tests/Visual/UserInterface/TestSceneModSelectOverlay.cs index 2e36ba39ed..c04c7127fd 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestSceneMods.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneModSelectOverlay.cs @@ -24,11 +24,10 @@ using osuTK.Graphics; namespace osu.Game.Tests.Visual.UserInterface { [Description("mod select and icon display")] - public class TestSceneMods : OsuTestScene + public class TestSceneModSelectOverlay : OsuTestScene { public override IReadOnlyList RequiredTypes => new[] { - typeof(ModSelectOverlay), typeof(ModDisplay), typeof(ModSection), typeof(ModIcon), From ee2268caba6e4a624c6a4a01394d1dbddc504d2f Mon Sep 17 00:00:00 2001 From: iiSaLMaN Date: Wed, 19 Jun 2019 21:20:00 +0300 Subject: [PATCH 29/32] Enable masking for the beatmap set cover --- osu.Game/Overlays/BeatmapSet/Header.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/osu.Game/Overlays/BeatmapSet/Header.cs b/osu.Game/Overlays/BeatmapSet/Header.cs index a0f71d05c0..e040a77e0d 100644 --- a/osu.Game/Overlays/BeatmapSet/Header.cs +++ b/osu.Game/Overlays/BeatmapSet/Header.cs @@ -84,6 +84,7 @@ namespace osu.Game.Overlays.BeatmapSet cover = new UpdateableBeatmapSetCover { RelativeSizeAxes = Axes.Both, + Masking = true, }, new Box { From 0da8a483c5fecd43bfd398291e3447ac3097cfc9 Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Wed, 19 Jun 2019 23:14:53 +0300 Subject: [PATCH 30/32] Fix scores header is visible even if no scores are loaded --- osu.Game/Overlays/BeatmapSet/Scores/ScoresContainer.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/osu.Game/Overlays/BeatmapSet/Scores/ScoresContainer.cs b/osu.Game/Overlays/BeatmapSet/Scores/ScoresContainer.cs index 8ef3f71fe3..3e6c938802 100644 --- a/osu.Game/Overlays/BeatmapSet/Scores/ScoresContainer.cs +++ b/osu.Game/Overlays/BeatmapSet/Scores/ScoresContainer.cs @@ -124,6 +124,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores loading = false; scoreTable.Scores = scores?.Count > 1 ? scores : new List(); + scoreTable.FadeTo(scores?.Count > 1 ? 1 : 0); if (scores?.Any() == true) { From e83710d3b81c2a671748826243eb0c2b8dd9df21 Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Wed, 19 Jun 2019 23:15:00 +0300 Subject: [PATCH 31/32] Add a testcase --- osu.Game.Tests/Visual/Online/TestSceneScoresContainer.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/osu.Game.Tests/Visual/Online/TestSceneScoresContainer.cs b/osu.Game.Tests/Visual/Online/TestSceneScoresContainer.cs index 2f88a4b01d..06414af865 100644 --- a/osu.Game.Tests/Visual/Online/TestSceneScoresContainer.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneScoresContainer.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using System.Linq; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; @@ -39,8 +40,7 @@ namespace osu.Game.Tests.Visual.Online { Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, - AutoSizeAxes = Axes.Y, - RelativeSizeAxes = Axes.X, + RelativeSizeAxes = Axes.Both, Width = 0.8f, Children = new Drawable[] { @@ -173,7 +173,9 @@ namespace osu.Game.Tests.Visual.Online s.Statistics.Add(HitResult.Miss, RNG.Next(2000)); } - scoresContainer.Scores = scores; + AddStep("Load all scores", () => scoresContainer.Scores = scores); + AddStep("Load null scores", () => scoresContainer.Scores = null); + AddStep("Load only one score", () => scoresContainer.Scores = new[] { scores.First() }); } [BackgroundDependencyLoader] From 471c5b73865e8745a67e7f2300110542997e31ec Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 20 Jun 2019 11:23:36 +0900 Subject: [PATCH 32/32] Fix a couple of README typos --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0df99f7d6b..19aba5a31f 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,9 @@ Detailed changelogs are published on the [official osu! site](https://osu.ppy.sh ![](https://puu.sh/DCmvA/f6a74f5fbb.png) -If you are not interested in developing the game, you can consume our [binary releases](https://github.com/ppy/osu/releases). +If you are not interested in developing the game, you can still consume our [binary releases](https://github.com/ppy/osu/releases). -**Latest build:*** +**Latest build:** | [Windows (x64)](https://github.com/ppy/osu/releases/latest/download/install.exe) | [macOS 10.12+](https://github.com/ppy/osu/releases/latest/download/osu.app.zip) | | ------------- | ------------- |