From 9869986c59482f4c64b718e1bceb17d0ebc5d9aa Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Mon, 12 Jul 2021 17:55:29 +0300 Subject: [PATCH] Remove duplicated colour definitions --- osu.Game/Beatmaps/ControlPoints/DifficultyControlPoint.cs | 3 ++- osu.Game/Beatmaps/ControlPoints/TimingControlPoint.cs | 3 ++- osu.Game/Graphics/OsuColour.cs | 4 ---- osu.Game/Overlays/Wiki/Markdown/WikiNoticeContainer.cs | 5 ++--- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/osu.Game/Beatmaps/ControlPoints/DifficultyControlPoint.cs b/osu.Game/Beatmaps/ControlPoints/DifficultyControlPoint.cs index 8a6cfaf688..b871f8bcc7 100644 --- a/osu.Game/Beatmaps/ControlPoints/DifficultyControlPoint.cs +++ b/osu.Game/Beatmaps/ControlPoints/DifficultyControlPoint.cs @@ -3,6 +3,7 @@ using osu.Framework.Bindables; using osu.Game.Graphics; +using osu.Game.Overlays; using osuTK.Graphics; namespace osu.Game.Beatmaps.ControlPoints @@ -25,7 +26,7 @@ namespace osu.Game.Beatmaps.ControlPoints MaxValue = 10 }; - public override Color4 GetRepresentingColour(OsuColour colours) => colours.Lime1; + public override Color4 GetRepresentingColour(OsuColour colours) => OverlayColourProvider.Lime.Colour1; /// /// The speed multiplier at this control point. diff --git a/osu.Game/Beatmaps/ControlPoints/TimingControlPoint.cs b/osu.Game/Beatmaps/ControlPoints/TimingControlPoint.cs index ec20328fab..22808671b0 100644 --- a/osu.Game/Beatmaps/ControlPoints/TimingControlPoint.cs +++ b/osu.Game/Beatmaps/ControlPoints/TimingControlPoint.cs @@ -4,6 +4,7 @@ using osu.Framework.Bindables; using osu.Game.Beatmaps.Timing; using osu.Game.Graphics; +using osu.Game.Overlays; using osuTK.Graphics; namespace osu.Game.Beatmaps.ControlPoints @@ -20,7 +21,7 @@ namespace osu.Game.Beatmaps.ControlPoints /// private const double default_beat_length = 60000.0 / 60.0; - public override Color4 GetRepresentingColour(OsuColour colours) => colours.Orange1; + public override Color4 GetRepresentingColour(OsuColour colours) => OverlayColourProvider.Orange.Colour1; public static readonly TimingControlPoint DEFAULT = new TimingControlPoint { diff --git a/osu.Game/Graphics/OsuColour.cs b/osu.Game/Graphics/OsuColour.cs index a44c28eaa6..3533ab177c 100644 --- a/osu.Game/Graphics/OsuColour.cs +++ b/osu.Game/Graphics/OsuColour.cs @@ -198,10 +198,6 @@ namespace osu.Game.Graphics public readonly Color4 GrayE = Color4Extensions.FromHex(@"eee"); public readonly Color4 GrayF = Color4Extensions.FromHex(@"fff"); - // in latest editor design logic, need to figure out where these sit... - public readonly Color4 Lime1 = Color4Extensions.FromHex(@"b2ff66"); - public readonly Color4 Orange1 = Color4Extensions.FromHex(@"ffd966"); - // Content Background public readonly Color4 B5 = Color4Extensions.FromHex(@"222a28"); diff --git a/osu.Game/Overlays/Wiki/Markdown/WikiNoticeContainer.cs b/osu.Game/Overlays/Wiki/Markdown/WikiNoticeContainer.cs index 421806eea8..91d6460ea6 100644 --- a/osu.Game/Overlays/Wiki/Markdown/WikiNoticeContainer.cs +++ b/osu.Game/Overlays/Wiki/Markdown/WikiNoticeContainer.cs @@ -7,7 +7,6 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers.Markdown; using osu.Framework.Graphics.Shapes; -using osu.Game.Graphics; namespace osu.Game.Overlays.Wiki.Markdown { @@ -66,7 +65,7 @@ namespace osu.Game.Overlays.Wiki.Markdown public string Text { get; set; } [BackgroundDependencyLoader] - private void load(OverlayColourProvider colourProvider, OsuColour colour) + private void load(OverlayColourProvider colourProvider) { RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; @@ -81,7 +80,7 @@ namespace osu.Game.Overlays.Wiki.Markdown }, textFlow = parentFlowComponent.CreateTextFlow().With(t => { - t.Colour = colour.Orange1; + t.Colour = OverlayColourProvider.Orange.Colour1; t.Padding = new MarginPadding { Vertical = 10,