mirror of https://github.com/ppy/osu
Extract method for scheduler call
This commit is contained in:
parent
88fa6f6bc6
commit
96769897bf
|
@ -118,13 +118,15 @@ protected override void LoadComplete()
|
||||||
changeHandler?.BeginChange();
|
changeHandler?.BeginChange();
|
||||||
began = true;
|
began = true;
|
||||||
|
|
||||||
distanceSnapInput.Current.BindValueChanged(_ => Scheduler.AddOnce(tryCreatePolygon));
|
distanceSnapInput.Current.BindValueChanged(_ => scheduleRefresh());
|
||||||
offsetAngleInput.Current.BindValueChanged(_ => Scheduler.AddOnce(tryCreatePolygon));
|
offsetAngleInput.Current.BindValueChanged(_ => scheduleRefresh());
|
||||||
repeatCountInput.Current.BindValueChanged(_ => Scheduler.AddOnce(tryCreatePolygon));
|
repeatCountInput.Current.BindValueChanged(_ => scheduleRefresh());
|
||||||
pointInput.Current.BindValueChanged(_ => Scheduler.AddOnce(tryCreatePolygon));
|
pointInput.Current.BindValueChanged(_ => scheduleRefresh());
|
||||||
tryCreatePolygon();
|
tryCreatePolygon();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void scheduleRefresh() => Scheduler.AddOnce(tryCreatePolygon);
|
||||||
|
|
||||||
private void tryCreatePolygon()
|
private void tryCreatePolygon()
|
||||||
{
|
{
|
||||||
double startTime = beatSnapProvider.SnapTime(editorClock.CurrentTime);
|
double startTime = beatSnapProvider.SnapTime(editorClock.CurrentTime);
|
||||||
|
|
Loading…
Reference in New Issue