public override void MouseUp(Terraria.UI.UIMouseEvent evt) { isDragging = false; Left.Set(evt.MousePosition.X - offset.X, 0f); Top.Set(evt.MousePosition.Y - offset.Y, 0f); Recalculate(); }
public override void MouseDown(Terraria.UI.UIMouseEvent evt) { isDragging = true; offset = new Vector2(evt.MousePosition.X - Left.Pixels, evt.MousePosition.Y - Top.Pixels); }