private void onClick() { WorkspaceEntry newEntry = Instantiate(_entryPrefab); newEntry.Set(_volumeFactory.Create(_entry.Volume)); newEntry.LinkedEntry = _entry; newEntry.Volume.Data = _entry.Volume.Data; _workspace.AddToCenter(newEntry); }
public void OnBeginDrag(PointerEventData eventData) { if (_workspace.HasEntry(_entry)) { return; } PendingWorkspaceEntry result = Instantiate(_entryPrefab); result.Base.SetParent(GetComponentInParent <Canvas>().transform, false); result.Base.localScale = Vector3.one; result.WorkspaceEntry.LinkedEntry = _entry; result.WorkspaceEntry.Set(_volumeFactory.Create(_entry.Volume)); result.WorkspaceEntry.Volume.Data = _entry.Volume.Data; result.Base.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, _entry.Base.rect.width); _workspace.PendingEntry = result; }
private void createPreview() { if (_entryVolume != null) { throw new InvalidOperationException(); } if (_editPanel.Entry == null) { return; } EntryVolume entryContent = _volumeFactory.Create(_editPanel.Entry.Volume); entryContent.Base.SetParent(_hook, false); entryContent.Base.localScale = Vector3.one; entryContent.Expanded = _extended; _entryVolume = entryContent; }