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:
commit
afec5baea1
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user