mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 18:23:04 +08:00
Fix note placement offset not working for down-scroll
This commit is contained in:
parent
754fbc59e1
commit
0a409075be
@ -111,8 +111,23 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints
|
|||||||
|
|
||||||
private Vector2 applyPositionOffset(Vector2 position, bool reverse)
|
private Vector2 applyPositionOffset(Vector2 position, bool reverse)
|
||||||
{
|
{
|
||||||
position.Y += (scrollingInfo.Direction.Value == ScrollingDirection.Up && !reverse ? -1 : 1) * NotePiece.NOTE_HEIGHT / 2;
|
float offset = 0;
|
||||||
return position;
|
|
||||||
|
switch (scrollingInfo.Direction.Value)
|
||||||
|
{
|
||||||
|
case ScrollingDirection.Up:
|
||||||
|
offset = -NotePiece.NOTE_HEIGHT / 2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ScrollingDirection.Down:
|
||||||
|
offset = NotePiece.NOTE_HEIGHT / 2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (reverse)
|
||||||
|
offset = -offset;
|
||||||
|
|
||||||
|
return new Vector2(position.X, position.Y + offset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user