| | |
| | | _button.onClick.RemoveAllListeners();
|
| | | }
|
| | |
|
| | | public static void SetListener(this Button button, UnityAction action)
|
| | | {
|
| | | if (button == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | button.onClick.RemoveAllListeners();
|
| | | button.AddListener(action);
|
| | | }
|
| | |
|
| | | public static void AddListener(this Toggle _toggle, UnityAction<bool> _action)
|
| | | {
|
| | | if (_toggle == null)
|
| | |
| | | return;
|
| | | }
|
| | | _toggle.onValueChanged.AddListener(_action);
|
| | | }
|
| | |
|
| | | public static void SetListener(this Toggle toggle, UnityAction<bool> action)
|
| | | {
|
| | | if (toggle == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | toggle.onValueChanged.RemoveAllListeners();
|
| | | toggle.onValueChanged.AddListener(action);
|
| | | }
|
| | |
|
| | | public static void RemoveAllListeners(this Toggle _toggle)
|
| | |
| | | _slider.onValueChanged.AddListener(_action);
|
| | | }
|
| | |
|
| | | public static void SetListener(this Slider slider, UnityAction<float> action)
|
| | | {
|
| | | if (slider == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | slider.onValueChanged.RemoveAllListeners();
|
| | | slider.onValueChanged.AddListener(action);
|
| | | }
|
| | |
|
| | | public static void RemoveAllListeners(this Slider _slider)
|
| | | {
|
| | | if (_slider == null)
|
| | |
| | | _inputField.onValueChanged.AddListener(_action);
|
| | | }
|
| | |
|
| | | public static void SetListener(this InputField inputField, UnityAction<string> action)
|
| | | {
|
| | | if (inputField == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | inputField.onValueChanged.RemoveAllListeners();
|
| | | inputField.onValueChanged.AddListener(action);
|
| | | }
|
| | |
|
| | | public static void RemoveAllListeners(this InputField _inputField)
|
| | | {
|
| | | if (_inputField == null)
|