IEnumerator InternalDelayedSetActive(bool value, float time) { yield return(new WaitForSeconds(time)); SetActive(value); OnToggled?.Invoke(value); }
private void CustomToggleSwitch_MouseDown(object sender, MouseEventArgs e) { if (Enabled) { Checked = !Checked; OnToggled.Invoke(sender, e); Invalidate(); } }
protected void OnToggleValueChanged(bool isOn) { // Debug.Log("OnToggleValueChanged: "+isOn); // if was toggle off by multiple click if (_wasSelected && !isOn || isOn) { OnToggled?.Invoke(this, isOn); } _wasSelected = isOn; }
public void SetActive(bool value) { gameObject.SetActive(value); OnToggled?.Invoke(value); }
public override void OnMouseClick(OnKeyEventArgs E) { Checked = !Checked; OnToggled?.Invoke(this, new OnCheckBoxToggledEventArgs(GUI, Checked)); }
private void InternalOnToggled(IntPtr b, IntPtr data) { OnToggled?.Invoke(this); }
private void Sw_Toggled(object sender, ToggledEventArgs e) { var obj = (Switch)sender; OnToggled?.Invoke(sender, obj.IsToggled); }
private void Awake() { toggle.onValueChanged.AddListener(x => OnToggled?.Invoke(Index, x)); }