From 65869c7ebba728b9727d53fcf39caf11c68c9d67 Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Tue, 10 Sep 2019 04:04:37 +0300 Subject: [PATCH 1/8] Refactor LeaderboardScopeSelector for more extensibility --- .../UserInterface/GradientLineTabControl.cs | 129 ++++++++++++++++++ .../BeatmapSet/LeaderboardScopeSelector.cs | 93 +------------ 2 files changed, 131 insertions(+), 91 deletions(-) create mode 100644 osu.Game/Graphics/UserInterface/GradientLineTabControl.cs diff --git a/osu.Game/Graphics/UserInterface/GradientLineTabControl.cs b/osu.Game/Graphics/UserInterface/GradientLineTabControl.cs new file mode 100644 index 0000000000..f4c43b0222 --- /dev/null +++ b/osu.Game/Graphics/UserInterface/GradientLineTabControl.cs @@ -0,0 +1,129 @@ +// 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.Graphics.UserInterface; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Containers; +using osuTK; +using osu.Framework.Graphics.Shapes; +using osuTK.Graphics; +using osu.Framework.Graphics.Colour; +using osu.Framework.Input.Events; +using osu.Framework.Bindables; +using osu.Framework.Extensions.Color4Extensions; + +namespace osu.Game.Graphics.UserInterface +{ + public class GradientLineTabControl : PageTabControl + { + protected override Dropdown CreateDropdown() => null; + + protected override TabItem CreateTabItem(TModel value) => new ScopeSelectorTabItem(value); + + protected Color4 LineColour + { + get => line.MainColour.Value; + set => line.MainColour.Value = value; + } + + private readonly GradientLine line; + + public GradientLineTabControl() + { + RelativeSizeAxes = Axes.X; + + AddInternal(line = new GradientLine + { + Anchor = Anchor.BottomCentre, + Origin = Anchor.BottomCentre, + }); + } + + protected override TabFillFlowContainer CreateTabFlow() => new TabFillFlowContainer + { + Anchor = Anchor.BottomCentre, + Origin = Anchor.BottomCentre, + AutoSizeAxes = Axes.X, + RelativeSizeAxes = Axes.Y, + Direction = FillDirection.Horizontal, + Spacing = new Vector2(20, 0), + }; + + private class ScopeSelectorTabItem : PageTabItem + { + public ScopeSelectorTabItem(TModel value) + : base(value) + { + Text.Font = OsuFont.GetFont(size: 16); + } + + protected override bool OnHover(HoverEvent e) + { + Text.FadeColour(AccentColour); + + return base.OnHover(e); + } + + protected override void OnHoverLost(HoverLostEvent e) + { + base.OnHoverLost(e); + + Text.FadeColour(Color4.White); + } + } + + private class GradientLine : GridContainer + { + public readonly Bindable MainColour = new Bindable(); + + private readonly Box left; + private readonly Box middle; + private readonly Box right; + + public GradientLine() + { + RelativeSizeAxes = Axes.X; + Size = new Vector2(0.8f, 1.5f); + + ColumnDimensions = new[] + { + new Dimension(), + new Dimension(mode: GridSizeMode.Relative, size: 0.4f), + new Dimension(), + }; + + Content = new[] + { + new Drawable[] + { + left = new Box + { + RelativeSizeAxes = Axes.Both, + }, + middle = new Box + { + RelativeSizeAxes = Axes.Both, + }, + right = new Box + { + RelativeSizeAxes = Axes.Both, + }, + } + }; + } + + protected override void LoadComplete() + { + MainColour.BindValueChanged(onColourChanged, true); + base.LoadComplete(); + } + + private void onColourChanged(ValueChangedEvent colour) + { + left.Colour = ColourInfo.GradientHorizontal(colour.NewValue.Opacity(0), colour.NewValue); + middle.Colour = colour.NewValue; + right.Colour = ColourInfo.GradientHorizontal(colour.NewValue, colour.NewValue.Opacity(0)); + } + } + } +} diff --git a/osu.Game/Overlays/BeatmapSet/LeaderboardScopeSelector.cs b/osu.Game/Overlays/BeatmapSet/LeaderboardScopeSelector.cs index dcd58db427..bdcd5c21b9 100644 --- a/osu.Game/Overlays/BeatmapSet/LeaderboardScopeSelector.cs +++ b/osu.Game/Overlays/BeatmapSet/LeaderboardScopeSelector.cs @@ -1,119 +1,30 @@ // 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.Graphics.UserInterface; using osu.Game.Screens.Select.Leaderboards; -using osu.Framework.Graphics; -using osu.Framework.Graphics.Containers; -using osuTK; using osu.Game.Graphics.UserInterface; -using osu.Framework.Graphics.Shapes; using osu.Game.Graphics; using osu.Framework.Allocation; using osuTK.Graphics; -using osu.Framework.Graphics.Colour; -using osu.Framework.Input.Events; namespace osu.Game.Overlays.BeatmapSet { - public class LeaderboardScopeSelector : PageTabControl + public class LeaderboardScopeSelector : GradientLineTabControl { protected override bool AddEnumEntriesAutomatically => false; - protected override Dropdown CreateDropdown() => null; - - protected override TabItem CreateTabItem(BeatmapLeaderboardScope value) => new ScopeSelectorTabItem(value); - public LeaderboardScopeSelector() { - RelativeSizeAxes = Axes.X; - AddItem(BeatmapLeaderboardScope.Global); AddItem(BeatmapLeaderboardScope.Country); AddItem(BeatmapLeaderboardScope.Friend); - - AddInternal(new GradientLine - { - Anchor = Anchor.BottomCentre, - Origin = Anchor.BottomCentre, - }); } [BackgroundDependencyLoader] private void load(OsuColour colours) { AccentColour = colours.Blue; - } - - protected override TabFillFlowContainer CreateTabFlow() => new TabFillFlowContainer - { - Anchor = Anchor.BottomCentre, - Origin = Anchor.BottomCentre, - AutoSizeAxes = Axes.X, - RelativeSizeAxes = Axes.Y, - Direction = FillDirection.Horizontal, - Spacing = new Vector2(20, 0), - }; - - private class ScopeSelectorTabItem : PageTabItem - { - public ScopeSelectorTabItem(BeatmapLeaderboardScope value) - : base(value) - { - Text.Font = OsuFont.GetFont(size: 16); - } - - protected override bool OnHover(HoverEvent e) - { - Text.FadeColour(AccentColour); - - return base.OnHover(e); - } - - protected override void OnHoverLost(HoverLostEvent e) - { - base.OnHoverLost(e); - - Text.FadeColour(Color4.White); - } - } - - private class GradientLine : GridContainer - { - public GradientLine() - { - RelativeSizeAxes = Axes.X; - Size = new Vector2(0.8f, 1.5f); - - ColumnDimensions = new[] - { - new Dimension(), - new Dimension(mode: GridSizeMode.Relative, size: 0.4f), - new Dimension(), - }; - - Content = new[] - { - new Drawable[] - { - new Box - { - RelativeSizeAxes = Axes.Both, - Colour = ColourInfo.GradientHorizontal(Color4.Transparent, Color4.Gray), - }, - new Box - { - RelativeSizeAxes = Axes.Both, - Colour = Color4.Gray, - }, - new Box - { - RelativeSizeAxes = Axes.Both, - Colour = ColourInfo.GradientHorizontal(Color4.Gray, Color4.Transparent), - }, - } - }; - } + LineColour = Color4.Gray; } } } From 03bd7ca8e72a88d2551887b742281374bec2ee14 Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Tue, 10 Sep 2019 04:20:32 +0300 Subject: [PATCH 2/8] Implement RankingsScopeSelector --- .../Online/TestSceneRankingsScopeSelector.cs | 53 +++++++++++++++++++ .../UserInterface/GradientLineTabControl.cs | 26 --------- .../BeatmapSet/LeaderboardScopeSelector.cs | 28 ++++++++++ osu.Game/Overlays/RankingsScopeSelector.cs | 26 +++++++++ 4 files changed, 107 insertions(+), 26 deletions(-) create mode 100644 osu.Game.Tests/Visual/Online/TestSceneRankingsScopeSelector.cs create mode 100644 osu.Game/Overlays/RankingsScopeSelector.cs diff --git a/osu.Game.Tests/Visual/Online/TestSceneRankingsScopeSelector.cs b/osu.Game.Tests/Visual/Online/TestSceneRankingsScopeSelector.cs new file mode 100644 index 0000000000..1488addb09 --- /dev/null +++ b/osu.Game.Tests/Visual/Online/TestSceneRankingsScopeSelector.cs @@ -0,0 +1,53 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +using System; +using System.Collections.Generic; +using osu.Framework.Graphics; +using osu.Framework.Bindables; +using osu.Game.Overlays; +using osu.Framework.Graphics.Shapes; +using osu.Framework.Allocation; +using osu.Game.Graphics; +using osu.Framework.Extensions.Color4Extensions; + +namespace osu.Game.Tests.Visual.Online +{ + public class TestSceneRankingsScopeSelector : OsuTestScene + { + public override IReadOnlyList RequiredTypes => new[] + { + typeof(RankingsScopeSelector), + }; + + private readonly Box background; + + public TestSceneRankingsScopeSelector() + { + Bindable scope = new Bindable(); + + Add(background = new Box + { + RelativeSizeAxes = Axes.Both + }); + + Add(new RankingsScopeSelector + { + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + Current = { BindTarget = scope } + }); + + AddStep(@"Select country", () => scope.Value = RankingsScope.Country); + AddStep(@"Select performance", () => scope.Value = RankingsScope.Performance); + AddStep(@"Select score", () => scope.Value = RankingsScope.Score); + AddStep(@"Select spotlights", () => scope.Value = RankingsScope.Spotlights); + } + + [BackgroundDependencyLoader] + private void load(OsuColour colours) + { + background.Colour = colours.Yellow.Opacity(50); + } + } +} diff --git a/osu.Game/Graphics/UserInterface/GradientLineTabControl.cs b/osu.Game/Graphics/UserInterface/GradientLineTabControl.cs index f4c43b0222..7cd8d2c5bd 100644 --- a/osu.Game/Graphics/UserInterface/GradientLineTabControl.cs +++ b/osu.Game/Graphics/UserInterface/GradientLineTabControl.cs @@ -8,7 +8,6 @@ using osuTK; using osu.Framework.Graphics.Shapes; using osuTK.Graphics; using osu.Framework.Graphics.Colour; -using osu.Framework.Input.Events; using osu.Framework.Bindables; using osu.Framework.Extensions.Color4Extensions; @@ -18,8 +17,6 @@ namespace osu.Game.Graphics.UserInterface { protected override Dropdown CreateDropdown() => null; - protected override TabItem CreateTabItem(TModel value) => new ScopeSelectorTabItem(value); - protected Color4 LineColour { get => line.MainColour.Value; @@ -49,29 +46,6 @@ namespace osu.Game.Graphics.UserInterface Spacing = new Vector2(20, 0), }; - private class ScopeSelectorTabItem : PageTabItem - { - public ScopeSelectorTabItem(TModel value) - : base(value) - { - Text.Font = OsuFont.GetFont(size: 16); - } - - protected override bool OnHover(HoverEvent e) - { - Text.FadeColour(AccentColour); - - return base.OnHover(e); - } - - protected override void OnHoverLost(HoverLostEvent e) - { - base.OnHoverLost(e); - - Text.FadeColour(Color4.White); - } - } - private class GradientLine : GridContainer { public readonly Bindable MainColour = new Bindable(); diff --git a/osu.Game/Overlays/BeatmapSet/LeaderboardScopeSelector.cs b/osu.Game/Overlays/BeatmapSet/LeaderboardScopeSelector.cs index bdcd5c21b9..e2a725ec46 100644 --- a/osu.Game/Overlays/BeatmapSet/LeaderboardScopeSelector.cs +++ b/osu.Game/Overlays/BeatmapSet/LeaderboardScopeSelector.cs @@ -6,6 +6,9 @@ using osu.Game.Graphics.UserInterface; using osu.Game.Graphics; using osu.Framework.Allocation; using osuTK.Graphics; +using osu.Framework.Graphics.UserInterface; +using osu.Framework.Input.Events; +using osu.Framework.Graphics; namespace osu.Game.Overlays.BeatmapSet { @@ -13,6 +16,8 @@ namespace osu.Game.Overlays.BeatmapSet { protected override bool AddEnumEntriesAutomatically => false; + protected override TabItem CreateTabItem(BeatmapLeaderboardScope value) => new ScopeSelectorTabItem(value); + public LeaderboardScopeSelector() { AddItem(BeatmapLeaderboardScope.Global); @@ -26,5 +31,28 @@ namespace osu.Game.Overlays.BeatmapSet AccentColour = colours.Blue; LineColour = Color4.Gray; } + + private class ScopeSelectorTabItem : PageTabItem + { + public ScopeSelectorTabItem(BeatmapLeaderboardScope value) + : base(value) + { + Text.Font = OsuFont.GetFont(size: 16); + } + + protected override bool OnHover(HoverEvent e) + { + Text.FadeColour(AccentColour); + + return base.OnHover(e); + } + + protected override void OnHoverLost(HoverLostEvent e) + { + base.OnHoverLost(e); + + Text.FadeColour(Color4.White); + } + } } } diff --git a/osu.Game/Overlays/RankingsScopeSelector.cs b/osu.Game/Overlays/RankingsScopeSelector.cs new file mode 100644 index 0000000000..5935876ec9 --- /dev/null +++ b/osu.Game/Overlays/RankingsScopeSelector.cs @@ -0,0 +1,26 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +using osu.Game.Graphics.UserInterface; +using osu.Framework.Allocation; +using osuTK.Graphics; + +namespace osu.Game.Overlays +{ + public class RankingsScopeSelector : GradientLineTabControl + { + [BackgroundDependencyLoader] + private void load() + { + AccentColour = LineColour = Color4.Black; + } + } + + public enum RankingsScope + { + Performance, + Spotlights, + Score, + Country + } +} From 1969c5b89bccc3788a295d14ecc8e83412b58da7 Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Tue, 10 Sep 2019 16:36:05 +0300 Subject: [PATCH 3/8] Apply suggetsted changes --- .../Online/TestSceneRankingsScopeSelector.cs | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/osu.Game.Tests/Visual/Online/TestSceneRankingsScopeSelector.cs b/osu.Game.Tests/Visual/Online/TestSceneRankingsScopeSelector.cs index 1488addb09..93a00e1d06 100644 --- a/osu.Game.Tests/Visual/Online/TestSceneRankingsScopeSelector.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneRankingsScopeSelector.cs @@ -9,7 +9,6 @@ using osu.Game.Overlays; using osu.Framework.Graphics.Shapes; using osu.Framework.Allocation; using osu.Game.Graphics; -using osu.Framework.Extensions.Color4Extensions; namespace osu.Game.Tests.Visual.Online { @@ -24,18 +23,20 @@ namespace osu.Game.Tests.Visual.Online public TestSceneRankingsScopeSelector() { - Bindable scope = new Bindable(); + var scope = new Bindable(); - Add(background = new Box + AddRange(new Drawable[] { - RelativeSizeAxes = Axes.Both - }); - - Add(new RankingsScopeSelector - { - Anchor = Anchor.Centre, - Origin = Anchor.Centre, - Current = { BindTarget = scope } + background = new Box + { + RelativeSizeAxes = Axes.Both + }, + new RankingsScopeSelector + { + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + Current = { BindTarget = scope } + } }); AddStep(@"Select country", () => scope.Value = RankingsScope.Country); @@ -47,7 +48,7 @@ namespace osu.Game.Tests.Visual.Online [BackgroundDependencyLoader] private void load(OsuColour colours) { - background.Colour = colours.Yellow.Opacity(50); + background.Colour = colours.GreySeafoam; } } } From 41ad44791bfc2918af739f05273e244e180b7f20 Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Wed, 11 Sep 2019 11:58:18 +0300 Subject: [PATCH 4/8] Move RankingsScopeSelector to another namespace --- osu.Game.Tests/Visual/Online/TestSceneRankingsScopeSelector.cs | 2 +- osu.Game/Overlays/{ => Rankings}/RankingsScopeSelector.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename osu.Game/Overlays/{ => Rankings}/RankingsScopeSelector.cs (94%) diff --git a/osu.Game.Tests/Visual/Online/TestSceneRankingsScopeSelector.cs b/osu.Game.Tests/Visual/Online/TestSceneRankingsScopeSelector.cs index 93a00e1d06..2081a6c0cb 100644 --- a/osu.Game.Tests/Visual/Online/TestSceneRankingsScopeSelector.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneRankingsScopeSelector.cs @@ -5,10 +5,10 @@ using System; using System.Collections.Generic; using osu.Framework.Graphics; using osu.Framework.Bindables; -using osu.Game.Overlays; using osu.Framework.Graphics.Shapes; using osu.Framework.Allocation; using osu.Game.Graphics; +using osu.Game.Overlays.Rankings; namespace osu.Game.Tests.Visual.Online { diff --git a/osu.Game/Overlays/RankingsScopeSelector.cs b/osu.Game/Overlays/Rankings/RankingsScopeSelector.cs similarity index 94% rename from osu.Game/Overlays/RankingsScopeSelector.cs rename to osu.Game/Overlays/Rankings/RankingsScopeSelector.cs index 5935876ec9..2095bcc61c 100644 --- a/osu.Game/Overlays/RankingsScopeSelector.cs +++ b/osu.Game/Overlays/Rankings/RankingsScopeSelector.cs @@ -5,7 +5,7 @@ using osu.Game.Graphics.UserInterface; using osu.Framework.Allocation; using osuTK.Graphics; -namespace osu.Game.Overlays +namespace osu.Game.Overlays.Rankings { public class RankingsScopeSelector : GradientLineTabControl { From b17d097a39d7edd1d15f6d2744029d47c7f2b08d Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Thu, 12 Sep 2019 17:17:57 +0300 Subject: [PATCH 5/8] Simplify colour usage in GradientLine --- .../UserInterface/GradientLineTabControl.cs | 38 +++++-------------- 1 file changed, 10 insertions(+), 28 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/GradientLineTabControl.cs b/osu.Game/Graphics/UserInterface/GradientLineTabControl.cs index 7cd8d2c5bd..3523876fca 100644 --- a/osu.Game/Graphics/UserInterface/GradientLineTabControl.cs +++ b/osu.Game/Graphics/UserInterface/GradientLineTabControl.cs @@ -8,7 +8,6 @@ using osuTK; using osu.Framework.Graphics.Shapes; using osuTK.Graphics; using osu.Framework.Graphics.Colour; -using osu.Framework.Bindables; using osu.Framework.Extensions.Color4Extensions; namespace osu.Game.Graphics.UserInterface @@ -19,8 +18,8 @@ namespace osu.Game.Graphics.UserInterface protected Color4 LineColour { - get => line.MainColour.Value; - set => line.MainColour.Value = value; + get => line.Colour; + set => line.Colour = value; } private readonly GradientLine line; @@ -48,12 +47,6 @@ namespace osu.Game.Graphics.UserInterface private class GradientLine : GridContainer { - public readonly Bindable MainColour = new Bindable(); - - private readonly Box left; - private readonly Box middle; - private readonly Box right; - public GradientLine() { RelativeSizeAxes = Axes.X; @@ -70,34 +63,23 @@ namespace osu.Game.Graphics.UserInterface { new Drawable[] { - left = new Box + new Box + { + RelativeSizeAxes = Axes.Both, + Colour = ColourInfo.GradientHorizontal(Color4.White.Opacity(0), Color4.White) + }, + new Box { RelativeSizeAxes = Axes.Both, }, - middle = new Box - { - RelativeSizeAxes = Axes.Both, - }, - right = new Box + new Box { RelativeSizeAxes = Axes.Both, + Colour = ColourInfo.GradientHorizontal(Color4.White, Color4.White.Opacity(0)) }, } }; } - - protected override void LoadComplete() - { - MainColour.BindValueChanged(onColourChanged, true); - base.LoadComplete(); - } - - private void onColourChanged(ValueChangedEvent colour) - { - left.Colour = ColourInfo.GradientHorizontal(colour.NewValue.Opacity(0), colour.NewValue); - middle.Colour = colour.NewValue; - right.Colour = ColourInfo.GradientHorizontal(colour.NewValue, colour.NewValue.Opacity(0)); - } } } } From 7ee01ee3233a5a3d7eee3b1f41a018d923567e35 Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Thu, 12 Sep 2019 18:11:48 +0300 Subject: [PATCH 6/8] Use assignment instead of binding --- osu.Game.Tests/Visual/Online/TestSceneRankingsScopeSelector.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Tests/Visual/Online/TestSceneRankingsScopeSelector.cs b/osu.Game.Tests/Visual/Online/TestSceneRankingsScopeSelector.cs index 2081a6c0cb..178016c648 100644 --- a/osu.Game.Tests/Visual/Online/TestSceneRankingsScopeSelector.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneRankingsScopeSelector.cs @@ -35,7 +35,7 @@ namespace osu.Game.Tests.Visual.Online { Anchor = Anchor.Centre, Origin = Anchor.Centre, - Current = { BindTarget = scope } + Current = scope } }); From b917f29cfe6cccf9158332edc694572cbb7c302b Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 13 Sep 2019 13:59:06 +0900 Subject: [PATCH 7/8] Make GradientLineTabControl abstract --- osu.Game/Graphics/UserInterface/GradientLineTabControl.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/GradientLineTabControl.cs b/osu.Game/Graphics/UserInterface/GradientLineTabControl.cs index 3523876fca..a9bbda4194 100644 --- a/osu.Game/Graphics/UserInterface/GradientLineTabControl.cs +++ b/osu.Game/Graphics/UserInterface/GradientLineTabControl.cs @@ -12,10 +12,8 @@ using osu.Framework.Extensions.Color4Extensions; namespace osu.Game.Graphics.UserInterface { - public class GradientLineTabControl : PageTabControl + public abstract class GradientLineTabControl : PageTabControl { - protected override Dropdown CreateDropdown() => null; - protected Color4 LineColour { get => line.Colour; @@ -24,7 +22,7 @@ namespace osu.Game.Graphics.UserInterface private readonly GradientLine line; - public GradientLineTabControl() + protected GradientLineTabControl() { RelativeSizeAxes = Axes.X; @@ -35,6 +33,8 @@ namespace osu.Game.Graphics.UserInterface }); } + protected override Dropdown CreateDropdown() => null; + protected override TabFillFlowContainer CreateTabFlow() => new TabFillFlowContainer { Anchor = Anchor.BottomCentre, From 0e679fb468a4ee27dc0b57bd6aefbcfbce67ccfc Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 13 Sep 2019 14:06:19 +0900 Subject: [PATCH 8/8] Use colour constant rather than opacity helper function --- osu.Game/Graphics/UserInterface/GradientLineTabControl.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/GradientLineTabControl.cs b/osu.Game/Graphics/UserInterface/GradientLineTabControl.cs index a9bbda4194..4fd4a2adbd 100644 --- a/osu.Game/Graphics/UserInterface/GradientLineTabControl.cs +++ b/osu.Game/Graphics/UserInterface/GradientLineTabControl.cs @@ -8,7 +8,6 @@ using osuTK; using osu.Framework.Graphics.Shapes; using osuTK.Graphics; using osu.Framework.Graphics.Colour; -using osu.Framework.Extensions.Color4Extensions; namespace osu.Game.Graphics.UserInterface { @@ -66,7 +65,7 @@ namespace osu.Game.Graphics.UserInterface new Box { RelativeSizeAxes = Axes.Both, - Colour = ColourInfo.GradientHorizontal(Color4.White.Opacity(0), Color4.White) + Colour = ColourInfo.GradientHorizontal(Color4.Transparent, Color4.White) }, new Box { @@ -75,7 +74,7 @@ namespace osu.Game.Graphics.UserInterface new Box { RelativeSizeAxes = Axes.Both, - Colour = ColourInfo.GradientHorizontal(Color4.White, Color4.White.Opacity(0)) + Colour = ColourInfo.GradientHorizontal(Color4.White, Color4.Transparent) }, } };