Add comments about OverlayColourProvider vs OsuColour distinction

This commit is contained in:
Bartłomiej Dach
2022-02-20 20:40:08 +01:00
parent e20ae5b871
commit 2592f0900d
2 changed files with 9 additions and 0 deletions

View File

@ -25,6 +25,10 @@ namespace osu.Game.Overlays
this.colourScheme = colourScheme;
}
// Note that the following five colours are also defined in `OsuColour` as `{colourScheme}{0,1,2,3,4}`.
// The difference as to which should be used where comes down to context.
// If the colour in question is supposed to always match the view in which it is displayed theme-wise, use `OverlayColourProvider`.
// If the colour usage is special and in general differs from the surrounding view in choice of hue, use the `OsuColour` constants.
public Color4 Colour1 => getColour(1, 0.7f);
public Color4 Colour2 => getColour(0.8f, 0.6f);
public Color4 Colour3 => getColour(0.6f, 0.5f);