From 73e822e08db765e1a3fbc1f1fdea8bab88d029df Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Sat, 25 Jan 2020 06:46:54 +0300 Subject: [PATCH] Make waves colour dependent on overlay colour scheme --- osu.Game/Overlays/ChangelogOverlay.cs | 5 ----- osu.Game/Overlays/DirectOverlay.cs | 7 ------- osu.Game/Overlays/FullscreenOverlay.cs | 14 +++++++------- osu.Game/Overlays/RankingsOverlay.cs | 15 ++------------- osu.Game/Overlays/SocialOverlay.cs | 5 ----- 5 files changed, 9 insertions(+), 37 deletions(-) diff --git a/osu.Game/Overlays/ChangelogOverlay.cs b/osu.Game/Overlays/ChangelogOverlay.cs index e2186df64c..412e29735a 100644 --- a/osu.Game/Overlays/ChangelogOverlay.cs +++ b/osu.Game/Overlays/ChangelogOverlay.cs @@ -44,11 +44,6 @@ namespace osu.Game.Overlays [BackgroundDependencyLoader] private void load(AudioManager audio, OsuColour colour) { - Waves.FirstWaveColour = colour.GreyVioletLight; - Waves.SecondWaveColour = colour.GreyViolet; - Waves.ThirdWaveColour = colour.GreyVioletDark; - Waves.FourthWaveColour = colour.GreyVioletDarker; - Children = new Drawable[] { new Box diff --git a/osu.Game/Overlays/DirectOverlay.cs b/osu.Game/Overlays/DirectOverlay.cs index c718ca7a1e..e4cef319fe 100644 --- a/osu.Game/Overlays/DirectOverlay.cs +++ b/osu.Game/Overlays/DirectOverlay.cs @@ -86,13 +86,6 @@ namespace osu.Game.Overlays public DirectOverlay() : base(OverlayColourScheme.Blue) { - // osu!direct colours are not part of the standard palette - - Waves.FirstWaveColour = OsuColour.FromHex(@"19b0e2"); - Waves.SecondWaveColour = OsuColour.FromHex(@"2280a2"); - Waves.ThirdWaveColour = OsuColour.FromHex(@"005774"); - Waves.FourthWaveColour = OsuColour.FromHex(@"003a4e"); - ScrollFlow.Children = new Drawable[] { resultCountsContainer = new FillFlowContainer diff --git a/osu.Game/Overlays/FullscreenOverlay.cs b/osu.Game/Overlays/FullscreenOverlay.cs index 662188cbfd..c391947ccb 100644 --- a/osu.Game/Overlays/FullscreenOverlay.cs +++ b/osu.Game/Overlays/FullscreenOverlay.cs @@ -6,7 +6,6 @@ using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Effects; -using osu.Game.Graphics; using osu.Game.Graphics.Containers; using osu.Game.Online.API; using osuTK.Graphics; @@ -24,11 +23,6 @@ namespace osu.Game.Overlays { this.colourScheme = colourScheme; - Waves.FirstWaveColour = OsuColour.Gray(0.4f); - Waves.SecondWaveColour = OsuColour.Gray(0.3f); - Waves.ThirdWaveColour = OsuColour.Gray(0.2f); - Waves.FourthWaveColour = OsuColour.Gray(0.1f); - RelativeSizeAxes = Axes.Both; RelativePositionAxes = Axes.Both; Width = 0.85f; @@ -53,7 +47,13 @@ namespace osu.Game.Overlays [BackgroundDependencyLoader] private void load() { - dependencies.Cache(new OverlayColourProvider(colourScheme)); + OverlayColourProvider colourProvider; + dependencies.Cache(colourProvider = new OverlayColourProvider(colourScheme)); + + Waves.FirstWaveColour = colourProvider.Highlight1; + Waves.SecondWaveColour = colourProvider.Link4; + Waves.ThirdWaveColour = colourProvider.Dark3; + Waves.FourthWaveColour = colourProvider.Dark1; } public override void Show() diff --git a/osu.Game/Overlays/RankingsOverlay.cs b/osu.Game/Overlays/RankingsOverlay.cs index 2297925e5c..1ab18b8c15 100644 --- a/osu.Game/Overlays/RankingsOverlay.cs +++ b/osu.Game/Overlays/RankingsOverlay.cs @@ -25,7 +25,6 @@ namespace osu.Game.Overlays private readonly Bindable ruleset = new Bindable(); private readonly BasicScrollContainer scrollFlow; - private readonly Box background; private readonly Container tableContainer; private readonly DimmedLoadingLayer loading; @@ -40,9 +39,10 @@ namespace osu.Game.Overlays { Children = new Drawable[] { - background = new Box + new Box { RelativeSizeAxes = Axes.Both, + Colour = OsuColour.Gray(0.1f), }, scrollFlow = new BasicScrollContainer { @@ -86,17 +86,6 @@ namespace osu.Game.Overlays }; } - [BackgroundDependencyLoader] - private void load(OsuColour colour) - { - Waves.FirstWaveColour = colour.Green; - Waves.SecondWaveColour = colour.GreenLight; - Waves.ThirdWaveColour = colour.GreenDark; - Waves.FourthWaveColour = colour.GreenDarker; - - background.Colour = OsuColour.Gray(0.1f); - } - protected override void LoadComplete() { Country.BindValueChanged(_ => diff --git a/osu.Game/Overlays/SocialOverlay.cs b/osu.Game/Overlays/SocialOverlay.cs index 27bef7145b..9a523bc1bc 100644 --- a/osu.Game/Overlays/SocialOverlay.cs +++ b/osu.Game/Overlays/SocialOverlay.cs @@ -54,11 +54,6 @@ namespace osu.Game.Overlays public SocialOverlay() : base(OverlayColourScheme.Pink) { - Waves.FirstWaveColour = OsuColour.FromHex(@"cb5fa0"); - Waves.SecondWaveColour = OsuColour.FromHex(@"b04384"); - Waves.ThirdWaveColour = OsuColour.FromHex(@"9b2b6e"); - Waves.FourthWaveColour = OsuColour.FromHex(@"6d214d"); - Add(loading = new LoadingAnimation()); Filter.Search.Current.ValueChanged += text =>