From 26d5c2d85a480c09483b08231ed2c17d1762bed5 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 17 Jun 2019 19:37:24 +0900 Subject: [PATCH 01/32] Remove local implementation of bindable in OsuCheckbox --- osu.Game/Graphics/UserInterface/OsuCheckbox.cs | 12 ------------ .../Play/PlayerSettings/DiscussionSettings.cs | 2 +- .../Screens/Play/PlayerSettings/InputSettings.cs | 2 +- .../Screens/Play/PlayerSettings/VisualSettings.cs | 6 +++--- 4 files changed, 5 insertions(+), 17 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/OsuCheckbox.cs b/osu.Game/Graphics/UserInterface/OsuCheckbox.cs index 5ead5987a1..47324ee646 100644 --- a/osu.Game/Graphics/UserInterface/OsuCheckbox.cs +++ b/osu.Game/Graphics/UserInterface/OsuCheckbox.cs @@ -4,7 +4,6 @@ using osu.Framework.Allocation; using osu.Framework.Audio; using osu.Framework.Audio.Sample; -using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Framework.Graphics.UserInterface; using osu.Framework.Input.Events; @@ -15,17 +14,6 @@ namespace osu.Game.Graphics.UserInterface { public class OsuCheckbox : Checkbox { - private Bindable bindable; - - public Bindable Bindable - { - set - { - bindable = value; - Current.BindTo(bindable); - } - } - public Color4 CheckedColor { get; set; } = Color4.Cyan; public Color4 UncheckedColor { get; set; } = Color4.White; public int FadeDuration { get; set; } diff --git a/osu.Game/Screens/Play/PlayerSettings/DiscussionSettings.cs b/osu.Game/Screens/Play/PlayerSettings/DiscussionSettings.cs index 5963352e5b..bb4eea47ca 100644 --- a/osu.Game/Screens/Play/PlayerSettings/DiscussionSettings.cs +++ b/osu.Game/Screens/Play/PlayerSettings/DiscussionSettings.cs @@ -20,7 +20,7 @@ namespace osu.Game.Screens.Play.PlayerSettings new PlayerCheckbox { LabelText = "Show floating comments", - Bindable = config.GetBindable(OsuSetting.FloatingComments) + Current = config.GetBindable(OsuSetting.FloatingComments) }, new FocusedTextBox { diff --git a/osu.Game/Screens/Play/PlayerSettings/InputSettings.cs b/osu.Game/Screens/Play/PlayerSettings/InputSettings.cs index 826be792bd..7a8696e27c 100644 --- a/osu.Game/Screens/Play/PlayerSettings/InputSettings.cs +++ b/osu.Game/Screens/Play/PlayerSettings/InputSettings.cs @@ -25,6 +25,6 @@ namespace osu.Game.Screens.Play.PlayerSettings } [BackgroundDependencyLoader] - private void load(OsuConfigManager config) => mouseButtonsCheckbox.Bindable = config.GetBindable(OsuSetting.MouseDisableButtons); + private void load(OsuConfigManager config) => mouseButtonsCheckbox.Current = config.GetBindable(OsuSetting.MouseDisableButtons); } } diff --git a/osu.Game/Screens/Play/PlayerSettings/VisualSettings.cs b/osu.Game/Screens/Play/PlayerSettings/VisualSettings.cs index aec42eb024..1c8628f704 100644 --- a/osu.Game/Screens/Play/PlayerSettings/VisualSettings.cs +++ b/osu.Game/Screens/Play/PlayerSettings/VisualSettings.cs @@ -47,9 +47,9 @@ namespace osu.Game.Screens.Play.PlayerSettings { dimSliderBar.Bindable = config.GetBindable(OsuSetting.DimLevel); blurSliderBar.Bindable = config.GetBindable(OsuSetting.BlurLevel); - showStoryboardToggle.Bindable = config.GetBindable(OsuSetting.ShowStoryboard); - beatmapSkinsToggle.Bindable = config.GetBindable(OsuSetting.BeatmapSkins); - beatmapHitsoundsToggle.Bindable = config.GetBindable(OsuSetting.BeatmapHitsounds); + showStoryboardToggle.Current = config.GetBindable(OsuSetting.ShowStoryboard); + beatmapSkinsToggle.Current = config.GetBindable(OsuSetting.BeatmapSkins); + beatmapHitsoundsToggle.Current = config.GetBindable(OsuSetting.BeatmapHitsounds); } } } From c32d17d16a4db072151b369590ccf261e23b8afd Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 18 Jun 2019 01:32:52 +0900 Subject: [PATCH 02/32] Fix audio not dimming after race condition Also adjusts transition slightly for smoother effect. --- osu.Game/OsuGame.cs | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index f38eecef81..d856e6b935 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -181,9 +181,9 @@ namespace osu.Game configSkin.ValueChanged += skinId => SkinManager.CurrentSkinInfo.Value = SkinManager.Query(s => s.ID == skinId.NewValue) ?? SkinInfo.Default; configSkin.TriggerChange(); - LocalConfig.BindWith(OsuSetting.VolumeInactive, userInactiveVolume); - IsActive.BindValueChanged(active => updateActiveState(active.NewValue), true); + + Audio.AddAdjustment(AdjustableProperty.Volume, inactiveVolumeFade); } private ExternalLinkOpener externalLinkOpener; @@ -688,22 +688,14 @@ namespace osu.Game #region Inactive audio dimming - private readonly BindableDouble userInactiveVolume = new BindableDouble(); - private readonly BindableDouble inactiveVolumeFade = new BindableDouble(); private void updateActiveState(bool isActive) { 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 adjustment - } + this.TransformBindableTo(inactiveVolumeFade, 1, 400, Easing.OutQuint); else - { - Audio.AddAdjustment(AdjustableProperty.Volume, inactiveVolumeFade); - this.TransformBindableTo(inactiveVolumeFade, userInactiveVolume.Value, 1500, Easing.OutSine); - } + this.TransformBindableTo(inactiveVolumeFade, LocalConfig.Get(OsuSetting.VolumeInactive), 4000, Easing.OutQuint); } #endregion From 6bc2cf85d196a296d830246843605a7da729d694 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 20 Jun 2019 17:41:12 +0900 Subject: [PATCH 03/32] Move NotificationSection strings to constructor --- osu.Game/Overlays/NotificationOverlay.cs | 8 +--- .../Notifications/NotificationSection.cs | 43 ++++++------------- 2 files changed, 15 insertions(+), 36 deletions(-) diff --git a/osu.Game/Overlays/NotificationOverlay.cs b/osu.Game/Overlays/NotificationOverlay.cs index 2e4c504645..1b291c0f91 100644 --- a/osu.Game/Overlays/NotificationOverlay.cs +++ b/osu.Game/Overlays/NotificationOverlay.cs @@ -58,16 +58,12 @@ namespace osu.Game.Overlays RelativeSizeAxes = Axes.X, Children = new[] { - new NotificationSection + new NotificationSection(@"Notifications", @"Clear All") { - Title = @"Notifications", - ClearText = @"Clear All", AcceptTypes = new[] { typeof(SimpleNotification) } }, - new NotificationSection + new NotificationSection(@"Running Tasks", @"Cancel All") { - Title = @"Running Tasks", - ClearText = @"Cancel All", AcceptTypes = new[] { typeof(ProgressNotification) } } } diff --git a/osu.Game/Overlays/Notifications/NotificationSection.cs b/osu.Game/Overlays/Notifications/NotificationSection.cs index 4608d78324..f9278bbbd2 100644 --- a/osu.Game/Overlays/Notifications/NotificationSection.cs +++ b/osu.Game/Overlays/Notifications/NotificationSection.cs @@ -17,10 +17,7 @@ namespace osu.Game.Overlays.Notifications { public class NotificationSection : AlwaysUpdateFillFlowContainer { - private OsuSpriteText titleText; - private OsuSpriteText countText; - - private ClearAllButton clearButton; + private OsuSpriteText countDrawable; private FlowContainer notifications; @@ -35,28 +32,14 @@ namespace osu.Game.Overlays.Notifications public IEnumerable AcceptTypes; - private string clearText; + private readonly string clearButtonText; - public string ClearText + private readonly string titleText; + + public NotificationSection(string title, string clearButtonText) { - get => clearText; - set - { - clearText = value; - if (clearButton != null) clearButton.Text = clearText; - } - } - - private string title; - - public string Title - { - get => title; - set - { - title = value; - if (titleText != null) titleText.Text = title.ToUpperInvariant(); - } + this.clearButtonText = clearButtonText; + titleText = title; } [BackgroundDependencyLoader] @@ -82,9 +65,9 @@ namespace osu.Game.Overlays.Notifications AutoSizeAxes = Axes.Y, Children = new Drawable[] { - clearButton = new ClearAllButton + new ClearAllButton { - Text = clearText, + Text = clearButtonText, Anchor = Anchor.TopRight, Origin = Anchor.TopRight, Action = clearAll @@ -99,12 +82,12 @@ namespace osu.Game.Overlays.Notifications AutoSizeAxes = Axes.Both, Children = new Drawable[] { - titleText = new OsuSpriteText + new OsuSpriteText { - Text = title.ToUpperInvariant(), + Text = titleText.ToUpperInvariant(), Font = OsuFont.GetFont(weight: FontWeight.Black) }, - countText = new OsuSpriteText + countDrawable = new OsuSpriteText { Text = "3", Colour = colours.Yellow, @@ -134,7 +117,7 @@ namespace osu.Game.Overlays.Notifications { base.Update(); - countText.Text = notifications.Children.Count(c => c.Alpha > 0.99f).ToString(); + countDrawable.Text = notifications.Children.Count(c => c.Alpha > 0.99f).ToString(); } private class ClearAllButton : OsuClickableContainer From de59e038acd84a8374618bbef4fba68b3f872230 Mon Sep 17 00:00:00 2001 From: David Zhao Date: Fri, 21 Jun 2019 14:29:16 +0900 Subject: [PATCH 04/32] Prevent non-combo affecting judgements from triggering sudden death --- .../TestSceneTaikoSuddenDeath.cs | 65 +++++++++++++++++++ .../Visual/Gameplay/TestSceneFailAnimation.cs | 2 +- osu.Game/Rulesets/Mods/ModPerfect.cs | 3 +- osu.Game/Rulesets/Mods/ModSuddenDeath.cs | 3 +- osu.Game/Rulesets/Scoring/ScoreProcessor.cs | 8 +-- 5 files changed, 74 insertions(+), 7 deletions(-) create mode 100644 osu.Game.Rulesets.Taiko.Tests/TestSceneTaikoSuddenDeath.cs diff --git a/osu.Game.Rulesets.Taiko.Tests/TestSceneTaikoSuddenDeath.cs b/osu.Game.Rulesets.Taiko.Tests/TestSceneTaikoSuddenDeath.cs new file mode 100644 index 0000000000..ca3c477594 --- /dev/null +++ b/osu.Game.Rulesets.Taiko.Tests/TestSceneTaikoSuddenDeath.cs @@ -0,0 +1,65 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +using System.Linq; +using NUnit.Framework; +using osu.Game.Beatmaps; +using osu.Game.Rulesets.Scoring; +using osu.Game.Rulesets.Taiko.Beatmaps; +using osu.Game.Rulesets.Taiko.Mods; +using osu.Game.Rulesets.Taiko.Objects; +using osu.Game.Screens.Play; +using osu.Game.Tests.Visual; + +namespace osu.Game.Rulesets.Taiko.Tests +{ + public class TestSceneTaikoSuddenDeath : PlayerTestScene + { + public TestSceneTaikoSuddenDeath() + : base(new TaikoRuleset()) + { + } + + protected override bool AllowFail => true; + + protected override Player CreatePlayer(Ruleset ruleset) => new ScoreAccessiblePlayer(); + + protected override IBeatmap CreateBeatmap(RulesetInfo ruleset) => + new TaikoBeatmap + { + HitObjects = + { + new Swell { StartTime = 1500 }, + new Hit { StartTime = 100000 }, + }, + BeatmapInfo = + { + Ruleset = new TaikoRuleset().RulesetInfo + } + }; + + [Test] + public void TestSpinnerDoesNotFail() + { + bool judged = false; + AddStep("Setup judgements", () => + { + judged = false; + Mods.Value = Mods.Value.Concat(new[] { new TaikoModSuddenDeath() }).ToArray(); + ((ScoreAccessiblePlayer)Player).ScoreProcessor.NewJudgement += b => judged = true; + }); + AddUntilStep("swell judged", () => judged); + AddAssert("not failed", () => !Player.HasFailed); + } + + private class ScoreAccessiblePlayer : TestPlayer + { + public ScoreAccessiblePlayer() + : base(false, false) + { + } + + public new ScoreProcessor ScoreProcessor => base.ScoreProcessor; + } + } +} diff --git a/osu.Game.Tests/Visual/Gameplay/TestSceneFailAnimation.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneFailAnimation.cs index f06f72615b..f4e8a68819 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestSceneFailAnimation.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneFailAnimation.cs @@ -43,7 +43,7 @@ namespace osu.Game.Tests.Visual.Gameplay protected override void LoadComplete() { base.LoadComplete(); - ScoreProcessor.FailConditions += _ => true; + ScoreProcessor.FailConditions += (_, __) => true; } } } diff --git a/osu.Game/Rulesets/Mods/ModPerfect.cs b/osu.Game/Rulesets/Mods/ModPerfect.cs index e984fb8574..0994d1f7d3 100644 --- a/osu.Game/Rulesets/Mods/ModPerfect.cs +++ b/osu.Game/Rulesets/Mods/ModPerfect.cs @@ -3,6 +3,7 @@ using osu.Framework.Graphics.Sprites; using osu.Game.Graphics; +using osu.Game.Rulesets.Judgements; using osu.Game.Rulesets.Scoring; namespace osu.Game.Rulesets.Mods @@ -14,6 +15,6 @@ namespace osu.Game.Rulesets.Mods public override IconUsage Icon => OsuIcon.ModPerfect; public override string Description => "SS or quit."; - protected override bool FailCondition(ScoreProcessor scoreProcessor) => scoreProcessor.Accuracy.Value != 1; + protected override bool FailCondition(ScoreProcessor scoreProcessor, JudgementResult result) => scoreProcessor.Accuracy.Value != 1; } } diff --git a/osu.Game/Rulesets/Mods/ModSuddenDeath.cs b/osu.Game/Rulesets/Mods/ModSuddenDeath.cs index 809661db8e..e332abd914 100644 --- a/osu.Game/Rulesets/Mods/ModSuddenDeath.cs +++ b/osu.Game/Rulesets/Mods/ModSuddenDeath.cs @@ -4,6 +4,7 @@ using System; using osu.Framework.Graphics.Sprites; using osu.Game.Graphics; +using osu.Game.Rulesets.Judgements; using osu.Game.Rulesets.Scoring; using osu.Game.Scoring; @@ -27,6 +28,6 @@ namespace osu.Game.Rulesets.Mods public ScoreRank AdjustRank(ScoreRank rank, double accuracy) => rank; - protected virtual bool FailCondition(ScoreProcessor scoreProcessor) => scoreProcessor.Combo.Value == 0; + protected virtual bool FailCondition(ScoreProcessor scoreProcessor, JudgementResult result) => scoreProcessor.Combo.Value == 0 && result.Judgement.AffectsCombo; } } diff --git a/osu.Game/Rulesets/Scoring/ScoreProcessor.cs b/osu.Game/Rulesets/Scoring/ScoreProcessor.cs index ce94ca9c7d..47ce28db4c 100644 --- a/osu.Game/Rulesets/Scoring/ScoreProcessor.cs +++ b/osu.Game/Rulesets/Scoring/ScoreProcessor.cs @@ -40,7 +40,7 @@ namespace osu.Game.Rulesets.Scoring /// /// Additional conditions on top of that cause a failing state. /// - public event Func FailConditions; + public event Func FailConditions; /// /// The current total score. @@ -151,12 +151,12 @@ namespace osu.Game.Rulesets.Scoring /// This can only ever notify subscribers once. /// /// - protected void UpdateFailed() + protected void UpdateFailed(JudgementResult result) { if (HasFailed) return; - if (!DefaultFailCondition && FailConditions?.Invoke(this) != true) + if (!DefaultFailCondition && FailConditions?.Invoke(this, result) != true) return; if (Failed?.Invoke() != false) @@ -287,7 +287,7 @@ namespace osu.Game.Rulesets.Scoring ApplyResult(result); updateScore(); - UpdateFailed(); + UpdateFailed(result); NotifyNewJudgement(result); } From 8fecd8dcdc570f4ffb71706ca475950066eb6a4f Mon Sep 17 00:00:00 2001 From: David Zhao Date: Fri, 21 Jun 2019 16:37:06 +0900 Subject: [PATCH 05/32] Fix sudden death not being applied on first run --- osu.Game.Rulesets.Taiko.Tests/TestSceneTaikoSuddenDeath.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/osu.Game.Rulesets.Taiko.Tests/TestSceneTaikoSuddenDeath.cs b/osu.Game.Rulesets.Taiko.Tests/TestSceneTaikoSuddenDeath.cs index ca3c477594..d0db193738 100644 --- a/osu.Game.Rulesets.Taiko.Tests/TestSceneTaikoSuddenDeath.cs +++ b/osu.Game.Rulesets.Taiko.Tests/TestSceneTaikoSuddenDeath.cs @@ -22,7 +22,11 @@ namespace osu.Game.Rulesets.Taiko.Tests protected override bool AllowFail => true; - protected override Player CreatePlayer(Ruleset ruleset) => new ScoreAccessiblePlayer(); + protected override Player CreatePlayer(Ruleset ruleset) + { + Mods.Value = Mods.Value.Concat(new[] { new TaikoModSuddenDeath() }).ToArray(); + return new ScoreAccessiblePlayer(); + } protected override IBeatmap CreateBeatmap(RulesetInfo ruleset) => new TaikoBeatmap @@ -45,7 +49,6 @@ namespace osu.Game.Rulesets.Taiko.Tests AddStep("Setup judgements", () => { judged = false; - Mods.Value = Mods.Value.Concat(new[] { new TaikoModSuddenDeath() }).ToArray(); ((ScoreAccessiblePlayer)Player).ScoreProcessor.NewJudgement += b => judged = true; }); AddUntilStep("swell judged", () => judged); From c2b451a55f37008fd5145b571f89b0961f275594 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 21 Jun 2019 17:51:25 +0900 Subject: [PATCH 06/32] Fix ModSelectOverlay tests failing due to asynchronous loading --- .../TestSceneModSelectOverlay.cs | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/osu.Game.Tests/Visual/UserInterface/TestSceneModSelectOverlay.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneModSelectOverlay.cs index 5a903b9417..80408ab43b 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestSceneModSelectOverlay.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneModSelectOverlay.cs @@ -76,7 +76,7 @@ namespace osu.Game.Tests.Visual.UserInterface public void TestOsuMods() { var ruleset = rulesets.AvailableRulesets.First(r => r.ID == 0); - AddStep("change ruleset", () => { Ruleset.Value = ruleset; }); + changeRuleset(ruleset); var instance = ruleset.CreateInstance(); @@ -108,7 +108,7 @@ namespace osu.Game.Tests.Visual.UserInterface public void TestManiaMods() { var ruleset = rulesets.AvailableRulesets.First(r => r.ID == 3); - AddStep("change ruleset", () => { Ruleset.Value = ruleset; }); + changeRuleset(ruleset); testRankedText(ruleset.CreateInstance().GetModsFor(ModType.Conversion).First(m => m is ManiaModRandom)); } @@ -119,7 +119,7 @@ namespace osu.Game.Tests.Visual.UserInterface var rulesetOsu = rulesets.AvailableRulesets.First(r => r.ID == 0); var rulesetMania = rulesets.AvailableRulesets.First(r => r.ID == 3); - AddStep("change ruleset to null", () => { Ruleset.Value = null; }); + changeRuleset(null); var instance = rulesetOsu.CreateInstance(); var easierMods = instance.GetModsFor(ModType.DifficultyReduction); @@ -127,15 +127,15 @@ namespace osu.Game.Tests.Visual.UserInterface AddStep("set mods externally", () => { modDisplay.Current.Value = new[] { noFailMod }; }); - AddStep("change ruleset to osu", () => { Ruleset.Value = rulesetOsu; }); + changeRuleset(rulesetOsu); AddAssert("ensure mods still selected", () => modDisplay.Current.Value.Single(m => m is OsuModNoFail) != null); - AddStep("change ruleset to mania", () => { Ruleset.Value = rulesetMania; }); + changeRuleset(rulesetMania); AddAssert("ensure mods not selected", () => !modDisplay.Current.Value.Any(m => m is OsuModNoFail)); - AddStep("change ruleset to osu", () => { Ruleset.Value = rulesetOsu; }); + changeRuleset(rulesetOsu); AddAssert("ensure mods not selected", () => !modDisplay.Current.Value.Any()); } @@ -216,14 +216,11 @@ namespace osu.Game.Tests.Visual.UserInterface private void testRankedText(Mod mod) { - waitForLoad(); - AddAssert("check for ranked", () => modSelect.UnrankedLabel.Alpha == 0); + AddUntilStep("check for ranked", () => modSelect.UnrankedLabel.Alpha == 0); selectNext(mod); - waitForLoad(); - AddAssert("check for unranked", () => modSelect.UnrankedLabel.Alpha != 0); + AddUntilStep("check for unranked", () => modSelect.UnrankedLabel.Alpha != 0); selectPrevious(mod); - waitForLoad(); - AddAssert("check for ranked", () => modSelect.UnrankedLabel.Alpha == 0); + AddUntilStep("check for ranked", () => modSelect.UnrankedLabel.Alpha == 0); } private void selectNext(Mod mod) => AddStep($"left click {mod.Name}", () => modSelect.GetModButton(mod)?.SelectNext(1)); @@ -232,7 +229,6 @@ namespace osu.Game.Tests.Visual.UserInterface private void checkSelected(Mod mod) { - waitForLoad(); AddAssert($"check {mod.Name} is selected", () => { var button = modSelect.GetModButton(mod); @@ -240,14 +236,17 @@ namespace osu.Game.Tests.Visual.UserInterface }); } - private void waitForLoad() + private void changeRuleset(RulesetInfo ruleset) { - AddUntilStep("wait for icons to load", () => modSelect.AllLoaded); + AddStep($"change ruleset to {ruleset}", () => { Ruleset.Value = ruleset; }); + waitForLoad(); } + private void waitForLoad() => + AddUntilStep("wait for icons to load", () => modSelect.AllLoaded); + private void checkNotSelected(Mod mod) { - waitForLoad(); AddAssert($"check {mod.Name} is not selected", () => { var button = modSelect.GetModButton(mod); From 2c3504d3028a5edc1a1586eaea22f52bfe47f35d Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 21 Jun 2019 13:29:24 +0200 Subject: [PATCH 07/32] fix bracket editor crash when no round description is present --- .../Screens/Ladder/Components/DrawableTournamentRound.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game.Tournament/Screens/Ladder/Components/DrawableTournamentRound.cs b/osu.Game.Tournament/Screens/Ladder/Components/DrawableTournamentRound.cs index 67d6bc4fa6..dacd98d3b8 100644 --- a/osu.Game.Tournament/Screens/Ladder/Components/DrawableTournamentRound.cs +++ b/osu.Game.Tournament/Screens/Ladder/Components/DrawableTournamentRound.cs @@ -51,8 +51,8 @@ namespace osu.Game.Tournament.Screens.Ladder.Components name = round.Name.GetBoundCopy(); name.BindValueChanged(n => textName.Text = ((losers ? "Losers " : "") + round.Name).ToUpper(), true); - description = round.Name.GetBoundCopy(); - description.BindValueChanged(n => textDescription.Text = round.Description.Value.ToUpper(), true); + description = round.Description.GetBoundCopy(); + description.BindValueChanged(n => textDescription.Text = round.Description.Value?.ToUpper(), true); } } } From 13f6c6a87e610d552b13f9de342235854d0d39db Mon Sep 17 00:00:00 2001 From: KingLuigi4932 Date: Fri, 21 Jun 2019 15:23:35 +0300 Subject: [PATCH 08/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 9dd8c8572e..563e90cec9 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 1482b6ed03..a36638cf84 100644 --- a/osu.iOS.props +++ b/osu.iOS.props @@ -105,8 +105,8 @@ - - + + From 1d6b6a7828feb447a69e16e39ad0ffb088de05b4 Mon Sep 17 00:00:00 2001 From: Joehu Date: Fri, 21 Jun 2019 08:06:57 -0700 Subject: [PATCH 09/32] Fix audio being dimmed on preview tracks --- osu.Game/Audio/PreviewTrackManager.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/osu.Game/Audio/PreviewTrackManager.cs b/osu.Game/Audio/PreviewTrackManager.cs index 6e162ca95e..bb6fba9bda 100644 --- a/osu.Game/Audio/PreviewTrackManager.cs +++ b/osu.Game/Audio/PreviewTrackManager.cs @@ -36,8 +36,6 @@ namespace osu.Game.Audio trackStore.AddAdjustment(AdjustableProperty.Volume, audio.VolumeTrack); this.audio = audio; - - config.BindWith(FrameworkSetting.VolumeMusic, trackStore.Volume); } /// From 74e99b2915d4a8ffd14719c631f29b5db9850cfa Mon Sep 17 00:00:00 2001 From: Joehu Date: Fri, 21 Jun 2019 08:11:10 -0700 Subject: [PATCH 10/32] Remove unused parameter --- osu.Game/Audio/PreviewTrackManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Audio/PreviewTrackManager.cs b/osu.Game/Audio/PreviewTrackManager.cs index bb6fba9bda..4f5088f490 100644 --- a/osu.Game/Audio/PreviewTrackManager.cs +++ b/osu.Game/Audio/PreviewTrackManager.cs @@ -26,7 +26,7 @@ namespace osu.Game.Audio private TrackManagerPreviewTrack current; [BackgroundDependencyLoader] - private void load(AudioManager audio, FrameworkConfigManager config) + private void load(AudioManager audio) { // this is a temporary solution to get around muting ourselves. // todo: update this once we have a BackgroundTrackManager or similar. From 36f59ec86dd6ff7613f28dc6aee041634fc6f257 Mon Sep 17 00:00:00 2001 From: Joehu Date: Fri, 21 Jun 2019 08:29:45 -0700 Subject: [PATCH 11/32] Remove unused using --- osu.Game/Audio/PreviewTrackManager.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/osu.Game/Audio/PreviewTrackManager.cs b/osu.Game/Audio/PreviewTrackManager.cs index 4f5088f490..e12c46ef16 100644 --- a/osu.Game/Audio/PreviewTrackManager.cs +++ b/osu.Game/Audio/PreviewTrackManager.cs @@ -9,7 +9,6 @@ using osu.Framework.Allocation; using osu.Framework.Audio; using osu.Framework.Audio.Track; using osu.Framework.Bindables; -using osu.Framework.Configuration; using osu.Framework.Graphics; using osu.Framework.IO.Stores; using osu.Game.Beatmaps; From 132cb8f47377b45aa97575a43cc5a04abc850148 Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Sat, 22 Jun 2019 01:11:04 +0300 Subject: [PATCH 12/32] Add spacing between sections --- osu.Game/Overlays/UserProfileOverlay.cs | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/osu.Game/Overlays/UserProfileOverlay.cs b/osu.Game/Overlays/UserProfileOverlay.cs index 8a133a1d1e..f712509702 100644 --- a/osu.Game/Overlays/UserProfileOverlay.cs +++ b/osu.Game/Overlays/UserProfileOverlay.cs @@ -4,6 +4,7 @@ using System.Linq; using osu.Framework.Allocation; using osu.Framework.Graphics; +using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.UserInterface; using osu.Game.Graphics; @@ -23,7 +24,7 @@ namespace osu.Game.Overlays private ProfileSection[] sections; private GetUserRequest userReq; protected ProfileHeader Header; - private SectionsContainer sectionsContainer; + private ProfileSectionsContainer sectionsContainer; private ProfileTabControl tabs; public const float CONTENT_X_MARGIN = 70; @@ -68,9 +69,8 @@ namespace osu.Game.Overlays Colour = OsuColour.Gray(0.2f) }); - Add(sectionsContainer = new SectionsContainer + Add(sectionsContainer = new ProfileSectionsContainer { - RelativeSizeAxes = Axes.Both, ExpandableHeader = Header = new ProfileHeader(), FixedHeader = tabs, HeaderBackground = new Box @@ -180,5 +180,22 @@ namespace osu.Game.Overlays bottom.Colour = colours.Yellow; } } + + private class ProfileSectionsContainer : SectionsContainer + { + public ProfileSectionsContainer() + { + RelativeSizeAxes = Axes.Both; + } + + protected override FlowContainer CreateScrollContentContainer() + => new FillFlowContainer + { + Direction = FillDirection.Vertical, + AutoSizeAxes = Axes.Y, + RelativeSizeAxes = Axes.X, + Spacing = new Vector2(0, 20), + }; + } } } From dbf53e9bda54ceb3405c6d51f69999cd1d419e50 Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Sat, 22 Jun 2019 02:06:30 +0300 Subject: [PATCH 13/32] Use correct background colour for sections --- osu.Game/Overlays/Profile/ProfileSection.cs | 68 +++++++++++---------- osu.Game/Overlays/UserProfileOverlay.cs | 2 +- 2 files changed, 36 insertions(+), 34 deletions(-) diff --git a/osu.Game/Overlays/Profile/ProfileSection.cs b/osu.Game/Overlays/Profile/ProfileSection.cs index 4d891384e8..fd51efba7b 100644 --- a/osu.Game/Overlays/Profile/ProfileSection.cs +++ b/osu.Game/Overlays/Profile/ProfileSection.cs @@ -1,6 +1,7 @@ // 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.Allocation; using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; @@ -8,18 +9,17 @@ using osu.Framework.Graphics.Shapes; using osu.Game.Graphics; using osu.Game.Graphics.Sprites; using osu.Game.Users; -using osuTK; -using osuTK.Graphics; namespace osu.Game.Overlays.Profile { - public abstract class ProfileSection : FillFlowContainer + public abstract class ProfileSection : Container { public abstract string Title { get; } public abstract string Identifier { get; } private readonly FillFlowContainer content; + private readonly Box background; protected override Container Content => content; @@ -27,50 +27,52 @@ namespace osu.Game.Overlays.Profile protected ProfileSection() { - Direction = FillDirection.Vertical; AutoSizeAxes = Axes.Y; RelativeSizeAxes = Axes.X; + InternalChildren = new Drawable[] { - new OsuSpriteText + background = new Box { - Text = Title, - Font = OsuFont.GetFont(size: 20, weight: FontWeight.Regular, italics: true), - Margin = new MarginPadding - { - Horizontal = UserProfileOverlay.CONTENT_X_MARGIN, - Vertical = 10 - } + RelativeSizeAxes = Axes.Both, }, - content = new FillFlowContainer + new FillFlowContainer { Direction = FillDirection.Vertical, AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, - Padding = new MarginPadding + Children = new Drawable[] { - Horizontal = UserProfileOverlay.CONTENT_X_MARGIN, - Bottom = 20 - } - }, - new Box - { - RelativeSizeAxes = Axes.X, - Height = 1, - Colour = OsuColour.Gray(34), - EdgeSmoothness = new Vector2(1) + new OsuSpriteText + { + Text = Title, + Font = OsuFont.GetFont(size: 20, weight: FontWeight.Regular, italics: true), + Margin = new MarginPadding + { + Horizontal = UserProfileOverlay.CONTENT_X_MARGIN, + Vertical = 10 + } + }, + content = new FillFlowContainer + { + Direction = FillDirection.Vertical, + AutoSizeAxes = Axes.Y, + RelativeSizeAxes = Axes.X, + Padding = new MarginPadding + { + Horizontal = UserProfileOverlay.CONTENT_X_MARGIN, + Bottom = 20 + } + }, + }, } }; + } - // placeholder - Add(new OsuSpriteText - { - Text = @"coming soon!", - Colour = Color4.Gray, - Anchor = Anchor.Centre, - Origin = Anchor.Centre, - Margin = new MarginPadding { Top = 100, Bottom = 100 } - }); + [BackgroundDependencyLoader] + private void load(OsuColour colours) + { + background.Colour = colours.GreySeafoamDarker; } } } diff --git a/osu.Game/Overlays/UserProfileOverlay.cs b/osu.Game/Overlays/UserProfileOverlay.cs index f712509702..3809a5af16 100644 --- a/osu.Game/Overlays/UserProfileOverlay.cs +++ b/osu.Game/Overlays/UserProfileOverlay.cs @@ -66,7 +66,7 @@ namespace osu.Game.Overlays Add(new Box { RelativeSizeAxes = Axes.Both, - Colour = OsuColour.Gray(0.2f) + Colour = OsuColour.Gray(0.1f) }); Add(sectionsContainer = new ProfileSectionsContainer From 4cd3b15f6ee81462f71290017f83f68c82a0b736 Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Sat, 22 Jun 2019 02:40:33 +0300 Subject: [PATCH 14/32] Add triangles --- osu.Game/Overlays/Profile/ProfileSection.cs | 45 +++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/osu.Game/Overlays/Profile/ProfileSection.cs b/osu.Game/Overlays/Profile/ProfileSection.cs index fd51efba7b..8d1333b7ac 100644 --- a/osu.Game/Overlays/Profile/ProfileSection.cs +++ b/osu.Game/Overlays/Profile/ProfileSection.cs @@ -4,11 +4,14 @@ using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Framework.Graphics; +using osu.Framework.Graphics.Colour; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; using osu.Game.Graphics; +using osu.Game.Graphics.Backgrounds; using osu.Game.Graphics.Sprites; using osu.Game.Users; +using osuTK.Graphics; namespace osu.Game.Overlays.Profile { @@ -36,6 +39,11 @@ namespace osu.Game.Overlays.Profile { RelativeSizeAxes = Axes.Both, }, + new SectionTriangles + { + Anchor = Anchor.BottomCentre, + Origin = Anchor.BottomCentre, + }, new FillFlowContainer { Direction = FillDirection.Vertical, @@ -74,5 +82,42 @@ namespace osu.Game.Overlays.Profile { background.Colour = colours.GreySeafoamDarker; } + + private class SectionTriangles : Container + { + private readonly Triangles triangles; + private readonly Box foreground; + + public SectionTriangles() + { + RelativeSizeAxes = Axes.X; + Height = 100; + Masking = true; + Children = new Drawable[] + { + triangles = new Triangles + { + Anchor = Anchor.BottomCentre, + Origin = Anchor.BottomCentre, + RelativeSizeAxes = Axes.Both, + Height = 0.95f, + TriangleScale = 4, + Velocity = 0.5f, + }, + foreground = new Box + { + RelativeSizeAxes = Axes.Both, + } + }; + } + + [BackgroundDependencyLoader] + private void load(OsuColour colours) + { + triangles.ColourLight = colours.GreySeafoamDark; + triangles.ColourDark = colours.GreySeafoamDarker; + foreground.Colour = ColourInfo.GradientVertical(colours.GreySeafoamDarker, new Color4(0,0,0,0)); + } + } } } From 3723ea05de2b1222fbff6801e1ccb5d5c35a5b11 Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Sat, 22 Jun 2019 02:52:07 +0300 Subject: [PATCH 15/32] Adjust Title style --- osu.Game/Overlays/Profile/ProfileSection.cs | 26 +++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/osu.Game/Overlays/Profile/ProfileSection.cs b/osu.Game/Overlays/Profile/ProfileSection.cs index 8d1333b7ac..bdfdd44ac4 100644 --- a/osu.Game/Overlays/Profile/ProfileSection.cs +++ b/osu.Game/Overlays/Profile/ProfileSection.cs @@ -23,6 +23,7 @@ namespace osu.Game.Overlays.Profile private readonly FillFlowContainer content; private readonly Box background; + private readonly Box underscore; protected override Container Content => content; @@ -51,14 +52,30 @@ namespace osu.Game.Overlays.Profile RelativeSizeAxes = Axes.X, Children = new Drawable[] { - new OsuSpriteText + new Container { - Text = Title, - Font = OsuFont.GetFont(size: 20, weight: FontWeight.Regular, italics: true), + AutoSizeAxes = Axes.Both, Margin = new MarginPadding { Horizontal = UserProfileOverlay.CONTENT_X_MARGIN, - Vertical = 10 + Top = 15, + Bottom = 10, + }, + Children = new Drawable[] + { + new OsuSpriteText + { + Text = Title, + Font = OsuFont.GetFont(size: 20, weight: FontWeight.Bold), + }, + underscore = new Box + { + Anchor = Anchor.BottomCentre, + Origin = Anchor.TopCentre, + Margin = new MarginPadding { Top = 4 }, + RelativeSizeAxes = Axes.X, + Height = 2, + } } }, content = new FillFlowContainer @@ -81,6 +98,7 @@ namespace osu.Game.Overlays.Profile private void load(OsuColour colours) { background.Colour = colours.GreySeafoamDarker; + underscore.Colour = colours.Seafoam; } private class SectionTriangles : Container From 4963d4e8df38e00929748fc6925e9b795af09e61 Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Sat, 22 Jun 2019 03:08:18 +0300 Subject: [PATCH 16/32] CI fixes --- osu.Game/Overlays/Profile/ProfileSection.cs | 2 +- osu.Game/Overlays/UserProfileOverlay.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Overlays/Profile/ProfileSection.cs b/osu.Game/Overlays/Profile/ProfileSection.cs index bdfdd44ac4..84009f01ce 100644 --- a/osu.Game/Overlays/Profile/ProfileSection.cs +++ b/osu.Game/Overlays/Profile/ProfileSection.cs @@ -134,7 +134,7 @@ namespace osu.Game.Overlays.Profile { triangles.ColourLight = colours.GreySeafoamDark; triangles.ColourDark = colours.GreySeafoamDarker; - foreground.Colour = ColourInfo.GradientVertical(colours.GreySeafoamDarker, new Color4(0,0,0,0)); + foreground.Colour = ColourInfo.GradientVertical(colours.GreySeafoamDarker, new Color4(0, 0, 0, 0)); } } } diff --git a/osu.Game/Overlays/UserProfileOverlay.cs b/osu.Game/Overlays/UserProfileOverlay.cs index 3809a5af16..9a5ba9e3c5 100644 --- a/osu.Game/Overlays/UserProfileOverlay.cs +++ b/osu.Game/Overlays/UserProfileOverlay.cs @@ -189,7 +189,7 @@ namespace osu.Game.Overlays } protected override FlowContainer CreateScrollContentContainer() - => new FillFlowContainer + => new FillFlowContainer { Direction = FillDirection.Vertical, AutoSizeAxes = Axes.Y, From 12740eff72eb54866cd80facc32c21877f15a3f3 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sat, 22 Jun 2019 22:42:11 +0900 Subject: [PATCH 17/32] Format tournament bracket output --- osu.Game.Tournament/TournamentGameBase.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/osu.Game.Tournament/TournamentGameBase.cs b/osu.Game.Tournament/TournamentGameBase.cs index 628f64dc73..06fb52da77 100644 --- a/osu.Game.Tournament/TournamentGameBase.cs +++ b/osu.Game.Tournament/TournamentGameBase.cs @@ -222,6 +222,7 @@ namespace osu.Game.Tournament sw.Write(JsonConvert.SerializeObject(ladder, new JsonSerializerSettings { + Formatting = Formatting.Indented, NullValueHandling = NullValueHandling.Ignore, DefaultValueHandling = DefaultValueHandling.Ignore, })); From afe9ac174025ea1d392eec0f75ca4cb0c464efbe Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 22 Jun 2019 16:11:47 +0200 Subject: [PATCH 18/32] fix assert descriptions --- osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs b/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs index e97983dd8b..0e98206acb 100644 --- a/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs +++ b/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs @@ -74,7 +74,7 @@ namespace osu.Game.Tests.Visual.Components { AddStep("move mouse", () => InputManager.MoveMouseTo(box2.ScreenSpaceDrawQuad.Centre)); - AddAssert("check not idle", () => box1.IsIdle); + AddAssert("check idle", () => box1.IsIdle); AddAssert("check not idle", () => !box2.IsIdle); AddAssert("check idle", () => box3.IsIdle); AddAssert("check idle", () => box4.IsIdle); @@ -82,10 +82,10 @@ namespace osu.Game.Tests.Visual.Components AddStep("move mouse", () => InputManager.MoveMouseTo(box3.ScreenSpaceDrawQuad.Centre)); AddStep("move mouse", () => InputManager.MoveMouseTo(box4.ScreenSpaceDrawQuad.Centre)); - AddAssert("check not idle", () => box1.IsIdle); + AddAssert("check idle", () => box1.IsIdle); AddAssert("check not idle", () => !box2.IsIdle); - AddAssert("check idle", () => !box3.IsIdle); - AddAssert("check idle", () => !box4.IsIdle); + AddAssert("check not idle", () => !box3.IsIdle); + AddAssert("check not idle", () => !box4.IsIdle); AddUntilStep("Wait for all idle", () => box1.IsIdle && box2.IsIdle && box3.IsIdle && box4.IsIdle); } From 35d9f5841c57a2fb4eb289aec86b8e7729b4434e Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 22 Jun 2019 17:34:06 +0200 Subject: [PATCH 19/32] simplify asserts, clarify asserts --- .../Visual/Components/TestSceneIdleTracker.cs | 77 +++++++++++++------ 1 file changed, 55 insertions(+), 22 deletions(-) diff --git a/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs b/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs index 0e98206acb..0960e98fdc 100644 --- a/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs +++ b/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs @@ -25,6 +25,7 @@ namespace osu.Game.Tests.Visual.Components { box1 = new IdleTrackingBox(1000) { + Name = "TopLeft", RelativeSizeAxes = Axes.Both, Colour = Color4.Red, Anchor = Anchor.TopLeft, @@ -32,6 +33,7 @@ namespace osu.Game.Tests.Visual.Components }, box2 = new IdleTrackingBox(2000) { + Name = "TopRight", RelativeSizeAxes = Axes.Both, Colour = Color4.Green, Anchor = Anchor.TopRight, @@ -39,6 +41,7 @@ namespace osu.Game.Tests.Visual.Components }, box3 = new IdleTrackingBox(3000) { + Name = "BottomLeft", RelativeSizeAxes = Axes.Both, Colour = Color4.Blue, Anchor = Anchor.BottomLeft, @@ -46,6 +49,7 @@ namespace osu.Game.Tests.Visual.Components }, box4 = new IdleTrackingBox(4000) { + Name = "BottomRight", RelativeSizeAxes = Axes.Both, Colour = Color4.Orange, Anchor = Anchor.BottomRight, @@ -57,51 +61,80 @@ namespace osu.Game.Tests.Visual.Components [Test] public void TestNudge() { - AddStep("move mouse to top left", () => InputManager.MoveMouseTo(box1.ScreenSpaceDrawQuad.Centre)); + AddStep("move to top left", () => InputManager.MoveMouseTo(box1.ScreenSpaceDrawQuad.Centre)); - AddUntilStep("Wait for all idle", () => box1.IsIdle && box2.IsIdle && box3.IsIdle && box4.IsIdle); + waitForAllIdle(); AddStep("nudge mouse", () => InputManager.MoveMouseTo(box1.ScreenSpaceDrawQuad.Centre + new Vector2(1))); - AddAssert("check not idle", () => !box1.IsIdle); - AddAssert("check idle", () => box2.IsIdle); - AddAssert("check idle", () => box3.IsIdle); - AddAssert("check idle", () => box4.IsIdle); + checkIdleStatus(box1, false); + checkIdleStatus(box2, true); + checkIdleStatus(box3, true); + checkIdleStatus(box4, true); } [Test] public void TestMovement() { - AddStep("move mouse", () => InputManager.MoveMouseTo(box2.ScreenSpaceDrawQuad.Centre)); + AddStep("move to top right", () => InputManager.MoveMouseTo(box2.ScreenSpaceDrawQuad.Centre)); - AddAssert("check idle", () => box1.IsIdle); - AddAssert("check not idle", () => !box2.IsIdle); - AddAssert("check idle", () => box3.IsIdle); - AddAssert("check idle", () => box4.IsIdle); + checkIdleStatus(box1, true); + checkIdleStatus(box2, false); + checkIdleStatus(box3, true); + checkIdleStatus(box4, true); - AddStep("move mouse", () => InputManager.MoveMouseTo(box3.ScreenSpaceDrawQuad.Centre)); - AddStep("move mouse", () => InputManager.MoveMouseTo(box4.ScreenSpaceDrawQuad.Centre)); + AddStep("move to bottom left", () => InputManager.MoveMouseTo(box3.ScreenSpaceDrawQuad.Centre)); + AddStep("move to bottom right", () => InputManager.MoveMouseTo(box4.ScreenSpaceDrawQuad.Centre)); - AddAssert("check idle", () => box1.IsIdle); - AddAssert("check not idle", () => !box2.IsIdle); - AddAssert("check not idle", () => !box3.IsIdle); - AddAssert("check not idle", () => !box4.IsIdle); + checkIdleStatus(box1, true); + checkIdleStatus(box2, false); + checkIdleStatus(box3, false); + checkIdleStatus(box4, false); - AddUntilStep("Wait for all idle", () => box1.IsIdle && box2.IsIdle && box3.IsIdle && box4.IsIdle); + waitForAllIdle(); } [Test] public void TestTimings() { - AddStep("move mouse", () => InputManager.MoveMouseTo(ScreenSpaceDrawQuad.Centre)); + AddStep("move to centre", () => InputManager.MoveMouseTo(ScreenSpaceDrawQuad.Centre)); + + checkIdleStatus(box1, false); + checkIdleStatus(box2, false); + checkIdleStatus(box3, false); + checkIdleStatus(box4, false); - AddAssert("check not idle", () => !box1.IsIdle && !box2.IsIdle && !box3.IsIdle && !box4.IsIdle); AddUntilStep("Wait for idle", () => box1.IsIdle); - AddAssert("check not idle", () => !box2.IsIdle && !box3.IsIdle && !box4.IsIdle); + + checkIdleStatus(box1, true); + checkIdleStatus(box2, false); + checkIdleStatus(box3, false); + checkIdleStatus(box4, false); + AddUntilStep("Wait for idle", () => box2.IsIdle); - AddAssert("check not idle", () => !box3.IsIdle && !box4.IsIdle); + + checkIdleStatus(box1, true); + checkIdleStatus(box2, true); + checkIdleStatus(box3, false); + checkIdleStatus(box4, false); + AddUntilStep("Wait for idle", () => box3.IsIdle); + checkIdleStatus(box1, true); + checkIdleStatus(box2, true); + checkIdleStatus(box3, true); + checkIdleStatus(box4, false); + + waitForAllIdle(); + } + + private void checkIdleStatus(IdleTrackingBox box, bool expectedIdle) + { + AddAssert($"{box.Name} is {(expectedIdle ? "idle" : "active")}", () => box.IsIdle == expectedIdle); + } + + private void waitForAllIdle() + { AddUntilStep("Wait for all idle", () => box1.IsIdle && box2.IsIdle && box3.IsIdle && box4.IsIdle); } From cf193cb26f83c1aeb1066f19af273fde555c0469 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 22 Jun 2019 17:43:24 +0200 Subject: [PATCH 20/32] call MoveMouseTo with Drawable --- .../Visual/Components/TestSceneIdleTracker.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs b/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs index 0960e98fdc..ef889e29a8 100644 --- a/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs +++ b/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs @@ -61,7 +61,7 @@ namespace osu.Game.Tests.Visual.Components [Test] public void TestNudge() { - AddStep("move to top left", () => InputManager.MoveMouseTo(box1.ScreenSpaceDrawQuad.Centre)); + AddStep("move to top left", () => InputManager.MoveMouseTo(box1)); waitForAllIdle(); @@ -76,15 +76,15 @@ namespace osu.Game.Tests.Visual.Components [Test] public void TestMovement() { - AddStep("move to top right", () => InputManager.MoveMouseTo(box2.ScreenSpaceDrawQuad.Centre)); + AddStep("move to top right", () => InputManager.MoveMouseTo(box2)); checkIdleStatus(box1, true); checkIdleStatus(box2, false); checkIdleStatus(box3, true); checkIdleStatus(box4, true); - AddStep("move to bottom left", () => InputManager.MoveMouseTo(box3.ScreenSpaceDrawQuad.Centre)); - AddStep("move to bottom right", () => InputManager.MoveMouseTo(box4.ScreenSpaceDrawQuad.Centre)); + AddStep("move to bottom left", () => InputManager.MoveMouseTo(box3)); + AddStep("move to bottom right", () => InputManager.MoveMouseTo(box4)); checkIdleStatus(box1, true); checkIdleStatus(box2, false); @@ -97,7 +97,7 @@ namespace osu.Game.Tests.Visual.Components [Test] public void TestTimings() { - AddStep("move to centre", () => InputManager.MoveMouseTo(ScreenSpaceDrawQuad.Centre)); + AddStep("move to centre", () => InputManager.MoveMouseTo(Content)); checkIdleStatus(box1, false); checkIdleStatus(box2, false); From ba97b887b44ab21b87bcbb565dfeba7512510520 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sun, 23 Jun 2019 19:49:23 +0900 Subject: [PATCH 21/32] Allow cusotmisation of the colour portion of the tournament logo header --- .../Screens/Gameplay/Components/MatchHeader.cs | 8 -------- osu.Game.Tournament/Screens/Showcase/TournamentLogo.cs | 6 +----- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/osu.Game.Tournament/Screens/Gameplay/Components/MatchHeader.cs b/osu.Game.Tournament/Screens/Gameplay/Components/MatchHeader.cs index cfa44537d6..9e1888b44b 100644 --- a/osu.Game.Tournament/Screens/Gameplay/Components/MatchHeader.cs +++ b/osu.Game.Tournament/Screens/Gameplay/Components/MatchHeader.cs @@ -5,7 +5,6 @@ using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; -using osu.Framework.Graphics.Shapes; using osu.Framework.Input.Events; using osu.Game.Graphics; using osu.Game.Graphics.Sprites; @@ -191,8 +190,6 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components public RoundDisplay() { - CornerRadius = 10; - Masking = true; Width = 200; Height = 20; } @@ -208,11 +205,6 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components { InternalChildren = new Drawable[] { - new Box - { - Colour = new Color4(47, 71, 67, 255), - RelativeSizeAxes = Axes.Both, - }, new OsuSpriteText { Anchor = Anchor.Centre, diff --git a/osu.Game.Tournament/Screens/Showcase/TournamentLogo.cs b/osu.Game.Tournament/Screens/Showcase/TournamentLogo.cs index 0db3348e5d..6ca542626e 100644 --- a/osu.Game.Tournament/Screens/Showcase/TournamentLogo.cs +++ b/osu.Game.Tournament/Screens/Showcase/TournamentLogo.cs @@ -6,7 +6,6 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Textures; -using osuTK; namespace osu.Game.Tournament.Screens.Showcase { @@ -15,7 +14,7 @@ namespace osu.Game.Tournament.Screens.Showcase public TournamentLogo() { RelativeSizeAxes = Axes.X; - Height = 95; + AutoSizeAxes = Axes.Y; Margin = new MarginPadding { Vertical = 5 }; } @@ -27,9 +26,6 @@ namespace osu.Game.Tournament.Screens.Showcase Texture = textures.Get("game-screen-logo"), Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, - FillMode = FillMode.Fit, - RelativeSizeAxes = Axes.Both, - Size = Vector2.One }; } } From d595860b1471e32f1b41f799aab5f90459502cf9 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sun, 23 Jun 2019 20:09:42 +0900 Subject: [PATCH 22/32] Remove background from team intro screen --- .../Screens/Showcase/TournamentLogo.cs | 13 +++++++++++-- .../Screens/TeamIntro/TeamIntroScreen.cs | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/osu.Game.Tournament/Screens/Showcase/TournamentLogo.cs b/osu.Game.Tournament/Screens/Showcase/TournamentLogo.cs index 6ca542626e..1fee2b29e8 100644 --- a/osu.Game.Tournament/Screens/Showcase/TournamentLogo.cs +++ b/osu.Game.Tournament/Screens/Showcase/TournamentLogo.cs @@ -11,11 +11,20 @@ namespace osu.Game.Tournament.Screens.Showcase { public class TournamentLogo : CompositeDrawable { - public TournamentLogo() + public TournamentLogo(bool includeRoundBackground = true) { RelativeSizeAxes = Axes.X; - AutoSizeAxes = Axes.Y; Margin = new MarginPadding { Vertical = 5 }; + + if (includeRoundBackground) + { + AutoSizeAxes = Axes.Y; + } + else + { + Masking = true; + Height = 100; + } } [BackgroundDependencyLoader] diff --git a/osu.Game.Tournament/Screens/TeamIntro/TeamIntroScreen.cs b/osu.Game.Tournament/Screens/TeamIntro/TeamIntroScreen.cs index 2cb4ffe4e9..c901a5c7ef 100644 --- a/osu.Game.Tournament/Screens/TeamIntro/TeamIntroScreen.cs +++ b/osu.Game.Tournament/Screens/TeamIntro/TeamIntroScreen.cs @@ -34,7 +34,7 @@ namespace osu.Game.Tournament.Screens.TeamIntro RelativeSizeAxes = Axes.Both, Loop = true, }, - new TournamentLogo(), + new TournamentLogo(false), mainContainer = new Container { RelativeSizeAxes = Axes.Both, From 1c20df780a10b6d4204082480506a25b2704f193 Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Sun, 23 Jun 2019 17:08:18 +0300 Subject: [PATCH 23/32] Adjust triangles colour --- osu.Game/Overlays/Profile/ProfileSection.cs | 9 ++++----- osu.Game/Overlays/UserProfileOverlay.cs | 3 +-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/osu.Game/Overlays/Profile/ProfileSection.cs b/osu.Game/Overlays/Profile/ProfileSection.cs index 84009f01ce..688c26ec2e 100644 --- a/osu.Game/Overlays/Profile/ProfileSection.cs +++ b/osu.Game/Overlays/Profile/ProfileSection.cs @@ -3,6 +3,7 @@ using osu.Framework.Allocation; using osu.Framework.Bindables; +using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Colour; using osu.Framework.Graphics.Containers; @@ -118,9 +119,7 @@ namespace osu.Game.Overlays.Profile Anchor = Anchor.BottomCentre, Origin = Anchor.BottomCentre, RelativeSizeAxes = Axes.Both, - Height = 0.95f, - TriangleScale = 4, - Velocity = 0.5f, + TriangleScale = 3, }, foreground = new Box { @@ -133,8 +132,8 @@ namespace osu.Game.Overlays.Profile private void load(OsuColour colours) { triangles.ColourLight = colours.GreySeafoamDark; - triangles.ColourDark = colours.GreySeafoamDarker; - foreground.Colour = ColourInfo.GradientVertical(colours.GreySeafoamDarker, new Color4(0, 0, 0, 0)); + triangles.ColourDark = OsuColour.FromHex("171b1a"); + foreground.Colour = ColourInfo.GradientVertical(colours.GreySeafoamDarker, colours.GreySeafoamDarker.Opacity(0)); } } } diff --git a/osu.Game/Overlays/UserProfileOverlay.cs b/osu.Game/Overlays/UserProfileOverlay.cs index 9a5ba9e3c5..8b2509bfdf 100644 --- a/osu.Game/Overlays/UserProfileOverlay.cs +++ b/osu.Game/Overlays/UserProfileOverlay.cs @@ -188,8 +188,7 @@ namespace osu.Game.Overlays RelativeSizeAxes = Axes.Both; } - protected override FlowContainer CreateScrollContentContainer() - => new FillFlowContainer + protected override FlowContainer CreateScrollContentContainer() => new FillFlowContainer { Direction = FillDirection.Vertical, AutoSizeAxes = Axes.Y, From 8430ac6d1c33e7ea2b9a8d198fc200bf810894dd Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Sun, 23 Jun 2019 19:19:36 +0300 Subject: [PATCH 24/32] remove unused using --- osu.Game/Overlays/Profile/ProfileSection.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/osu.Game/Overlays/Profile/ProfileSection.cs b/osu.Game/Overlays/Profile/ProfileSection.cs index 688c26ec2e..181b96666a 100644 --- a/osu.Game/Overlays/Profile/ProfileSection.cs +++ b/osu.Game/Overlays/Profile/ProfileSection.cs @@ -12,7 +12,6 @@ using osu.Game.Graphics; using osu.Game.Graphics.Backgrounds; using osu.Game.Graphics.Sprites; using osu.Game.Users; -using osuTK.Graphics; namespace osu.Game.Overlays.Profile { From 7bbd6b810f61506b1b60b074e8c8d13ec626e680 Mon Sep 17 00:00:00 2001 From: mulraf <52014176+mulraf@users.noreply.github.com> Date: Sun, 23 Jun 2019 20:33:43 +0200 Subject: [PATCH 25/32] Update PopupDialog.cs New here, i never really programmed on a big project like this. It looks kinda makeshift and i hope it doesn't cause any other issues but i've seen nothing and it fixed the issue for me. It was all dialog boxes that got cut off at the top (so also deleting all beatmaps etc.) --- osu.Game/Overlays/Dialog/PopupDialog.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Overlays/Dialog/PopupDialog.cs b/osu.Game/Overlays/Dialog/PopupDialog.cs index 5949f1fcd4..424d41fd06 100644 --- a/osu.Game/Overlays/Dialog/PopupDialog.cs +++ b/osu.Game/Overlays/Dialog/PopupDialog.cs @@ -134,7 +134,7 @@ namespace osu.Game.Overlays.Dialog Origin = Anchor.BottomCentre, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, - Position = new Vector2(0f, -50f), + Position = new Vector2(0f, 60f), Direction = FillDirection.Vertical, Spacing = new Vector2(0f, 10f), Children = new Drawable[] From dfb791ed3e32440c1d293f1f65690f8949bcdafc Mon Sep 17 00:00:00 2001 From: mulraf <52014176+mulraf@users.noreply.github.com> Date: Sun, 23 Jun 2019 22:59:14 +0200 Subject: [PATCH 26/32] Update PopupDialog.cs Changed Spacings --- osu.Game/Overlays/Dialog/PopupDialog.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/osu.Game/Overlays/Dialog/PopupDialog.cs b/osu.Game/Overlays/Dialog/PopupDialog.cs index 424d41fd06..36fd4c6e7f 100644 --- a/osu.Game/Overlays/Dialog/PopupDialog.cs +++ b/osu.Game/Overlays/Dialog/PopupDialog.cs @@ -134,9 +134,9 @@ namespace osu.Game.Overlays.Dialog Origin = Anchor.BottomCentre, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, - Position = new Vector2(0f, 60f), + Position = new Vector2(0f, -40f), Direction = FillDirection.Vertical, - Spacing = new Vector2(0f, 10f), + Spacing = new Vector2(0f, 5f), Children = new Drawable[] { new Container @@ -146,7 +146,7 @@ namespace osu.Game.Overlays.Dialog Size = ringSize, Margin = new MarginPadding { - Bottom = 30, + Bottom = 0, }, Children = new Drawable[] { @@ -181,14 +181,17 @@ namespace osu.Game.Overlays.Dialog Anchor = Anchor.TopCentre, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, - Padding = new MarginPadding(15), + Padding = new MarginPadding(5), TextAnchor = Anchor.TopCentre, }, body = new OsuTextFlowContainer(t => t.Font = t.Font.With(size: 18)) { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, - Padding = new MarginPadding(15), + Padding = new MarginPadding { + Top = 5, + Bottom = -20, + }, TextAnchor = Anchor.TopCentre, }, }, From 4ec064e1799ea2c0d892b7768f94f41dab00295d Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 24 Jun 2019 11:00:00 +0900 Subject: [PATCH 27/32] Fix test timing regressions due to increased step count --- .../Visual/Components/TestSceneIdleTracker.cs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs b/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs index ef889e29a8..0540c1bbbb 100644 --- a/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs +++ b/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs @@ -5,6 +5,7 @@ using NUnit.Framework; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; +using osu.Framework.Testing; using osu.Game.Input; using osuTK; using osuTK.Graphics; @@ -19,11 +20,17 @@ namespace osu.Game.Tests.Visual.Components private readonly IdleTrackingBox box3; private readonly IdleTrackingBox box4; + [SetUpSteps] + public void SetUpSteps() + { + AddStep("reset mouse position", () => InputManager.MoveMouseTo(Vector2.Zero)); + } + public TestSceneIdleTracker() { Children = new Drawable[] { - box1 = new IdleTrackingBox(1000) + box1 = new IdleTrackingBox(2000) { Name = "TopLeft", RelativeSizeAxes = Axes.Both, @@ -31,7 +38,7 @@ namespace osu.Game.Tests.Visual.Components Anchor = Anchor.TopLeft, Origin = Anchor.TopLeft, }, - box2 = new IdleTrackingBox(2000) + box2 = new IdleTrackingBox(4000) { Name = "TopRight", RelativeSizeAxes = Axes.Both, @@ -39,7 +46,7 @@ namespace osu.Game.Tests.Visual.Components Anchor = Anchor.TopRight, Origin = Anchor.TopRight, }, - box3 = new IdleTrackingBox(3000) + box3 = new IdleTrackingBox(6000) { Name = "BottomLeft", RelativeSizeAxes = Axes.Both, @@ -47,7 +54,7 @@ namespace osu.Game.Tests.Visual.Components Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft, }, - box4 = new IdleTrackingBox(4000) + box4 = new IdleTrackingBox(8000) { Name = "BottomRight", RelativeSizeAxes = Axes.Both, From da2ba5bf0995c18fa88330e22c2d51a5e57718c3 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 24 Jun 2019 11:09:59 +0900 Subject: [PATCH 28/32] Allow tests to be run in non-sequential order --- .../Visual/Components/TestSceneIdleTracker.cs | 84 +++++++++---------- 1 file changed, 41 insertions(+), 43 deletions(-) diff --git a/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs b/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs index 0540c1bbbb..9eead3f9fb 100644 --- a/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs +++ b/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs @@ -5,7 +5,6 @@ using NUnit.Framework; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; -using osu.Framework.Testing; using osu.Game.Input; using osuTK; using osuTK.Graphics; @@ -15,20 +14,19 @@ namespace osu.Game.Tests.Visual.Components [TestFixture] public class TestSceneIdleTracker : ManualInputManagerTestScene { - private readonly IdleTrackingBox box1; - private readonly IdleTrackingBox box2; - private readonly IdleTrackingBox box3; - private readonly IdleTrackingBox box4; + private IdleTrackingBox box1; + private IdleTrackingBox box2; + private IdleTrackingBox box3; + private IdleTrackingBox box4; - [SetUpSteps] - public void SetUpSteps() - { - AddStep("reset mouse position", () => InputManager.MoveMouseTo(Vector2.Zero)); - } + private IdleTrackingBox[] boxes; - public TestSceneIdleTracker() + [SetUp] + public void SetUp() => Schedule(() => { - Children = new Drawable[] + InputManager.MoveMouseTo(Vector2.Zero); + + Children = boxes = new IdleTrackingBox[] { box1 = new IdleTrackingBox(2000) { @@ -63,7 +61,7 @@ namespace osu.Game.Tests.Visual.Components Origin = Anchor.BottomRight, }, }; - } + }); [Test] public void TestNudge() @@ -74,10 +72,10 @@ namespace osu.Game.Tests.Visual.Components AddStep("nudge mouse", () => InputManager.MoveMouseTo(box1.ScreenSpaceDrawQuad.Centre + new Vector2(1))); - checkIdleStatus(box1, false); - checkIdleStatus(box2, true); - checkIdleStatus(box3, true); - checkIdleStatus(box4, true); + checkIdleStatus(1, false); + checkIdleStatus(2, true); + checkIdleStatus(3, true); + checkIdleStatus(4, true); } [Test] @@ -85,18 +83,18 @@ namespace osu.Game.Tests.Visual.Components { AddStep("move to top right", () => InputManager.MoveMouseTo(box2)); - checkIdleStatus(box1, true); - checkIdleStatus(box2, false); - checkIdleStatus(box3, true); - checkIdleStatus(box4, true); + checkIdleStatus(1, true); + checkIdleStatus(2, false); + checkIdleStatus(3, true); + checkIdleStatus(4, true); AddStep("move to bottom left", () => InputManager.MoveMouseTo(box3)); AddStep("move to bottom right", () => InputManager.MoveMouseTo(box4)); - checkIdleStatus(box1, true); - checkIdleStatus(box2, false); - checkIdleStatus(box3, false); - checkIdleStatus(box4, false); + checkIdleStatus(1, true); + checkIdleStatus(2, false); + checkIdleStatus(3, false); + checkIdleStatus(4, false); waitForAllIdle(); } @@ -106,38 +104,38 @@ namespace osu.Game.Tests.Visual.Components { AddStep("move to centre", () => InputManager.MoveMouseTo(Content)); - checkIdleStatus(box1, false); - checkIdleStatus(box2, false); - checkIdleStatus(box3, false); - checkIdleStatus(box4, false); + checkIdleStatus(1, false); + checkIdleStatus(2, false); + checkIdleStatus(3, false); + checkIdleStatus(4, false); AddUntilStep("Wait for idle", () => box1.IsIdle); - checkIdleStatus(box1, true); - checkIdleStatus(box2, false); - checkIdleStatus(box3, false); - checkIdleStatus(box4, false); + checkIdleStatus(1, true); + checkIdleStatus(2, false); + checkIdleStatus(3, false); + checkIdleStatus(4, false); AddUntilStep("Wait for idle", () => box2.IsIdle); - checkIdleStatus(box1, true); - checkIdleStatus(box2, true); - checkIdleStatus(box3, false); - checkIdleStatus(box4, false); + checkIdleStatus(1, true); + checkIdleStatus(2, true); + checkIdleStatus(3, false); + checkIdleStatus(4, false); AddUntilStep("Wait for idle", () => box3.IsIdle); - checkIdleStatus(box1, true); - checkIdleStatus(box2, true); - checkIdleStatus(box3, true); - checkIdleStatus(box4, false); + checkIdleStatus(1, true); + checkIdleStatus(2, true); + checkIdleStatus(3, true); + checkIdleStatus(4, false); waitForAllIdle(); } - private void checkIdleStatus(IdleTrackingBox box, bool expectedIdle) + private void checkIdleStatus(int box, bool expectedIdle) { - AddAssert($"{box.Name} is {(expectedIdle ? "idle" : "active")}", () => box.IsIdle == expectedIdle); + AddAssert($"box {box} is {(expectedIdle ? "idle" : "active")}", () => boxes[box - 1].IsIdle == expectedIdle); } private void waitForAllIdle() From 024157b13f1a732ec8d669564213de83e8bbe8b9 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 24 Jun 2019 11:10:29 +0900 Subject: [PATCH 29/32] Remove unnecessary type specification --- osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs b/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs index 9eead3f9fb..55aaeed8bf 100644 --- a/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs +++ b/osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs @@ -26,7 +26,7 @@ namespace osu.Game.Tests.Visual.Components { InputManager.MoveMouseTo(Vector2.Zero); - Children = boxes = new IdleTrackingBox[] + Children = boxes = new[] { box1 = new IdleTrackingBox(2000) { From c988dfbdaaee28b1b00ddeda1e51bf84f16c965f Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 24 Jun 2019 11:43:30 +0900 Subject: [PATCH 30/32] Make things a bit more sensible --- osu.Game/Overlays/Dialog/PopupDialog.cs | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/osu.Game/Overlays/Dialog/PopupDialog.cs b/osu.Game/Overlays/Dialog/PopupDialog.cs index 36fd4c6e7f..1022edfe81 100644 --- a/osu.Game/Overlays/Dialog/PopupDialog.cs +++ b/osu.Game/Overlays/Dialog/PopupDialog.cs @@ -134,9 +134,9 @@ namespace osu.Game.Overlays.Dialog Origin = Anchor.BottomCentre, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, - Position = new Vector2(0f, -40f), Direction = FillDirection.Vertical, - Spacing = new Vector2(0f, 5f), + Spacing = new Vector2(0f, 10f), + Padding = new MarginPadding { Bottom = 10 }, Children = new Drawable[] { new Container @@ -144,10 +144,6 @@ namespace osu.Game.Overlays.Dialog Origin = Anchor.TopCentre, Anchor = Anchor.TopCentre, Size = ringSize, - Margin = new MarginPadding - { - Bottom = 0, - }, Children = new Drawable[] { ring = new CircularContainer @@ -181,18 +177,15 @@ namespace osu.Game.Overlays.Dialog Anchor = Anchor.TopCentre, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, - Padding = new MarginPadding(5), TextAnchor = Anchor.TopCentre, }, body = new OsuTextFlowContainer(t => t.Font = t.Font.With(size: 18)) { + Origin = Anchor.TopCentre, + Anchor = Anchor.TopCentre, + TextAnchor = Anchor.TopCentre, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, - Padding = new MarginPadding { - Top = 5, - Bottom = -20, - }, - TextAnchor = Anchor.TopCentre, }, }, }, From 8d6fc3edf06e028f7da66863c9a9aa36a6569ac5 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Mon, 24 Jun 2019 11:54:41 +0900 Subject: [PATCH 31/32] Fix multiplayer create button appearing in match song selection --- osu.Game/Screens/Multi/Multiplayer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Screens/Multi/Multiplayer.cs b/osu.Game/Screens/Multi/Multiplayer.cs index 5252b41dfd..a56d153646 100644 --- a/osu.Game/Screens/Multi/Multiplayer.cs +++ b/osu.Game/Screens/Multi/Multiplayer.cs @@ -257,7 +257,7 @@ namespace osu.Game.Screens.Multi private void subScreenChanged(IScreen newScreen) { updatePollingRate(isIdle.Value); - createButton.FadeTo(newScreen is MatchSubScreen ? 0 : 1, 200); + createButton.FadeTo(newScreen is LoungeSubScreen ? 1 : 0, 200); updateTrack(); } From 5272b3a929975d0453b17d298b6ecf5b59d49ad7 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Mon, 24 Jun 2019 13:27:58 +0900 Subject: [PATCH 32/32] Use .Darken() instead of hex-based colour --- osu.Game/Overlays/Profile/ProfileSection.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Overlays/Profile/ProfileSection.cs b/osu.Game/Overlays/Profile/ProfileSection.cs index 181b96666a..f3590d4bb7 100644 --- a/osu.Game/Overlays/Profile/ProfileSection.cs +++ b/osu.Game/Overlays/Profile/ProfileSection.cs @@ -131,7 +131,7 @@ namespace osu.Game.Overlays.Profile private void load(OsuColour colours) { triangles.ColourLight = colours.GreySeafoamDark; - triangles.ColourDark = OsuColour.FromHex("171b1a"); + triangles.ColourDark = colours.GreySeafoamDarker.Darken(0.2f); foreground.Colour = ColourInfo.GradientVertical(colours.GreySeafoamDarker, colours.GreySeafoamDarker.Opacity(0)); } }