mirror of
https://github.com/ppy/osu
synced 2024-12-28 09:52:56 +00:00
Merge pull request #16068 from peppy/fix-fail-animation-background-dim
Improve appearance of player-wide background after failing with low background dim
This commit is contained in:
commit
4c81fd8b7c
@ -6,6 +6,7 @@ using osu.Framework.Bindables;
|
||||
using osu.Game.Rulesets.UI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using JetBrains.Annotations;
|
||||
using ManagedBass.Fx;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio.Sample;
|
||||
@ -18,6 +19,7 @@ using osu.Framework.Utils;
|
||||
using osu.Game.Audio.Effects;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
@ -58,6 +60,12 @@ namespace osu.Game.Screens.Play
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// The player screen background, used to adjust appearance on failing.
|
||||
/// </summary>
|
||||
[CanBeNull]
|
||||
public BackgroundScreen Background { private get; set; }
|
||||
|
||||
public FailAnimation(DrawableRuleset drawableRuleset)
|
||||
{
|
||||
this.drawableRuleset = drawableRuleset;
|
||||
@ -136,6 +144,9 @@ namespace osu.Game.Screens.Play
|
||||
Content.ScaleTo(0.85f, duration, Easing.OutQuart);
|
||||
Content.RotateTo(1, duration, Easing.OutQuart);
|
||||
Content.FadeColour(Color4.Gray, duration);
|
||||
|
||||
// Will be restored by `ApplyToBackground` logic in `SongSelect`.
|
||||
Background?.FadeColour(OsuColour.Gray(0.3f), 60);
|
||||
}
|
||||
|
||||
public void RemoveFilters(bool resetTrackFrequency = true)
|
||||
|
@ -921,6 +921,8 @@ namespace osu.Game.Screens.Play
|
||||
b.IsBreakTime.BindTo(breakTracker.IsBreakTime);
|
||||
|
||||
b.StoryboardReplacesBackground.BindTo(storyboardReplacesBackground);
|
||||
|
||||
failAnimationLayer.Background = b;
|
||||
});
|
||||
|
||||
HUDOverlay.IsBreakTime.BindTo(breakTracker.IsBreakTime);
|
||||
|
Loading…
Reference in New Issue
Block a user