1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-14 19:53:08 +08:00

Use better colours for system mods

This commit is contained in:
Bartłomiej Dach 2023-11-06 11:24:56 +01:00
parent bc9cdb4ce0
commit 6deac9a5a4
No known key found for this signature in database
4 changed files with 16 additions and 6 deletions

View File

@ -162,7 +162,7 @@ namespace osu.Game.Graphics
return Pink1; return Pink1;
case ModType.System: case ModType.System:
return Gray7; return Gray5;
default: default:
throw new ArgumentOutOfRangeException(nameof(modType), modType, "Unknown mod type"); throw new ArgumentOutOfRangeException(nameof(modType), modType, "Unknown mod type");

View File

@ -138,7 +138,6 @@ namespace osu.Game.Rulesets.UI
{ {
Origin = Anchor.Centre, Origin = Anchor.Centre,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Colour = OsuColour.Gray(84),
Alpha = 0, Alpha = 0,
Font = OsuFont.Numeric.With(null, 22f), Font = OsuFont.Numeric.With(null, 22f),
UseFullGlyphHeight = false, UseFullGlyphHeight = false,
@ -148,7 +147,6 @@ namespace osu.Game.Rulesets.UI
{ {
Origin = Anchor.Centre, Origin = Anchor.Centre,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Colour = OsuColour.Gray(84),
Size = new Vector2(45), Size = new Vector2(45),
Icon = FontAwesome.Solid.Question Icon = FontAwesome.Solid.Question
}, },
@ -206,6 +204,10 @@ namespace osu.Game.Rulesets.UI
private void updateColour() 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; extendedText.Colour = background.Colour = Selected.Value ? backgroundColour.Lighten(0.2f) : backgroundColour;
extendedBackground.Colour = Selected.Value ? backgroundColour.Darken(2.4f) : backgroundColour.Darken(2.8f); extendedBackground.Colour = Selected.Value ? backgroundColour.Darken(2.4f) : backgroundColour.Darken(2.8f);
} }

View File

@ -85,11 +85,15 @@ namespace osu.Game.Rulesets.UI
tinySwitch.Scale = new Vector2(0.3f); tinySwitch.Scale = new Vector2(0.3f);
} }
var modTypeColour = colours.ForModType(mod.Type);
inactiveForegroundColour = colourProvider?.Background5 ?? colours.Gray3; inactiveForegroundColour = colourProvider?.Background5 ?? colours.Gray3;
activeForegroundColour = colours.ForModType(mod.Type); activeForegroundColour = mod.Type != ModType.System ? modTypeColour : colours.Yellow;
inactiveBackgroundColour = colourProvider?.Background2 ?? colours.Gray5; inactiveBackgroundColour = colourProvider?.Background2 ?? colours.Gray5;
activeBackgroundColour = Interpolation.ValueAt<Colour4>(0.1f, Colour4.Black, activeForegroundColour, 0, 1); activeBackgroundColour = mod.Type != ModType.System
? Interpolation.ValueAt<Colour4>(0.1f, Colour4.Black, modTypeColour, 0, 1)
: modTypeColour;
} }
protected override void LoadComplete() protected override void LoadComplete()

View File

@ -106,11 +106,15 @@ namespace osu.Game.Rulesets.UI
[BackgroundDependencyLoader(true)] [BackgroundDependencyLoader(true)]
private void load(OsuColour colours, OverlayColourProvider? colourProvider) private void load(OsuColour colours, OverlayColourProvider? colourProvider)
{ {
var modTypeColour = colours.ForModType(Mod.Type);
inactiveBackgroundColour = colourProvider?.Background5 ?? colours.Gray3; inactiveBackgroundColour = colourProvider?.Background5 ?? colours.Gray3;
activeBackgroundColour = colours.ForModType(Mod.Type); activeBackgroundColour = colours.ForModType(Mod.Type);
inactiveForegroundColour = colourProvider?.Background2 ?? colours.Gray5; inactiveForegroundColour = colourProvider?.Background2 ?? colours.Gray5;
activeForegroundColour = Interpolation.ValueAt<Colour4>(0.1f, Colour4.Black, activeForegroundColour, 0, 1); activeForegroundColour = Mod.Type != ModType.System
? Interpolation.ValueAt<Colour4>(0.1f, Colour4.Black, activeForegroundColour, 0, 1)
: colours.Yellow;
} }
protected override void LoadComplete() protected override void LoadComplete()