Use colour schemes for OverlayRulesetSelector

This commit is contained in:
Andrei Zavatski
2020-01-20 08:34:46 +03:00
parent 6552097866
commit 11e7c8be3f
4 changed files with 25 additions and 22 deletions

View File

@ -1,7 +1,6 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Graphics;
@ -14,16 +13,14 @@ namespace osu.Game.Overlays.Profile.Header.Components
{
public readonly Bindable<User> User = new Bindable<User>();
[BackgroundDependencyLoader]
private void load(OsuColour colours)
public ProfileRulesetSelector(OverlayColourScheme colourScheme)
: base(colourScheme)
{
AccentColour = colours.Seafoam;
}
protected override void LoadComplete()
{
base.LoadComplete();
User.BindValueChanged(u => SetDefaultRuleset(Rulesets.GetRuleset(u.NewValue?.PlayMode ?? "osu")), true);
}