1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 19:27:24 +08:00

Add minor edge smoothing to fix flickering of barlines

In most cases.

Closes https://github.com/ppy/osu/issues/15184.
This commit is contained in:
Dean Herbert 2023-09-26 17:06:51 +09:00
parent 5150c5a643
commit 9949480ccd

View File

@ -26,9 +26,13 @@ namespace osu.Game.Rulesets.Mania.Skinning.Default
{ {
RelativeSizeAxes = Axes.Both; RelativeSizeAxes = Axes.Both;
// Avoid flickering due to no anti-aliasing of boxes by default.
var edgeSmoothness = new Vector2(0.3f);
AddInternal(mainLine = new Box AddInternal(mainLine = new Box
{ {
Name = "Bar line", Name = "Bar line",
EdgeSmoothness = edgeSmoothness,
Anchor = Anchor.BottomCentre, Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre, Origin = Anchor.BottomCentre,
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
@ -39,6 +43,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Default
AddInternal(leftAnchor = new Box AddInternal(leftAnchor = new Box
{ {
Name = "Left anchor", Name = "Left anchor",
EdgeSmoothness = edgeSmoothness,
Blending = BlendingParameters.Additive, Blending = BlendingParameters.Additive,
Anchor = Anchor.CentreLeft, Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreRight, Origin = Anchor.CentreRight,
@ -50,6 +55,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Default
AddInternal(rightAnchor = new Box AddInternal(rightAnchor = new Box
{ {
Name = "Right anchor", Name = "Right anchor",
EdgeSmoothness = edgeSmoothness,
Blending = BlendingParameters.Additive, Blending = BlendingParameters.Additive,
Anchor = Anchor.CentreRight, Anchor = Anchor.CentreRight,
Origin = Anchor.CentreLeft, Origin = Anchor.CentreLeft,