mirror of https://github.com/axmolengine/axmol.git
Pass on index/ID/PID of the touch from UITouch to CCTouch and the users touch handlers. Needed for multi touch apps that need to tell which touch/finger was let go. As discussed here by GavT: http://www.cocos2d-x.org/boards/6/topics/4043?r=5751#message-5751
Files Modified: Eagleview.mm, CCTouch.h
This commit is contained in:
parent
d97e1b705f
commit
190891bab7
|
@ -413,7 +413,7 @@ static cocos2d::CCTouch *s_pTouches[MAX_TOUCHES];
|
|||
pTouch = s_pTouches[unUsedIndex] = new cocos2d::CCTouch();
|
||||
float x = [touch locationInView: [touch view]].x;
|
||||
float y = [touch locationInView: [touch view]].y;
|
||||
pTouch->SetTouchInfo(0, x, y);
|
||||
pTouch->SetTouchInfo(0, x, y, unUsedIndex);
|
||||
|
||||
CFDictionaryAddValue(touchesIntergerDict, touch, [NSNumber numberWithInt:unUsedIndex]);
|
||||
|
||||
|
@ -446,7 +446,7 @@ static cocos2d::CCTouch *s_pTouches[MAX_TOUCHES];
|
|||
|
||||
float x = [touch locationInView: [touch view]].x;
|
||||
float y = [touch locationInView: [touch view]].y;
|
||||
pTouch->SetTouchInfo(0, x, y);
|
||||
pTouch->SetTouchInfo(0, x, y, pTouch->id());
|
||||
|
||||
set.addObject(pTouch);
|
||||
}
|
||||
|
@ -472,7 +472,7 @@ static cocos2d::CCTouch *s_pTouches[MAX_TOUCHES];
|
|||
|
||||
float x = [touch locationInView: [touch view]].x;
|
||||
float y = [touch locationInView: [touch view]].y;
|
||||
pTouch->SetTouchInfo(0, x, y);
|
||||
pTouch->SetTouchInfo(0, x, y, pTouch->id());
|
||||
|
||||
set.addObject(pTouch);
|
||||
CFDictionaryRemoveValue(touchesIntergerDict, touch);
|
||||
|
@ -502,7 +502,7 @@ static cocos2d::CCTouch *s_pTouches[MAX_TOUCHES];
|
|||
|
||||
float x = [touch locationInView: [touch view]].x;
|
||||
float y = [touch locationInView: [touch view]].y;
|
||||
pTouch->SetTouchInfo(0, x, y);
|
||||
pTouch->SetTouchInfo(0, x, y, pTouch->id());
|
||||
|
||||
set.addObject(pTouch);
|
||||
CFDictionaryRemoveValue(touchesIntergerDict, touch);
|
||||
|
|
Loading…
Reference in New Issue