1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-04 02:13:22 +08:00

Merge pull request #31602 from peppy/fix-taiko-beat-snap-grid

Fix beat snap grid being lines not being corectly centered to time
This commit is contained in:
Dan Balasescu 2025-01-21 15:13:29 +09:00 committed by GitHub
commit afec5baea1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -185,9 +185,28 @@ namespace osu.Game.Screens.Edit.Compose.Components
private void onDirectionChanged(ValueChangedEvent<ScrollingDirection> direction)
{
Origin = Anchor = direction.NewValue == ScrollingDirection.Up
? Anchor.TopLeft
: Anchor.BottomLeft;
switch (direction.NewValue)
{
case ScrollingDirection.Up:
Anchor = Anchor.TopLeft;
Origin = Anchor.CentreLeft;
break;
case ScrollingDirection.Down:
Anchor = Anchor.BottomLeft;
Origin = Anchor.CentreLeft;
break;
case ScrollingDirection.Left:
Anchor = Anchor.TopLeft;
Origin = Anchor.TopCentre;
break;
case ScrollingDirection.Right:
Anchor = Anchor.TopRight;
Origin = Anchor.TopCentre;
break;
}
bool isHorizontal = direction.NewValue == ScrollingDirection.Left || direction.NewValue == ScrollingDirection.Right;