mirror of
https://github.com/ppy/osu
synced 2025-01-31 10:22:02 +00:00
Account for anchor when dragging MusicController (fixes VisualTest).
This commit is contained in:
parent
1d51e6af2a
commit
dde3a68c8f
@ -179,7 +179,9 @@ namespace osu.Game.Overlays
|
|||||||
protected override bool OnDrag(InputState state)
|
protected override bool OnDrag(InputState state)
|
||||||
{
|
{
|
||||||
Vector2 change = (state.Mouse.Position - state.Mouse.PositionMouseDown.Value);
|
Vector2 change = (state.Mouse.Position - state.Mouse.PositionMouseDown.Value);
|
||||||
change.X = -change.X;
|
|
||||||
|
if ((Anchor & Anchor.x2) > 0)
|
||||||
|
change.X = -change.X;
|
||||||
|
|
||||||
change *= (float)Math.Pow(change.Length, 0.7f) / change.Length;
|
change *= (float)Math.Pow(change.Length, 0.7f) / change.Length;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user