private void del_Click(object sender, EventArgs e) { ClickButtonEvent?.Invoke(this, new DeleteEventArgs(delBox.Text)); //createHero a = new createHero(); //int g; //if (Int32.TryParse(delBox.Text, out g)) //{ // SwowBox.Text = a.DELETE(g-1); //} //else //{ // delBox.Text = "insert mumber"; //} }
// // Click for pressDuration seconds // a good visual pressDuration is 0.33f public virtual void Click(float pressDuration = 0) { if (!(isActiveAndEnabled && Interactable)) { // button must be active and interactable to click return; } // show button as pressed _showAsPressed = true; UpdateButton(); void unpressCallback() { // // invoke and unpress button onClickEvent?.Invoke(this); // SkipPointerUp skips returning to the normal ("Up") state after // clicking, which is useful with tab menus or button toggles, // otherwise you see the normal state flicker. _showAsPressed = SkipPointerUp; UpdateButton(); } if (waitForClickSound && pressDuration == 0 && Enabled) { SoundHelper.Play(clickSound, unpressCallback); } else { if (clickSound && Enabled) { clickSound?.Play(); } if (pressDuration > 0) { Delayer.Delay(pressDuration, unpressCallback); } else { unpressCallback(); } } }
public void Select(string value, bool giveWarning = true) { for (int i = 0; i < _menuItems.Length; ++i) { string menuItem = _menuItems[i]; if (value == menuItem) { ClickButton clickButton = _menuButtons[i]; ClickButtonEvent onClickEvent = clickButton.onClickEvent; onClickEvent?.Invoke(clickButton); return; } } if (giveWarning) { Logger.Warning("Could not select button \"" + value + "\" on popup."); } }
public void OnPointerClick(PointerEventData eventData) { ClickButtonEvent?.Invoke(eventData.pointerPress.name); }
private void All_Click(object sender, EventArgs e) { ClickButtonEvent?.Invoke(this, new NewWindowEventArgs("ShowAll")); //ShowAll S_ALL = new ShowAll(); //S_ALL.ShowDialog(); }
private void Sh_Click(object sender, EventArgs e) { ClickButtonEvent?.Invoke(this, new NewWindowEventArgs("ShowOne")); //Show sh = new Show(); //sh.ShowDialog(); }
private void Del_Click(object sender, EventArgs e) { ClickButtonEvent?.Invoke(this, new NewWindowEventArgs("Delete")); //DelCharacter del = new DelCharacter(); //del.ShowDialog(); }
//public NH RETURN(int i) //{ // return heros[i]; //} //public int RETURN_col() //{ // return heros.Count; //} //public string DELETE(int i) //{ // if (i >= 0 && i < RETURN_col()) // { // string t = "this element was deleted: " + heros[i].input(); // heros.RemoveAt(i); // return t; // } // else { return "the Character is not founded"; } //} //public string SHOW(int i) //{ // if (i >= 0 && i < RETURN_col()) // { // return heros[i].input(); // } // else { return "the Character is not founded"; } //} private void New_Click(object sender, EventArgs e) { ClickButtonEvent?.Invoke(this, new NewWindowEventArgs("New")); //New a = new New(); //a.ShowDialog(); }