mirror of
https://github.com/ppy/osu
synced 2024-12-25 08:12:41 +00:00
Change the order of colour check
This commit is contained in:
parent
4abd9cb89a
commit
5950ba3656
@ -89,9 +89,9 @@ namespace osu.Game.Overlays
|
|||||||
private void updateState()
|
private void updateState()
|
||||||
{
|
{
|
||||||
text.Font = text.Font.With(weight: Active.Value ? FontWeight.Bold : FontWeight.Medium);
|
text.Font = text.Font.With(weight: Active.Value ? FontWeight.Bold : FontWeight.Medium);
|
||||||
AccentColour = IsHovered || Active.Value ? Color4.White : getStateColour();
|
AccentColour = Enabled.Value ? getActiveColour() : colourProvider.Foreground1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Color4 getStateColour() => Enabled.Value ? colourProvider.Highlight1 : colourProvider.Foreground1;
|
private Color4 getActiveColour() => IsHovered || Active.Value ? Color4.White : colourProvider.Highlight1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user