mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Fix note placement offset not working for down-scroll
This commit is contained in:
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user