Don't use Bindable for AccentColour

Implements IHasAccentColour for conformity to rest of project. Also fixes a nullref when opening the login menu.
This commit is contained in:
Dean Herbert
2017-08-29 18:17:01 +09:00
parent e53f2cb359
commit 39b5b04700
6 changed files with 113 additions and 120 deletions

View File

@ -257,13 +257,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
private class UserDropdown : OsuEnumDropdown<UserAction>
{
protected override DropdownHeader CreateHeader()
{
var newHeader = new UserDropdownHeader();
newHeader.AccentColour.BindTo(AccentColour);
return newHeader;
}
protected override DropdownHeader CreateHeader() => new UserDropdownHeader();
protected override DropdownMenu CreateMenu() => new UserDropdownMenu();
@ -280,7 +274,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
AccentColour.Value = colours.Gray5;
AccentColour = colours.Gray5;
}
private class UserDropdownMenu : OsuDropdownMenu
@ -319,7 +313,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
CornerRadius = 5;
}
protected override Drawable CreateContent() => new TextContainer
protected override Drawable CreateContent() => new Content
{
Label = { Margin = new MarginPadding { Left = UserDropdownHeader.LABEL_LEFT_MARGIN - 11 } }
};