Exemple #1
0
 private void DGV_Cell_Mouse_Click(object sender, DataGridViewCellMouseEventArgs e)
 {
     OnCellClick?.Invoke(
         e.RowIndex,
         (sender as DataGridView)?.Rows[e.RowIndex].Cells[0].Value.ToString(),
         e.Button);
 }
Exemple #2
0
        public override void Click(Engine engine, Vector2 localPosition)
        {
            Vector2?coordinates = GetCoordinatesFor(LocalTransform, localPosition);

            if (coordinates.HasValue)
            {
                GridCell cell = GetCellAt(coordinates.Value);
                if (OnCellClick != null)
                {
                    OnCellClick.Invoke(cell.Coordinates);
                }
            }
        }
Exemple #3
0
    void OnDestroy()
    {
        onSetCell       = null;
        onSetCellFinish = null;
        onCellClick     = null;

        mCellPrefab      = null;
        mGridLayoutGroup = null;
        for (int i = 0; i < mCellList.Count; i++)
        {
            mCellList[i].onCellClick -= HandleCellClickEvent;
        }
        mCellList.Clear();
        mCellList = null;
    }
Exemple #4
0
 public void OnPointerClick(PointerEventData eventData)
 {
     OnCellClick?.Invoke(this);
 }
Exemple #5
0
 void OnDestroy()
 {
     onCellClick = null;
     mCellButton = null;
 }