mirror of
https://github.com/ppy/osu.git
synced 2025-03-23 18:10:01 +08:00
Don't show epilepsy warning when storyboards are disabled
I have more thoughts on this warning in general (which will likely see it removed or moved in the future) but this seems like a quick QOL fix for now. As mentioned in https://github.com/ppy/osu/discussions/22861.
This commit is contained in:
parent
20b2d0d4c7
commit
4cea29402b
@ -67,6 +67,8 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
private OsuScrollContainer settingsScroll = null!;
|
||||
|
||||
private Bindable<bool> showStoryboards = null!;
|
||||
|
||||
private bool backgroundBrightnessReduction;
|
||||
|
||||
private readonly BindableDouble volumeAdjustment = new BindableDouble(1);
|
||||
@ -149,10 +151,11 @@ namespace osu.Game.Screens.Play
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(SessionStatics sessionStatics, AudioManager audio)
|
||||
private void load(SessionStatics sessionStatics, AudioManager audio, OsuConfigManager config)
|
||||
{
|
||||
muteWarningShownOnce = sessionStatics.GetBindable<bool>(Static.MutedAudioNotificationShownOnce);
|
||||
batteryWarningShownOnce = sessionStatics.GetBindable<bool>(Static.LowBatteryNotificationShownOnce);
|
||||
showStoryboards = config.GetBindable<bool>(OsuSetting.ShowStoryboard);
|
||||
|
||||
const float padding = 25;
|
||||
|
||||
@ -463,7 +466,10 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
// only show if the warning was created (i.e. the beatmap needs it)
|
||||
// and this is not a restart of the map (the warning expires after first load).
|
||||
if (epilepsyWarning?.IsAlive == true)
|
||||
//
|
||||
// note the late check of storyboard enable as the user may have just changed it
|
||||
// from the settings on the loader screen.
|
||||
if (epilepsyWarning?.IsAlive == true && showStoryboards.Value)
|
||||
{
|
||||
const double epilepsy_display_length = 3000;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user