mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 17:43:05 +08:00
MouseDownPosition -> DragPosition
This commit is contained in:
parent
5254b07680
commit
a1666fb7fa
@ -15,8 +15,8 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints
|
||||
{
|
||||
public class ManiaSelectionBlueprint : SelectionBlueprint
|
||||
{
|
||||
public Vector2 ScreenSpaceMouseDownPosition { get; private set; }
|
||||
public Vector2 MouseDownPosition { get; private set; }
|
||||
public Vector2 ScreenSpaceDragPosition { get; private set; }
|
||||
public Vector2 DragPosition { get; private set; }
|
||||
|
||||
protected new DrawableManiaHitObject HitObject => (DrawableManiaHitObject)base.HitObject;
|
||||
|
||||
@ -49,8 +49,8 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints
|
||||
|
||||
protected override bool OnMouseDown(MouseDownEvent e)
|
||||
{
|
||||
ScreenSpaceMouseDownPosition = e.ScreenSpaceMousePosition;
|
||||
MouseDownPosition = HitObject.ToLocalSpace(e.ScreenSpaceMousePosition);
|
||||
ScreenSpaceDragPosition = e.ScreenSpaceMousePosition;
|
||||
DragPosition = HitObject.ToLocalSpace(e.ScreenSpaceMousePosition);
|
||||
|
||||
return base.OnMouseDown(e);
|
||||
}
|
||||
@ -59,8 +59,8 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints
|
||||
{
|
||||
var result = base.OnDrag(e);
|
||||
|
||||
ScreenSpaceMouseDownPosition = e.ScreenSpaceMousePosition;
|
||||
MouseDownPosition = HitObject.ToLocalSpace(e.ScreenSpaceMousePosition);
|
||||
ScreenSpaceDragPosition = e.ScreenSpaceMousePosition;
|
||||
DragPosition = HitObject.ToLocalSpace(e.ScreenSpaceMousePosition);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -49,8 +49,8 @@ namespace osu.Game.Rulesets.Mania.Edit
|
||||
{
|
||||
var referenceParent = (HitObjectContainer)reference.HitObject.Parent;
|
||||
|
||||
float offsetFromReferenceOrigin = reference.MouseDownPosition.Y - reference.HitObject.OriginPosition.Y;
|
||||
float targetPosition = referenceParent.ToLocalSpace(reference.ScreenSpaceMouseDownPosition).Y - offsetFromReferenceOrigin;
|
||||
float offsetFromReferenceOrigin = reference.DragPosition.Y - reference.HitObject.OriginPosition.Y;
|
||||
float targetPosition = referenceParent.ToLocalSpace(reference.ScreenSpaceDragPosition).Y - offsetFromReferenceOrigin;
|
||||
|
||||
// Flip the vertical coordinate space when scrolling downwards
|
||||
if (scrollingInfo.Direction.Value == ScrollingDirection.Down)
|
||||
|
Loading…
Reference in New Issue
Block a user