Change BackgroundColour into a property

This commit is contained in:
Dean Herbert 2021-02-09 18:32:44 +09:00
parent b5fa950800
commit 178d88bcf1
5 changed files with 7 additions and 7 deletions

View File

@ -85,7 +85,7 @@ namespace osu.Game.Overlays
protected override BeatmapListingHeader CreateHeader() => new BeatmapListingHeader(); protected override BeatmapListingHeader CreateHeader() => new BeatmapListingHeader();
protected override Color4 GetBackgroundColour() => ColourProvider.Background6; protected override Color4 BackgroundColour => ColourProvider.Background6;
private void onTypingStarted() private void onTypingStarted()
{ {

View File

@ -68,7 +68,7 @@ namespace osu.Game.Overlays
protected override BeatmapSetHeader CreateHeader() => new BeatmapSetHeader(); protected override BeatmapSetHeader CreateHeader() => new BeatmapSetHeader();
protected override Color4 GetBackgroundColour() => ColourProvider.Background6; protected override Color4 BackgroundColour => ColourProvider.Background6;
protected override void PopOutComplete() protected override void PopOutComplete()
{ {

View File

@ -55,7 +55,7 @@ namespace osu.Game.Overlays
ListingSelected = ShowListing, ListingSelected = ShowListing,
}; };
protected override Color4 GetBackgroundColour() => ColourProvider.Background4; protected override Color4 BackgroundColour => ColourProvider.Background4;
public void ShowListing() public void ShowListing()
{ {

View File

@ -23,6 +23,8 @@ namespace osu.Game.Overlays
public T Header { get; } public T Header { get; }
protected virtual Color4 BackgroundColour => ColourProvider.Background5;
[Resolved] [Resolved]
protected IAPIProvider API { get; private set; } protected IAPIProvider API { get; private set; }
@ -59,7 +61,7 @@ namespace osu.Game.Overlays
new Box new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Colour = GetBackgroundColour() Colour = BackgroundColour
}, },
content = new Container content = new Container
{ {
@ -80,8 +82,6 @@ namespace osu.Game.Overlays
[NotNull] [NotNull]
protected abstract T CreateHeader(); protected abstract T CreateHeader();
protected virtual Color4 GetBackgroundColour() => ColourProvider.Background5;
public override void Show() public override void Show()
{ {
if (State.Value == Visibility.Visible) if (State.Value == Visibility.Visible)

View File

@ -36,7 +36,7 @@ namespace osu.Game.Overlays
protected override ProfileHeader CreateHeader() => new ProfileHeader(); protected override ProfileHeader CreateHeader() => new ProfileHeader();
protected override Color4 GetBackgroundColour() => ColourProvider.Background6; protected override Color4 BackgroundColour => ColourProvider.Background6;
public void ShowUser(int userId) => ShowUser(new User { Id = userId }); public void ShowUser(int userId) => ShowUser(new User { Id = userId });