Fix ruleset toggle buttons not updating when changing from the toolbar

This commit is contained in:
DrabWeb
2017-05-18 16:34:34 -03:00
parent 0b480fe327
commit 065f4faa70

View File

@ -163,7 +163,7 @@ namespace osu.Game.Overlays.Direct
void Bindable_ValueChanged(RulesetInfo obj)
{
icon.FadeTo((Ruleset == obj) ? 1f : 0.5f, 100);
icon.FadeTo((Ruleset.ID == obj.ID) ? 1f : 0.5f, 100);
}
public RulesetToggleButton(Bindable<RulesetInfo> bindable, RulesetInfo ruleset)
@ -183,7 +183,7 @@ namespace osu.Game.Overlays.Direct
Ruleset = ruleset;
bindable.ValueChanged += Bindable_ValueChanged;
Bindable_ValueChanged(null);
Bindable_ValueChanged(bindable.Value);
Action = () => bindable.Value = Ruleset;
}