Fix non-unbinding bindable bind

This commit is contained in:
Dean Herbert 2018-11-08 16:55:55 +09:00
parent a31507ff0e
commit 6ff29c1ea4
1 changed files with 5 additions and 4 deletions

View File

@ -3,6 +3,7 @@
using System;
using osu.Framework.Allocation;
using osu.Framework.Configuration;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Video;
@ -21,11 +22,10 @@ public class TeamIntroScreen : OsuScreen
{
private Container mainContainer;
[Resolved]
private LadderInfo ladderInfo { get; set; }
private readonly Bindable<MatchPairing> currentMatch = new Bindable<MatchPairing>();
[BackgroundDependencyLoader]
private void load(Storage storage)
private void load(LadderInfo ladder, Storage storage)
{
RelativeSizeAxes = Axes.Both;
@ -42,7 +42,8 @@ private void load(Storage storage)
}
};
ladderInfo.CurrentMatch.BindValueChanged(matchChanged, true);
currentMatch.BindValueChanged(matchChanged);
currentMatch.BindTo(ladder.CurrentMatch);
}
private void matchChanged(MatchPairing pairing)