Highlight spotlight rooms with a different colour

This commit is contained in:
Dean Herbert
2020-07-10 19:37:27 +09:00
parent cf3251a950
commit 64e8dce1ad
5 changed files with 30 additions and 5 deletions

View File

@ -17,6 +17,9 @@ namespace osu.Game.Screens.Multi.Components
[Resolved(typeof(Room), nameof(Room.Status))]
private Bindable<RoomStatus> status { get; set; }
[Resolved(typeof(Room), nameof(Room.Category))]
private Bindable<RoomCategory> category { get; set; }
public StatusColouredContainer(double transitionDuration = 100)
{
this.transitionDuration = transitionDuration;
@ -25,7 +28,11 @@ namespace osu.Game.Screens.Multi.Components
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
status.BindValueChanged(s => this.FadeColour(s.NewValue.GetAppropriateColour(colours), transitionDuration), true);
status.BindValueChanged(s =>
{
this.FadeColour(category.Value == RoomCategory.Spotlight ? colours.Pink : s.NewValue.GetAppropriateColour(colours)
, transitionDuration);
}, true);
}
}
}