void MoveCellOutOfSight(tk2dUIGridViewCell cell) { m_CellsFreed.Add (cell); m_CellsUsed.Remove (cell); if(scrollAxes == Axes.YAxis) { m_CellsUsed.Sort (new tk2dUIGridViewCellRowSort ()); } else { m_CellsUsed.Sort(new tk2dUIGridViewCellColSort()); } cell.transform.localPosition = new Vector3 (0, Screen.height * 2 ,0); cell.ResetRowAndCol (); }
void SetGridItemPosition(tk2dUIGridViewCell gridItem,int row,int col) { Vector2 position = firstPosition + m_CellsPositions [row] [col]; position.y *= -1; gridItem.transform.localPosition = position; //Utility.Log ("idx : " + idx + " CellSightSize : " + CellSightSize + " position : " + position); }
void GridViewBackgroundButtonDown() { mTouchDownContentOffset = ContentContainerOffset; mSelectedCell = GetTouchedCell(); if(isEdting) { isGridViewBackgroundButtonDown = true; if(null != cellTouchBeginDelegate){ cellTouchBeginDelegate(this,mSelectedCell);} tk2dUIManager.Instance.OnInputUpdate += GridViewBackgroundTouchUpdate; if(null != cellLongPressDelegate) { Vector3 downPoint = GetTouchedPointInLocal(); StopCoroutine("CheckLongPress"); StartCoroutine(CheckLongPress(downPoint)); } } }