Пример #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;

            InputMessageManager.AddListener(
                InputUIOnMouseEvent.GetEventKey(UIName, ComponentName, isDown), callback);

            return(info);
        }
Пример #2
0
        public static InputEventRegisterInfo <InputUIOnScrollEvent> GetOnScrollListener(string UIName, string ComponentName, InputEventHandle <InputUIOnScrollEvent> callback)
        {
            InputEventRegisterInfo <InputUIOnScrollEvent> info = HeapObjectPool <InputEventRegisterInfo <InputUIOnScrollEvent> > .GetObject();

            info.eventKey = InputUIOnScrollEvent.GetEventKey(UIName, ComponentName);
            info.callBack = callback;

            InputMessageManager.AddListener(
                InputUIOnScrollEvent.GetEventKey(UIName, ComponentName), callback);

            return(info);
        }