1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 17:32:54 +08:00

Make waves colour dependent on overlay colour scheme

This commit is contained in:
Andrei Zavatski 2020-01-25 06:46:54 +03:00
parent 448663ae9a
commit 73e822e08d
5 changed files with 9 additions and 37 deletions

View File

@ -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

View File

@ -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

View File

@ -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()

View File

@ -25,7 +25,6 @@ namespace osu.Game.Overlays
private readonly Bindable<RulesetInfo> ruleset = new Bindable<RulesetInfo>();
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(_ =>

View File

@ -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 =>