Skip to content

Commit

Permalink
Fix incorrect anchor handling in ArgonManiaComboCounter
Browse files Browse the repository at this point in the history
  • Loading branch information
peppy committed Aug 14, 2024
1 parent e465049 commit 7c142bc
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@ protected override void LoadComplete()

private void updateAnchor()
{
Anchor &= ~(Anchor.y0 | Anchor.y2);
Anchor |= direction.Value == ScrollingDirection.Up ? Anchor.y2 : Anchor.y0;
// if the anchor isn't a vertical center, set top or bottom anchor based on scroll direction
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,
// we can use the sign of the Y value as an indicator to make the combo counter displayed correctly.
Expand Down

0 comments on commit 7c142bc

Please sign in to comment.