/// <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) { var pHandler = new CCTargetedTouchHandler(); pHandler.InitWithDelegate(pDelegate, nPriority, bSwallow); return(pHandler); }
/// <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; } }
/// <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) { var pHandler = new CCTargetedTouchHandler(pDelegate, nPriority, bSwallow); return pHandler; }