From 1deaefacb7c7236c20a5526db5ffb75a58bbc7d8 Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Mon, 12 Jul 2021 17:53:15 +0300 Subject: [PATCH 1/4] Add "basic" lime colour theme --- osu.Game/Overlays/OverlayColourProvider.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/osu.Game/Overlays/OverlayColourProvider.cs b/osu.Game/Overlays/OverlayColourProvider.cs index abd1e43f25..4c698c2af7 100644 --- a/osu.Game/Overlays/OverlayColourProvider.cs +++ b/osu.Game/Overlays/OverlayColourProvider.cs @@ -14,6 +14,7 @@ namespace osu.Game.Overlays public static OverlayColourProvider Red { get; } = new OverlayColourProvider(OverlayColourScheme.Red); public static OverlayColourProvider Pink { get; } = new OverlayColourProvider(OverlayColourScheme.Pink); public static OverlayColourProvider Orange { get; } = new OverlayColourProvider(OverlayColourScheme.Orange); + public static OverlayColourProvider Lime { get; } = new OverlayColourProvider(OverlayColourScheme.Lime); public static OverlayColourProvider Green { get; } = new OverlayColourProvider(OverlayColourScheme.Green); public static OverlayColourProvider Purple { get; } = new OverlayColourProvider(OverlayColourScheme.Purple); public static OverlayColourProvider Blue { get; } = new OverlayColourProvider(OverlayColourScheme.Blue); @@ -68,6 +69,9 @@ namespace osu.Game.Overlays case OverlayColourScheme.Orange: return 46 / 360f; + case OverlayColourScheme.Lime: + return 90 / 360f; + case OverlayColourScheme.Green: return 115 / 360f; @@ -85,6 +89,7 @@ namespace osu.Game.Overlays Red, Pink, Orange, + Lime, Green, Purple, Blue From 9869986c59482f4c64b718e1bceb17d0ebc5d9aa Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Mon, 12 Jul 2021 17:55:29 +0300 Subject: [PATCH 2/4] 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, From b4961cd12e096e4068beb857844bc5bded30eb11 Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Wed, 14 Jul 2021 03:18:13 +0300 Subject: [PATCH 3/4] Revert "Remove duplicated colour definitions" This reverts commit 9869986c59482f4c64b718e1bceb17d0ebc5d9aa. --- 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, 9 insertions(+), 6 deletions(-) diff --git a/osu.Game/Beatmaps/ControlPoints/DifficultyControlPoint.cs b/osu.Game/Beatmaps/ControlPoints/DifficultyControlPoint.cs index b871f8bcc7..8a6cfaf688 100644 --- a/osu.Game/Beatmaps/ControlPoints/DifficultyControlPoint.cs +++ b/osu.Game/Beatmaps/ControlPoints/DifficultyControlPoint.cs @@ -3,7 +3,6 @@ using osu.Framework.Bindables; using osu.Game.Graphics; -using osu.Game.Overlays; using osuTK.Graphics; namespace osu.Game.Beatmaps.ControlPoints @@ -26,7 +25,7 @@ namespace osu.Game.Beatmaps.ControlPoints MaxValue = 10 }; - public override Color4 GetRepresentingColour(OsuColour colours) => OverlayColourProvider.Lime.Colour1; + public override Color4 GetRepresentingColour(OsuColour colours) => colours.Lime1; /// /// The speed multiplier at this control point. diff --git a/osu.Game/Beatmaps/ControlPoints/TimingControlPoint.cs b/osu.Game/Beatmaps/ControlPoints/TimingControlPoint.cs index 22808671b0..ec20328fab 100644 --- a/osu.Game/Beatmaps/ControlPoints/TimingControlPoint.cs +++ b/osu.Game/Beatmaps/ControlPoints/TimingControlPoint.cs @@ -4,7 +4,6 @@ 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 @@ -21,7 +20,7 @@ namespace osu.Game.Beatmaps.ControlPoints /// private const double default_beat_length = 60000.0 / 60.0; - public override Color4 GetRepresentingColour(OsuColour colours) => OverlayColourProvider.Orange.Colour1; + public override Color4 GetRepresentingColour(OsuColour colours) => colours.Orange1; public static readonly TimingControlPoint DEFAULT = new TimingControlPoint { diff --git a/osu.Game/Graphics/OsuColour.cs b/osu.Game/Graphics/OsuColour.cs index 3533ab177c..a44c28eaa6 100644 --- a/osu.Game/Graphics/OsuColour.cs +++ b/osu.Game/Graphics/OsuColour.cs @@ -198,6 +198,10 @@ 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 91d6460ea6..421806eea8 100644 --- a/osu.Game/Overlays/Wiki/Markdown/WikiNoticeContainer.cs +++ b/osu.Game/Overlays/Wiki/Markdown/WikiNoticeContainer.cs @@ -7,6 +7,7 @@ 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 { @@ -65,7 +66,7 @@ namespace osu.Game.Overlays.Wiki.Markdown public string Text { get; set; } [BackgroundDependencyLoader] - private void load(OverlayColourProvider colourProvider) + private void load(OverlayColourProvider colourProvider, OsuColour colour) { RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; @@ -80,7 +81,7 @@ namespace osu.Game.Overlays.Wiki.Markdown }, textFlow = parentFlowComponent.CreateTextFlow().With(t => { - t.Colour = OverlayColourProvider.Orange.Colour1; + t.Colour = colour.Orange1; t.Padding = new MarginPadding { Vertical = 10, From 80636be7678cbc001dc0b02e59aac84fbd80c573 Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Wed, 14 Jul 2021 03:22:00 +0300 Subject: [PATCH 4/4] Link `Lime1` and `Orange1` to their `OverlayColourProvider`'s alternative --- osu.Game/Graphics/OsuColour.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/osu.Game/Graphics/OsuColour.cs b/osu.Game/Graphics/OsuColour.cs index a44c28eaa6..c0bc8fdb76 100644 --- a/osu.Game/Graphics/OsuColour.cs +++ b/osu.Game/Graphics/OsuColour.cs @@ -3,6 +3,7 @@ using osu.Framework.Extensions.Color4Extensions; using osu.Game.Beatmaps; +using osu.Game.Overlays; using osu.Game.Rulesets.Scoring; using osu.Game.Scoring; using osuTK.Graphics; @@ -198,8 +199,14 @@ 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... + /// + /// Equivalent to 's . + /// public readonly Color4 Lime1 = Color4Extensions.FromHex(@"b2ff66"); + + /// + /// Equivalent to 's . + /// public readonly Color4 Orange1 = Color4Extensions.FromHex(@"ffd966"); // Content Background