Added NewUI Support in iOS build

This commit is contained in:
Jake Traynham 2013-07-18 11:07:58 -05:00
parent b32d0977b6
commit 7a5794b314
2 changed files with 22 additions and 6 deletions

View file

@ -266,15 +266,31 @@ ViewController* sharedViewController;
float scaledX = (int)(x * dp_xscale) * scale;
float scaledY = (int)(y * dp_yscale) * scale;
TouchInput input;
input_state.pointer_x[pointerId] = scaledX;
input_state.pointer_y[pointerId] = scaledY;
if (code == 1) {
input_state.pointer_down[pointerId] = true;
} else if (code == 2) {
input_state.pointer_down[pointerId] = false;
}
input.x = scaledX;
input.y = scaledY;
switch (code) {
case 1 :
input_state.pointer_down[pointerId] = true;
input.flags = TOUCH_DOWN;
break;
case 2 :
input_state.pointer_down[pointerId] = false;
input.flags = TOUCH_UP;
break;
default :
input.flags = TOUCH_MOVE;
break;
}
input_state.mouse_valid = true;
input.id = pointerId;
NativeTouch(input);
}
- (NSDictionary*)touchDictBy:(UITouch*)touch

2
native

@ -1 +1 @@
Subproject commit cd8987b33bbe299af0383609db28fecd6546bffe
Subproject commit d5d969fc6a2332e7ac930aa397bd109f9e771d2c