private void CellOnCellClicked(object sender, EventArgs eventArgs) { if (sender is GameCellDisplay cellDisplay) { CellClicked?.Invoke(this, new CellClickArgs(cellDisplay.CellCord)); } }
void OnMouseDown() { if (CellClicked != null) { CellClicked.Invoke(this, new EventArgs()); } }
public void OnMouseDown() { if (CellClicked != null) { CellClicked.Invoke(this, new EventArgs()); } //ui_operator.HideCard(); }
public void OnMouseDown() { MarkAsSelected(!isSelected); if (CellClicked != null) { CellClicked.Invoke(this, null); } }
void OnMouseDown() { if (CellClicked != null) { if (!EventSystem.current.IsPointerOverGameObject()) { CellClicked.Invoke(this, new EventArgs()); } } }
protected virtual void OnMouseOver() { if (Input.GetMouseButtonDown(0) && !EventSystem.current.IsPointerOverGameObject() && CellClicked != null) { CellClicked.Invoke(this, new EventArgs()); } if (Input.GetMouseButtonDown(1) && !EventSystem.current.IsPointerOverGameObject() && CellRightClicked != null) { CellRightClicked.Invoke(this, new EventArgs()); } }
//Color DISABLED_TEXT_COLOR = new Color(0.1961f, 0.1961f, 0.1961f); public void UpdateWithIndexDelegateAndName(int aIndex, CellClicked aCellClickedHandler, CellClicked aCellDeleteClickedHandler, string aName, bool showImage) { if (!prepared) { Prepare(); } index = aIndex; button.interactable = aCellClickedHandler != null; if (aCellClickedHandler != null) { CellClickedHandler = aCellClickedHandler; if (nameText.color.a != 1f) { nameText.color = new Color(nameText.color.r, nameText.color.g, nameText.color.b, 1f); } } else { int nameNumber; bool isNumeric = int.TryParse(aName, out nameNumber); if (isNumeric) { nameText.color = new Color(nameText.color.r, nameText.color.g, nameText.color.b, DISABLED_ALPHA); } } nameText.text = aName; solvedImage.enabled = showImage; if (solvedText != null) { if (showImage) { solvedText.text = (aIndex + 1).ToString(); } else { solvedText.text = ""; } } CellDeleteClickedHandler = aCellDeleteClickedHandler; if (deleteButton != null) { deleteButton.onClick.AddListener(DeleteButtonPressed); } }
private void OnCellClick(object sender, DataGridViewCellEventArgs e) { try { if (dataGrid.CurrentCell != null) { dataGrid.BeginEdit(true); CellClicked?.Invoke(this, new DataGridViewCellEventArgs(dataGrid.CurrentCell.ColumnIndex, dataGrid.CurrentCell.RowIndex)); } } catch (InvalidOperationException ex) { Debug.WriteLine(ex.ToString()); } }
void OnMouseDown() { CellClicked?.Invoke(this); }
private void OnCellClicked(object sender, EventArgs e) { CellBox cellBox = (CellBox)sender; CellClicked?.Invoke(cellBox.Cell); }