public void CopyPanel(CardPanel panel) { CardPanel.IAssignedPanel newPanel = panel.GetModel().Duplicate(); panelManager.SetOrganizedPanels(false); panelManager.AddPanel(newPanel, false /*added from library*/, false /*draggedOn */); panelManager.SetupPanelPlacementAndNotes(model); }
public void OnEndDrag(PointerEventData eventData) { Debug.Log("END DRAG"); cardPanel.OnEndDrag(); // May have been deleted (dragged into trash) if (cardPanel.GetModel() != null) { cardPanel.SetUseMetadata($"Move {this.cardPanel.GetModel().GetTitle()} panel"); } }
private bool IsPanelOverTrash() { return(RectTransformUtility.RectangleContainsScreenPoint(cardManager.trash, Input.mousePosition) && draggedPanel != null && draggedPanel.GetModel().GetId() != BehaviorCards.GetMiscPanelId()); }