I found a way to do what i wanted, but it's not very pretty...
Just added this method in CCTouchDispatcher.m
-(void) putTargetedDelegateOnTop:(id)delegate
{
if( delegate == nil )
[NSException raise:NSInvalidArgumentException format:@"Got nil touch delegate"];
CCTouchHandler *handler = nil;
for( handler in targetedHandlers )
if( handler.delegate == delegate ) break;
if( handler != nil )
{
[handler retain];
[targetedHandlers removeObject:handler];
[targetedHandlers insertObject:handler atIndex:0];
[handler release];
}
}
It "bring to front" the object "delegate", by removing it and then add it as the first element in the array. So object is the "first" to receive touches.
I had a bug if i tried to insert with the priority... Don't know exactly why :(...
If someone has a better piece of code (or can improve mine), feel free to share :).