mirror of
https://github.com/ppy/osu
synced 2025-02-20 04:17:06 +00:00
prevent scaling container from creating a storyboard background
This commit is contained in:
parent
a62dd7cca0
commit
d00fb21188
@ -172,6 +172,8 @@ namespace osu.Game.Graphics.Containers
|
|||||||
|
|
||||||
private class ScalingBackgroundScreen : BackgroundScreenDefault
|
private class ScalingBackgroundScreen : BackgroundScreenDefault
|
||||||
{
|
{
|
||||||
|
protected override bool AllowStoryboardBackground => false;
|
||||||
|
|
||||||
public override void OnEntering(IScreen last)
|
public override void OnEntering(IScreen last)
|
||||||
{
|
{
|
||||||
this.FadeInFromZero(4000, Easing.OutQuint);
|
this.FadeInFromZero(4000, Easing.OutQuint);
|
||||||
|
@ -31,6 +31,8 @@ namespace osu.Game.Screens.Backgrounds
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
private IBindable<WorkingBeatmap> beatmap { get; set; }
|
private IBindable<WorkingBeatmap> beatmap { get; set; }
|
||||||
|
|
||||||
|
protected virtual bool AllowStoryboardBackground => true;
|
||||||
|
|
||||||
public BackgroundScreenDefault(bool animateOnEnter = true)
|
public BackgroundScreenDefault(bool animateOnEnter = true)
|
||||||
: base(animateOnEnter)
|
: base(animateOnEnter)
|
||||||
{
|
{
|
||||||
@ -111,7 +113,9 @@ namespace osu.Game.Screens.Backgrounds
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case BackgroundSource.BeatmapWithStoryboard:
|
case BackgroundSource.BeatmapWithStoryboard:
|
||||||
newBackground = new BeatmapBackgroundWithStoryboard(beatmap.Value, backgroundName);
|
newBackground = AllowStoryboardBackground
|
||||||
|
? new BeatmapBackgroundWithStoryboard(beatmap.Value, backgroundName)
|
||||||
|
: new BeatmapBackground(beatmap.Value, backgroundName);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user