mirror of https://github.com/ppy/osu
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:
parent
e18bbc9509
commit
44d0dc6113
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue