mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 00:23:59 +09:00
Merge pull request #12416 from frenzibyte/fix-songselect-regression
Ignore user settings on beatmap background screens by default
This commit is contained in:
@ -65,6 +65,21 @@ namespace osu.Game.Tests.Visual.Background
|
|||||||
stack.Push(songSelect = new DummySongSelect());
|
stack.Push(songSelect = new DummySongSelect());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// User settings should always be ignored on song select screen.
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void TestUserSettingsIgnoredOnSongSelect()
|
||||||
|
{
|
||||||
|
setupUserSettings();
|
||||||
|
AddUntilStep("Screen is undimmed", () => songSelect.IsBackgroundUndimmed());
|
||||||
|
AddUntilStep("Screen using background blur", () => songSelect.IsBackgroundBlur());
|
||||||
|
performFullSetup();
|
||||||
|
AddStep("Exit to song select", () => player.Exit());
|
||||||
|
AddUntilStep("Screen is undimmed", () => songSelect.IsBackgroundUndimmed());
|
||||||
|
AddUntilStep("Screen using background blur", () => songSelect.IsBackgroundBlur());
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Check if <see cref="PlayerLoader"/> properly triggers the visual settings preview when a user hovers over the visual settings panel.
|
/// Check if <see cref="PlayerLoader"/> properly triggers the visual settings preview when a user hovers over the visual settings panel.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -227,17 +242,6 @@ namespace osu.Game.Tests.Visual.Background
|
|||||||
songSelect.IsBackgroundUndimmed() && songSelect.IsBackgroundCurrent() && songSelect.CheckBackgroundBlur(results.ExpectedBackgroundBlur));
|
songSelect.IsBackgroundUndimmed() && songSelect.IsBackgroundCurrent() && songSelect.CheckBackgroundBlur(results.ExpectedBackgroundBlur));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Check if background gets undimmed and unblurred when leaving <see cref="Player"/> for <see cref="PlaySongSelect"/>
|
|
||||||
/// </summary>
|
|
||||||
[Test]
|
|
||||||
public void TestTransitionOut()
|
|
||||||
{
|
|
||||||
performFullSetup();
|
|
||||||
AddStep("Exit to song select", () => player.Exit());
|
|
||||||
AddUntilStep("Screen is undimmed and user blur removed", () => songSelect.IsBackgroundUndimmed() && songSelect.IsBlurCorrect());
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Check if hovering on the visual settings dialogue after resuming from player still previews the background dim.
|
/// Check if hovering on the visual settings dialogue after resuming from player still previews the background dim.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -333,7 +337,7 @@ namespace osu.Game.Tests.Visual.Background
|
|||||||
|
|
||||||
public bool IsBackgroundVisible() => background.CurrentAlpha == 1;
|
public bool IsBackgroundVisible() => background.CurrentAlpha == 1;
|
||||||
|
|
||||||
public bool IsBlurCorrect() => background.CurrentBlur == new Vector2(BACKGROUND_BLUR);
|
public bool IsBackgroundBlur() => background.CurrentBlur == new Vector2(BACKGROUND_BLUR);
|
||||||
|
|
||||||
public bool CheckBackgroundBlur(Vector2 expected) => background.CurrentBlur == expected;
|
public bool CheckBackgroundBlur(Vector2 expected) => background.CurrentBlur == expected;
|
||||||
|
|
||||||
|
@ -27,9 +27,12 @@ namespace osu.Game.Screens.Backgrounds
|
|||||||
private WorkingBeatmap beatmap;
|
private WorkingBeatmap beatmap;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether or not user-configured settings relating to brightness of elements should be ignored
|
/// Whether or not user-configured settings relating to brightness of elements should be ignored.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly Bindable<bool> IgnoreUserSettings = new Bindable<bool>();
|
/// <remarks>
|
||||||
|
/// Beatmap background screens should not apply user settings by default.
|
||||||
|
/// </remarks>
|
||||||
|
public readonly Bindable<bool> IgnoreUserSettings = new Bindable<bool>(true);
|
||||||
|
|
||||||
public readonly Bindable<bool> StoryboardReplacesBackground = new Bindable<bool>();
|
public readonly Bindable<bool> StoryboardReplacesBackground = new Bindable<bool>();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user