Add constant for background colour

This commit is contained in:
smoogipoo 2021-08-05 21:20:55 +09:00
parent 87fd1eaf06
commit c74e620ce9

View File

@ -40,6 +40,8 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
private const float transition_duration = 60; private const float transition_duration = 60;
private const float height = 100; private const float height = 100;
private static readonly Color4 background_colour = Color4Extensions.FromHex(@"#27302E");
public event Action<SelectionState> StateChanged; public event Action<SelectionState> StateChanged;
private Drawable selectionBox; private Drawable selectionBox;
@ -159,7 +161,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
new Box new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Colour = Color4Extensions.FromHex(@"#27302E"), Colour = background_colour,
}, },
new OnlinePlayBackgroundSprite(BeatmapSetCoverType.Cover) new OnlinePlayBackgroundSprite(BeatmapSetCoverType.Cover)
{ {
@ -189,7 +191,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
new Box new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Colour = Color4Extensions.FromHex(@"#27302E"), Colour = background_colour,
}, },
new OnlinePlayBackgroundSprite(BeatmapSetCoverType.Cover) new OnlinePlayBackgroundSprite(BeatmapSetCoverType.Cover)
{ {
@ -209,12 +211,12 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
new Box new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Colour = Color4Extensions.FromHex(@"#27302E"), Colour = background_colour,
}, },
new Box new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Colour = ColourInfo.GradientHorizontal(Color4Extensions.FromHex(@"#27302E"), Color4Extensions.FromHex(@"#27302E").Opacity(0.3f)) Colour = ColourInfo.GradientHorizontal(background_colour, background_colour.Opacity(0.3f))
}, },
} }
} }