diff --git a/osu.Game/Graphics/OsuColour.cs b/osu.Game/Graphics/OsuColour.cs
index afedf36cad..7a6a677940 100644
--- a/osu.Game/Graphics/OsuColour.cs
+++ b/osu.Game/Graphics/OsuColour.cs
@@ -4,6 +4,7 @@
using System;
using osu.Framework.Extensions.Color4Extensions;
using osu.Game.Beatmaps;
+using osu.Game.Online.Rooms;
using osu.Game.Overlays;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Scoring;
@@ -188,6 +189,24 @@ namespace osu.Game.Graphics
}
}
+ ///
+ /// Retrieves the main accent colour for a .
+ ///
+ public Color4? ForRoomCategory(RoomCategory roomCategory)
+ {
+ switch (roomCategory)
+ {
+ case RoomCategory.Spotlight:
+ return Green2;
+
+ case RoomCategory.FeaturedArtist:
+ return Blue2;
+
+ default:
+ return null;
+ }
+ }
+
///
/// Returns a foreground text colour that is supposed to contrast well with
/// the supplied .
diff --git a/osu.Game/Screens/OnlinePlay/Components/StatusColouredContainer.cs b/osu.Game/Screens/OnlinePlay/Components/StatusColouredContainer.cs
index 760de354dc..a7ea32ee7c 100644
--- a/osu.Game/Screens/OnlinePlay/Components/StatusColouredContainer.cs
+++ b/osu.Game/Screens/OnlinePlay/Components/StatusColouredContainer.cs
@@ -30,8 +30,7 @@ namespace osu.Game.Screens.OnlinePlay.Components
{
status.BindValueChanged(s =>
{
- this.FadeColour(category.Value == RoomCategory.Spotlight ? colours.Pink : s.NewValue.GetAppropriateColour(colours)
- , transitionDuration);
+ this.FadeColour(colours.ForRoomCategory(category.Value) ?? s.NewValue.GetAppropriateColour(colours), transitionDuration);
}, true);
}
}
diff --git a/osu.Game/Screens/OnlinePlay/Lounge/Components/RoomSpecialCategoryPill.cs b/osu.Game/Screens/OnlinePlay/Lounge/Components/RoomSpecialCategoryPill.cs
index 00e4fbf5eb..539af2ebaf 100644
--- a/osu.Game/Screens/OnlinePlay/Lounge/Components/RoomSpecialCategoryPill.cs
+++ b/osu.Game/Screens/OnlinePlay/Lounge/Components/RoomSpecialCategoryPill.cs
@@ -7,7 +7,6 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
-using osu.Game.Online.Rooms;
using osuTK.Graphics;
namespace osu.Game.Screens.OnlinePlay.Lounge.Components
@@ -53,16 +52,9 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
{
text.Text = c.NewValue.GetLocalisableDescription();
- switch (c.NewValue)
- {
- case RoomCategory.Spotlight:
- pill.Background.Colour = colours.Green2;
- break;
-
- case RoomCategory.FeaturedArtist:
- pill.Background.Colour = colours.Blue2;
- break;
- }
+ var backgroundColour = colours.ForRoomCategory(Category.Value);
+ if (backgroundColour != null)
+ pill.Background.Colour = backgroundColour.Value;
}, true);
}
}