Ejemplo n.º 1
0
        /// <summary>
        /// allocates a TargetedTouchHandler with a delegate, a priority and whether or not it swallows touches or not
        /// </summary>
        public static CCTargetedTouchHandler handlerWithDelegate(ICCTargetedTouchDelegate pDelegate, int nPriority, bool bSwallow)
        {
            CCTargetedTouchHandler pHandler = new CCTargetedTouchHandler();

            pHandler.initWithDelegate(pDelegate, nPriority, bSwallow);
            return(pHandler);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Adds a targeted touch delegate to the dispatcher's list.
        /// See TargetedTouchDelegate description.
        /// IMPORTANT: The delegate will be retained.
        /// </summary>
        public void addTargetedDelegate(ICCTargetedTouchDelegate pDelegate, int nPriority, bool bSwallowsTouches)
        {
            CCTouchHandler pHandler = CCTargetedTouchHandler.handlerWithDelegate(pDelegate, nPriority, bSwallowsTouches);

            if (!m_bLocked)
            {
                forceAddHandler(pHandler, m_pTargetedHandlers);
            }
            else
            {
                m_pHandlersToAdd.Add(pHandler);
                m_bToAdd = true;
            }
        }