1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-05 09:42:54 +08:00
This commit is contained in:
maarvin 2024-12-02 21:23:09 +01:00 committed by GitHub
commit 9fefb5de5a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 25 additions and 3 deletions

View File

@ -2,11 +2,12 @@
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics.Lines;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Rulesets.Osu.Skinning.Default
{
public abstract partial class DrawableSliderPath : SmoothPath
public abstract partial class DrawableSliderPath : BackdropBlurPath
{
public const float BORDER_PORTION = 0.128f;
public const float GRADIENT_PORTION = 1 - BORDER_PORTION;
@ -14,6 +15,11 @@ namespace osu.Game.Rulesets.Osu.Skinning.Default
private const float border_max_size = 8f;
private const float border_min_size = 0f;
protected DrawableSliderPath()
{
EffectBufferScale = new Vector2(0.25f);
}
private Color4 borderColour = Color4.White;
public Color4 BorderColour

View File

@ -74,6 +74,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Alpha = priorityLookupPrefix == null ? 0.75f : 0.5f // TODO: this is kind of a dirty way to check if we're a hitcircle or a circle that's part of a slider.
},
OverlayLayer = new Container
{

View File

@ -7,6 +7,7 @@ using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Rulesets.Osu.Skinning.Default;
using osu.Game.Skinning;
using osu.Game.Utils;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Rulesets.Osu.Skinning.Legacy
@ -18,11 +19,21 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
protected override Color4 GetBodyAccentColour(ISkinSource skin, Color4 hitObjectAccentColour)
{
// legacy skins use a constant value for slider track alpha, regardless of the source colour.
return base.GetBodyAccentColour(skin, hitObjectAccentColour).Opacity(0.7f);
return base.GetBodyAccentColour(skin, hitObjectAccentColour).Opacity(0.6f);
}
private partial class LegacyDrawableSliderPath : DrawableSliderPath
{
public LegacyDrawableSliderPath()
{
BlurSigma = new Vector2(16f);
BackdropTintStrength = 0.5f;
// To prevent shadows from contributing to the background blur effect
MaskCutoff = 0.25f;
}
protected override Color4 ColourAt(float position)
{
// https://github.com/peppy/osu-stable-reference/blob/3ea48705eb67172c430371dcfc8a16a002ed0d3d/osu!/Graphics/Renderers/MmSliderRendererGL.cs#L99

View File

@ -999,7 +999,11 @@ namespace osu.Game
Children = new Drawable[]
{
backReceptor = new ScreenFooter.BackReceptor(),
ScreenStack = new OsuScreenStack { RelativeSizeAxes = Axes.Both },
new RefCountedBackbufferProvider
{
RelativeSizeAxes = Axes.Both,
Child = ScreenStack = new OsuScreenStack { RelativeSizeAxes = Axes.Both }
},
BackButton = new BackButton(backReceptor)
{
Anchor = Anchor.BottomLeft,