mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 07:33:20 +08:00
Implement binding to hitobjects + refreshing
This commit is contained in:
parent
c0badf1dce
commit
e0ba35db75
@ -283,6 +283,12 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
bindHitObject(Start);
|
||||
}
|
||||
|
||||
private DrawableOsuHitObject end;
|
||||
|
||||
/// <summary>
|
||||
@ -295,10 +301,19 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
set
|
||||
{
|
||||
end = value;
|
||||
|
||||
bindHitObject(end);
|
||||
refreshFollowPoints();
|
||||
}
|
||||
}
|
||||
|
||||
private void bindHitObject(DrawableOsuHitObject drawableObject)
|
||||
{
|
||||
drawableObject.HitObject.StartTimeBindable.BindValueChanged(_ => refreshFollowPoints());
|
||||
drawableObject.HitObject.PositionBindable.BindValueChanged(_ => refreshFollowPoints());
|
||||
drawableObject.HitObject.DefaultsApplied += refreshFollowPoints;
|
||||
}
|
||||
|
||||
private void refreshFollowPoints()
|
||||
{
|
||||
ClearInternal();
|
||||
|
Loading…
Reference in New Issue
Block a user