mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 14:17:06 +09:00
Inline updateDrawableAnchorIfUsingClosest
This commit is contained in:
@ -152,25 +152,18 @@ namespace osu.Game.Skinning.Editor
|
||||
Drawable drawable = (Drawable)c.Item;
|
||||
drawable.Position += drawable.ScreenSpaceDeltaToParentSpace(moveEvent.ScreenSpaceDelta);
|
||||
|
||||
updateDrawableAnchorIfUsingClosest(c.Item);
|
||||
if (c.Item.UsesFixedAnchor) continue;
|
||||
|
||||
var closestAnchor = getClosestAnchorForDrawable(drawable);
|
||||
|
||||
if (closestAnchor == drawable.Anchor) continue;
|
||||
|
||||
updateDrawableAnchor(drawable, closestAnchor);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void updateDrawableAnchorIfUsingClosest(ISkinnableDrawable item)
|
||||
{
|
||||
if (item.UsesFixedAnchor) return;
|
||||
|
||||
var drawable = (Drawable)item;
|
||||
|
||||
var closestAnchor = getClosestAnchorForDrawable(drawable);
|
||||
|
||||
if (closestAnchor == drawable.Anchor) return;
|
||||
|
||||
updateDrawableAnchor(drawable, closestAnchor);
|
||||
}
|
||||
|
||||
protected override void OnSelectionChanged()
|
||||
{
|
||||
base.OnSelectionChanged();
|
||||
|
Reference in New Issue
Block a user