protected virtual void CheckInit() { if (m_initialized) { return; } m_rectTransform = this.GetComponent <RectTransform>(); m_cellRenderer = m_prefab.GetComponent <CellRenderer>(); if (m_cellRenderer == null) { Debug.LogWarningFormat("No valid CellRenderer found in the prefab {0} for list {1}", new object[2] { m_prefab.get_name(), this.get_name() }); return; } m_itemType = m_cellRenderer.GetValueType(); for (int num = m_content.get_transform().get_childCount() - 1; num >= 0; num--) { CellRenderer component = m_content.get_transform().GetChild(num).GetComponent <CellRenderer>(); if (Object.op_Implicit(component)) { Object.Destroy(component.get_gameObject()); } } m_cellRendererInstance = InitializeRenderer(); m_initialized = true; }
protected virtual void CheckInit() { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) if (!m_initialized) { m_rectTransform = this.GetComponent <RectTransform>(); if (m_cellSize.get_x() <= 0 || m_cellSize.get_y() <= 0) { m_cellSize = new Vector2Int(10, 10); } m_cellRenderer = m_prefab.GetComponent <CellRenderer>(); if (m_cellRenderer == null) { Debug.LogWarningFormat("No valid ItemElement found in the prefab {0} for list {1}", new object[2] { m_prefab.get_name(), this.get_name() }); return; } m_itemType = m_cellRenderer.GetValueType(); ItemDragNDropListener.instance.Register(this, m_itemType); m_initialized = true; } }
public unsafe void OnBeginDrag(PointerEventData eventData, CellRenderer cellRenderer) { //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) Tween tweenDestroy = m_tweenDestroy; if (tweenDestroy != null) { TweenExtensions.Kill(tweenDestroy, false); } if (!(m_currentRenderer != null)) { dragging = true; m_currentRenderer = cellRenderer; m_sourceClient = cellRenderer.dragNDropClient; m_copy = cellRenderer.Clone(); m_copy.dragNDropClient = null; m_copyTransform = m_copy.rectTransform; Vector3 localPosition = m_copyTransform.get_localPosition(); Rect rect = m_copyTransform.get_rect(); Vector2 val = default(Vector2); val._002Ector(0.5f, 0.5f); Vector2 pivot = m_copyTransform.get_pivot(); m_copyTransform.set_anchorMin(new Vector2(0.5f, 0.5f)); m_copyTransform.set_anchorMax(new Vector2(0.5f, 0.5f)); m_copyTransform.set_pivot(val); m_copyTransform.set_sizeDelta(new Vector2(rect.get_width(), rect.get_height())); Vector3 val2 = Vector2.op_Implicit(val - pivot); Vector3 val3 = Vector2.op_Implicit(new Vector2(rect.get_width() * ((IntPtr)(void*)val2).x, rect.get_height() * ((IntPtr)(void*)val2).y)); Vector3 localPosition2 = localPosition + val3; m_copyTransform.set_localPosition(localPosition2); DragNDropListener.instance.OnBeginDrag(eventData.get_position(), eventData.get_pressEventCamera(), m_copyTransform); m_clients.TryGetValue(cellRenderer.GetValueType(), out m_candidates); this.OnDragBegin?.Invoke(); } }