Add Gesture Propagation
This is used when the parent actor wants to listen to gesture events.
example)
The child is overlapped on the parent.
So, if you tap a child, the parent cannot listen to the tap event.
Now, If set to SetNeedGesturePropagation(true), the parent can receive gesture events.
{
Actor parent = Actor::New();
Actor child = Actor::New();
parent.Add(child);
pTapDetector = TapGestureDetector::New();
cTapDetector = TapGestureDetector::New();
pTapDetector.Attach(parent);
cTapDetector.Attach(child);
pTapDetector.DetectedSignal().Connect(this, &OnParentTap);
cTapDetector.DetectedSignal().Connect(this, &OnChildTap);
}
void OnChildTap(Dali::Actor actor, const Dali::TapGesture& tap)
{
// If you set SetNeedGesturePropagation to true here, the parent actor can also listen to events
Dali::DevelActor::SetNeedGesturePropagation(Self(), true);
}
Change-Id: I0e6c16c2b2dec1dfa873caa453302cc746c3f258