public void AddInputFieldEndEditListener(string componentName, UnityAction <string> action) { UIBehaviour tmp = GetGameObject <UIBehaviour>(componentName); if (tmp != null) { tmp.AddInputFieldEndEditListener(action); } }
public void AddToggleListener(string componentName, UnityAction <bool> action) { UIBehaviour tmp = GetGameObject <UIBehaviour>(componentName); if (tmp != null) { tmp.AddToggleListener(action); } }
/// <summary> /// 接口监听事件 /// </summary> /// <param name="componentName">组件名字</param> /// <param name="eventType">继承接口类型</param> /// <param name="action">回调</param> public void OnEventHandler(string componentName, EventTriggerType eventType, UnityAction <BaseEventData> action) { UIBehaviour tmp = GetGameObject <UIBehaviour>(componentName); if (tmp != null) { tmp.EventHandler(eventType, action); } }
public void SetRawImage(string componentName, Texture spr) { UIBehaviour tmp = GetGameObject <UIBehaviour>(componentName); if (tmp != null) { tmp.SetRawImage(spr); } }
public void SetText(string componentName, string str) { UIBehaviour tmp = GetGameObject <UIBehaviour>(componentName); if (tmp != null) { tmp.SetText(str); } }
public void AddSliderListener(string componentName, UnityAction <float> action) { UIBehaviour tmp = GetGameObject <UIBehaviour>(componentName); if (tmp != null) { tmp.AddSliderListener(action); } }