mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Move gameplay preview event binding to LoadComplete
This commit is contained in:
@ -132,14 +132,14 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
scalingSettings.ForEach(s => bindPreviewEvent(s.Current));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
|
scalingSettings.ForEach(s => bindPreviewEvent(s.Current));
|
||||||
|
|
||||||
windowModeDropdown.Current.ValueChanged += _ => updateResolutionDropdown();
|
windowModeDropdown.Current.ValueChanged += _ => updateResolutionDropdown();
|
||||||
|
|
||||||
windowModes.BindCollectionChanged((sender, args) =>
|
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)
|
private void bindPreviewEvent(Bindable<float> bindable)
|
||||||
{
|
{
|
||||||
bindable.ValueChanged += _ =>
|
bindable.ValueChanged += _ =>
|
||||||
|
Reference in New Issue
Block a user