I need to add a cross hairs sign like attached on the surface of the camera overlay in Titanium for both android and ios platform, and recognize the image only when i focuse the cross hairs sign on the image.
First thing is that is it possible with titanium sdk ?.
I have search a lot for this but not get success. Please help.
Thanks an advance
M
Markus Eder
said
almost 9 years ago
Hi there!
This is not directly possible, but you can simulate this behaviour by only displaying the target when the user clicks on it. This doesn't have to be done manually.
E.g. you can simulate a click on the screen with this small snippet:
World.clickScreenCenter = function clickScreenCenterFn() {
var centerX = (($(window).width()) / 2);
var centerY = (($(window).height()) / 2);
var event = {
changedTouches:
};
event.preventDefault = function() { / Intentionally Left Blank / };
if (AR && AR.js && AR.js.click && AR.js.click.executePlatformClick) {
Mahendra Yadav