mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 21:03:08 +08:00
Merge pull request #11428 from peppy/fix-transform-mutation-display-settings
This commit is contained in:
commit
04cdbc9a03
@ -132,6 +132,15 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
scalingSettings.ForEach(s => bindPreviewEvent(s.Current));
|
||||
|
||||
windowModeDropdown.Current.ValueChanged += _ => updateResolutionDropdown();
|
||||
|
||||
windowModes.BindCollectionChanged((sender, args) =>
|
||||
{
|
||||
@ -141,8 +150,6 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||
windowModeDropdown.Hide();
|
||||
}, true);
|
||||
|
||||
windowModeDropdown.Current.ValueChanged += _ => updateResolutionDropdown();
|
||||
|
||||
currentDisplay.BindValueChanged(display => Schedule(() =>
|
||||
{
|
||||
resolutions.RemoveRange(1, resolutions.Count - 1);
|
||||
@ -159,8 +166,6 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||
updateResolutionDropdown();
|
||||
}), true);
|
||||
|
||||
scalingSettings.ForEach(s => bindPreviewEvent(s.Current));
|
||||
|
||||
scalingMode.BindValueChanged(mode =>
|
||||
{
|
||||
scalingSettings.ClearTransforms();
|
||||
@ -181,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 += _ =>
|
||||
|
Loading…
Reference in New Issue
Block a user