mirror of https://github.com/ppy/osu
Fix incorrect anchor handling in `ArgonManiaComboCounter`
This commit is contained in:
parent
e465049050
commit
7c142bcedf
|
@ -30,8 +30,12 @@ protected override void LoadComplete()
|
||||||
|
|
||||||
private void updateAnchor()
|
private void updateAnchor()
|
||||||
{
|
{
|
||||||
Anchor &= ~(Anchor.y0 | Anchor.y2);
|
// if the anchor isn't a vertical center, set top or bottom anchor based on scroll direction
|
||||||
Anchor |= direction.Value == ScrollingDirection.Up ? Anchor.y2 : Anchor.y0;
|
if (!Anchor.HasFlag(Anchor.y1))
|
||||||
|
{
|
||||||
|
Anchor &= ~(Anchor.y0 | Anchor.y2);
|
||||||
|
Anchor |= direction.Value == ScrollingDirection.Up ? Anchor.y2 : Anchor.y0;
|
||||||
|
}
|
||||||
|
|
||||||
// since we flip the vertical anchor when changing scroll direction,
|
// since we flip the vertical anchor when changing scroll direction,
|
||||||
// we can use the sign of the Y value as an indicator to make the combo counter displayed correctly.
|
// we can use the sign of the Y value as an indicator to make the combo counter displayed correctly.
|
||||||
|
|
Loading…
Reference in New Issue