protected override void OnDragEnd(int x, int y) { AnchorableGump ctrl = Engine.AnchorManager.GetAnchorableControlOver(this, x, y); if (ctrl != null) { Engine.AnchorManager.DropControl( this, ctrl, ScreenCoordinateX + x - ctrl.ScreenCoordinateX, ScreenCoordinateY + y - ctrl.ScreenCoordinateY); } base.OnDragEnd(x, y); }
protected override void OnMouseOver(int x, int y) { if (Engine.UI.IsDragging) { AnchorableGump ctrl = Engine.UI.AnchorManager.GetAnchorableControlOver(this, x, y); if (ctrl != null) { Location = Engine.UI.AnchorManager.GetCandidateDropLocation( this, ctrl, ScreenCoordinateX + x - ctrl.ScreenCoordinateX, ScreenCoordinateY + y - ctrl.ScreenCoordinateY); } } base.OnMouseOver(x, y); }
public void TryAttacheToExist() { _anchorCandidate = UIManager.AnchorManager.GetAnchorableControlUnder(this); Attache(); }