Move gameplay preview event binding to LoadComplete

This commit is contained in:
Dean Herbert 2021-01-06 15:19:12 +09:00
parent d0d2e41b28
commit 15dd7a87a6

View File

@ -132,14 +132,14 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
}
},
};
scalingSettings.ForEach(s => bindPreviewEvent(s.Current));
}
protected override void LoadComplete()
{
base.LoadComplete();
scalingSettings.ForEach(s => bindPreviewEvent(s.Current));
windowModeDropdown.Current.ValueChanged += _ => updateResolutionDropdown();
windowModes.BindCollectionChanged((sender, args) =>
@ -186,11 +186,6 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
}
}
/// <summary>
/// Create a delayed bindable which only updates when a condition is met.
/// </summary>
/// <param name="bindable">The config bindable.</param>
/// <returns>A bindable which will propagate updates with a delay.</returns>
private void bindPreviewEvent(Bindable<float> bindable)
{
bindable.ValueChanged += _ =>