From 132cb8f47377b45aa97575a43cc5a04abc850148 Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Sat, 22 Jun 2019 01:11:04 +0300 Subject: [PATCH 01/15] 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 02/15] 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 03/15] 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 04/15] 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 05/15] 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 1c20df780a10b6d4204082480506a25b2704f193 Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Sun, 23 Jun 2019 17:08:18 +0300 Subject: [PATCH 06/15] 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 07/15] 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 08/15] 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 09/15] 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 10/15] 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 11/15] 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 12/15] 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 13/15] 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 14/15] 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 15/15] 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)); } }