1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 16:52:54 +08:00

Calculate position adjustment distance in local parent space

This commit is contained in:
Salman Ahmed 2022-03-19 05:04:11 +03:00
parent 5bcb7c167c
commit 486be83177

View File

@ -84,7 +84,7 @@ namespace osu.Game.Screens.Play.HUD
protected override bool OnMouseMove(MouseMoveEvent e)
{
positionalAdjust = Vector2.Distance(e.ScreenSpaceMousePosition, button.ScreenSpaceDrawQuad.Centre) / 200;
positionalAdjust = Vector2.Distance(e.MousePosition, button.ToSpaceOfOtherDrawable(button.DrawRectangle.Centre, Parent)) / 200;
return base.OnMouseMove(e);
}