I have recently gone through a book and it uses sneakyness / SneakyInput classes whose github repository is at : https://github.com/sneakyness/SneakyInput . The Project is in Objective-c but I want it for use in cocos2d-x . Is there any such library I can use with cocos2d-x or I need to modify it by myself.
There are several strange ports now (https://github.com/cpinan/SneakyInput-Cocos2dx-2.0.x - for example), but unfortunatelly all of them is totally unusable. I’ve started my own porting job, but I’m worried about a couple of moments. One of them:
- (void)informTargets {
for (NSDictionary * targetData in _targets) {
id target = [targetData objectForKey:@"target"];
SEL action = NSSelectorFromString([targetData objectForKey:@"action"]);
[target performSelector:action];
}
}
Does anybody know a solution to convert such specific Obj-C code to C++? Is there is any build-in analogs in cocos2d-x? Any ideas are welcome