From 6deac9a5a45319d1536a9dc223a4efb07324a63c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Mon, 6 Nov 2023 11:24:56 +0100 Subject: [PATCH] Use better colours for system mods --- osu.Game/Graphics/OsuColour.cs | 2 +- osu.Game/Rulesets/UI/ModIcon.cs | 6 ++++-- osu.Game/Rulesets/UI/ModSwitchSmall.cs | 8 ++++++-- osu.Game/Rulesets/UI/ModSwitchTiny.cs | 6 +++++- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/osu.Game/Graphics/OsuColour.cs b/osu.Game/Graphics/OsuColour.cs index 75d313d98c..2e19eac572 100644 --- a/osu.Game/Graphics/OsuColour.cs +++ b/osu.Game/Graphics/OsuColour.cs @@ -162,7 +162,7 @@ namespace osu.Game.Graphics return Pink1; case ModType.System: - return Gray7; + return Gray5; default: throw new ArgumentOutOfRangeException(nameof(modType), modType, "Unknown mod type"); diff --git a/osu.Game/Rulesets/UI/ModIcon.cs b/osu.Game/Rulesets/UI/ModIcon.cs index 5fd1507039..d09db37f2a 100644 --- a/osu.Game/Rulesets/UI/ModIcon.cs +++ b/osu.Game/Rulesets/UI/ModIcon.cs @@ -138,7 +138,6 @@ namespace osu.Game.Rulesets.UI { Origin = Anchor.Centre, Anchor = Anchor.Centre, - Colour = OsuColour.Gray(84), Alpha = 0, Font = OsuFont.Numeric.With(null, 22f), UseFullGlyphHeight = false, @@ -148,7 +147,6 @@ namespace osu.Game.Rulesets.UI { Origin = Anchor.Centre, Anchor = Anchor.Centre, - Colour = OsuColour.Gray(84), Size = new Vector2(45), Icon = FontAwesome.Solid.Question }, @@ -206,6 +204,10 @@ namespace osu.Game.Rulesets.UI private void updateColour() { + modAcronym.Colour = modIcon.Colour = mod.Type != ModType.System + ? OsuColour.Gray(84) + : colours.Yellow; + extendedText.Colour = background.Colour = Selected.Value ? backgroundColour.Lighten(0.2f) : backgroundColour; extendedBackground.Colour = Selected.Value ? backgroundColour.Darken(2.4f) : backgroundColour.Darken(2.8f); } diff --git a/osu.Game/Rulesets/UI/ModSwitchSmall.cs b/osu.Game/Rulesets/UI/ModSwitchSmall.cs index 927379c684..452a5599ba 100644 --- a/osu.Game/Rulesets/UI/ModSwitchSmall.cs +++ b/osu.Game/Rulesets/UI/ModSwitchSmall.cs @@ -85,11 +85,15 @@ namespace osu.Game.Rulesets.UI tinySwitch.Scale = new Vector2(0.3f); } + var modTypeColour = colours.ForModType(mod.Type); + inactiveForegroundColour = colourProvider?.Background5 ?? colours.Gray3; - activeForegroundColour = colours.ForModType(mod.Type); + activeForegroundColour = mod.Type != ModType.System ? modTypeColour : colours.Yellow; inactiveBackgroundColour = colourProvider?.Background2 ?? colours.Gray5; - activeBackgroundColour = Interpolation.ValueAt(0.1f, Colour4.Black, activeForegroundColour, 0, 1); + activeBackgroundColour = mod.Type != ModType.System + ? Interpolation.ValueAt(0.1f, Colour4.Black, modTypeColour, 0, 1) + : modTypeColour; } protected override void LoadComplete() diff --git a/osu.Game/Rulesets/UI/ModSwitchTiny.cs b/osu.Game/Rulesets/UI/ModSwitchTiny.cs index a3e325ace8..5bf501ead3 100644 --- a/osu.Game/Rulesets/UI/ModSwitchTiny.cs +++ b/osu.Game/Rulesets/UI/ModSwitchTiny.cs @@ -106,11 +106,15 @@ namespace osu.Game.Rulesets.UI [BackgroundDependencyLoader(true)] private void load(OsuColour colours, OverlayColourProvider? colourProvider) { + var modTypeColour = colours.ForModType(Mod.Type); + inactiveBackgroundColour = colourProvider?.Background5 ?? colours.Gray3; activeBackgroundColour = colours.ForModType(Mod.Type); inactiveForegroundColour = colourProvider?.Background2 ?? colours.Gray5; - activeForegroundColour = Interpolation.ValueAt(0.1f, Colour4.Black, activeForegroundColour, 0, 1); + activeForegroundColour = Mod.Type != ModType.System + ? Interpolation.ValueAt(0.1f, Colour4.Black, activeForegroundColour, 0, 1) + : colours.Yellow; } protected override void LoadComplete()