Fix 1px flashlight gaps when gameplay scaling mode is active

Closes https://github.com/ppy/osu/issues/27522.

Concerns mostly taiko and catch.

Not much of a proper fix rather than a workaround but it is what it is.
I tried a few other things, including setting `MaskingSmoothness = 0` on
the scaling container itself, to no avail.
This commit is contained in:
Bartłomiej Dach 2024-03-08 11:05:07 +01:00
parent e18bbc9509
commit 44d0dc6113
No known key found for this signature in database
1 changed files with 8 additions and 1 deletions

View File

@ -7,6 +7,7 @@
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Primitives;
using osu.Framework.Graphics.Rendering;
using osu.Framework.Graphics.Rendering.Vertices;
@ -88,7 +89,13 @@ public virtual void ApplyToDrawableRuleset(DrawableRuleset<T> drawableRuleset)
flashlight.Combo.BindTo(Combo);
flashlight.GetPlayfieldScale = () => drawableRuleset.Playfield.Scale;
drawableRuleset.Overlays.Add(flashlight);
drawableRuleset.Overlays.Add(new Container
{
RelativeSizeAxes = Axes.Both,
// workaround for 1px gaps on the edges of the playfield which would sometimes show with "gameplay" screen scaling active.
Padding = new MarginPadding(-1),
Child = flashlight,
});
}
protected abstract Flashlight CreateFlashlight();