public void AddLongPressListener(string compName, InputEventHandle <InputUILongPressEvent> callback, string parm = null) { InputEventRegisterInfo <InputUILongPressEvent> info = InputUIEventProxy.GetLongPressListener(GetLongPressComp(compName), UIEventKey, compName, parm, callback); info.AddListener(GetRegister(m_LongPressEvents, info.eventKey)); m_LongPressEvents.Add(info); }
public void AddOnDragListener(string compName, InputEventHandle <InputUIOnDragEvent> callback, string parm = null) { InputEventRegisterInfo <InputUIOnDragEvent> info = InputUIEventProxy.GetOnDragListener(GetDragComp(compName), UIEventKey, compName, parm, callback); info.AddListener(); m_DragEvents.Add(info); }
public void RemoveLongPressListener(string compName, InputEventHandle <InputUILongPressEvent> callback, string parm = null) { InputEventRegisterInfo <InputUILongPressEvent> info = GetLongPressRegisterInfo(compName, callback, parm); m_LongPressEvents.Remove(info); info.RemoveListener(); }
public void RemoveOnClickListener(string buttonName, InputEventHandle <InputUIOnClickEvent> callback, string parm = null) { InputEventRegisterInfo <InputUIOnClickEvent> info = GetClickRegisterInfo(buttonName, callback, parm); info.RemoveListener(); m_OnClickEvents.Remove(info); }
public virtual void InitEvent(string UIEventKey) { m_UIEventKey = UIEventKey; m_begionDrag = InputUIEventProxy.GetOnBeginDragListener(m_UIEventKey, name, name, OnBeginDragEvent); m_onDrag = InputUIEventProxy.GetOnDragListener(m_UIEventKey, name, name, OnDragEvent); m_endDrag = InputUIEventProxy.GetOnEndDragListener(m_UIEventKey, name, name, OnEndDragEvent); }
public void DisposeEvent() { inputUIOnMouseEventDown.RemoveListener(); inputUIOnMouseEventUp.RemoveListener(); inputUIOnMouseEventDown = null; inputUIOnMouseEventUp = null; }
public virtual void InitEvent(string UIEventKey) { m_UIEventKey = UIEventKey; m_begionDrag = InputUIEventProxy.GetOnBeginDragListener(m_UIEventKey, name, name, OnBeginDragEvent); m_onDrag = InputUIEventProxy.GetOnDragListener(m_UIEventKey, name, name, OnDragEvent); m_endDrag = InputUIEventProxy.GetOnEndDragListener(m_UIEventKey, name, name, OnEndDragEvent); inputUIOnMouseEventDown = InputUIEventProxy.GetOnMouseListener(m_UIEventKey, name, name, true, OnMouseDownEvent); inputUIOnMouseEventUp = InputUIEventProxy.GetOnMouseListener(m_UIEventKey, name, name, false, OnMouseUpEvent); }
public static InputEventRegisterInfo <InputUIOnScrollEvent> AddOnScrollListener(string UIName, string ComponentName, InputEventHandle <InputUIOnScrollEvent> callback) { InputEventRegisterInfo <InputUIOnScrollEvent> info = new InputEventRegisterInfo <InputUIOnScrollEvent>(); info.eventKey = InputUIOnScrollEvent.GetEventKey(UIName, ComponentName); info.callBack = callback; InputManager.AddListener <InputUIOnScrollEvent>( InputUIOnScrollEvent.GetEventKey(UIName, ComponentName), callback); return(info); }
public static InputEventRegisterInfo <InputUIOnEndDragEvent> AddOnEndDragListener(string UIName, string ComponentName, InputEventHandle <InputUIOnEndDragEvent> callback) { InputEventRegisterInfo <InputUIOnEndDragEvent> info = HeapObjectPool <InputEventRegisterInfo <InputUIOnEndDragEvent> > .GetObject(); info.eventKey = InputUIOnEndDragEvent.GetEventKey(UIName, ComponentName); info.callBack = callback; InputManager.AddListener <InputUIOnEndDragEvent>( InputUIOnEndDragEvent.GetEventKey(UIName, ComponentName), callback); return(info); }
internal static InputEventRegisterInfo <InputUIOnMouseEvent> GetOnMouseListener(string m_UIEventKey, string UIName, string ComponentName, bool isDown, InputEventHandle <InputUIOnMouseEvent> callback) { InputEventRegisterInfo <InputUIOnMouseEvent> info = HeapObjectPool <InputEventRegisterInfo <InputUIOnMouseEvent> > .GetObject(); info.eventKey = InputUIOnMouseEvent.GetEventKey(UIName, ComponentName, isDown); info.callBack = callback; InputManager.AddListener( InputUIOnMouseEvent.GetEventKey(UIName, ComponentName, isDown), callback); return(info); }
public InputEventRegisterInfo <InputUILongPressEvent> GetLongPressRegisterInfo(string compName, InputEventHandle <InputUILongPressEvent> callback, string parm) { string eventKey = InputUILongPressEvent.GetEventKey(UIName, compName, parm); for (int i = 0; i < m_LongPressEvents.Count; i++) { InputEventRegisterInfo <InputUILongPressEvent> info = (InputEventRegisterInfo <InputUILongPressEvent>)m_LongPressEvents[i]; if (info.eventKey == eventKey && info.callBack == callback) { return(info); } } throw new Exception("GetLongPressRegisterInfo Exception not find RegisterInfo by " + compName + " parm " + parm); }
public void AddOnClickListenerByCreate(Button button, string compName, InputEventHandle <InputUIOnClickEvent> callback, string parm = null) { InputEventRegisterInfo <InputUIOnClickEvent> info = InputUIEventProxy.AddOnClickListener(button, UIEventKey, compName, parm, callback); m_OnClickEvents.Add(info); }
public void AddOnClickListener(string buttonName, InputEventHandle <InputUIOnClickEvent> callback, string parm = null) { InputEventRegisterInfo <InputUIOnClickEvent> info = InputUIEventProxy.AddOnClickListener(GetButton(buttonName), UIEventKey, buttonName, parm, callback); m_OnClickEvents.Add(info); }
public virtual void InitEvent(string UIEventKey) { m_UIEventKey = UIEventKey; inputUIOnMouseEventDown = InputUIEventProxy.GetOnMouseListener(m_UIEventKey, name, name, true, OnMouseDownEvent); inputUIOnMouseEventUp = InputUIEventProxy.GetOnMouseListener(m_UIEventKey, name, name, false, OnMouseUpEvent); }
public virtual void Init(string UIEventKey) { m_UIEventKey = UIEventKey; m_register = InputUIEventProxy.AddOnScrollListener(m_UIEventKey, name, OnSetContentAnchoredPosition); }