Exemple #1
0
    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);
    }
Exemple #2
0
    public static void DispatchMouseEvent(string UIName, string ComponentName, bool isDown, string parm)
    {
        //只有允许输入时才派发事件
        if (IsActive)
        {
            InputUIOnMouseEvent e = GetUIEvent <InputUIOnMouseEvent>(UIName, ComponentName, parm);
            e.m_isDown = isDown;
            e.m_type   = isDown? InputUIEventType.PressDown:InputUIEventType.PressUp;

            InputManager.Dispatch("InputUIOnMouseEvent", e);
        }
    }
 public virtual void OnMouseUpEvent(InputUIOnMouseEvent inputEvent)
 {
 }