Click/Touch outside of node

I'm trying to find a way to trigger an event when a user clicks/touches anything except for a specific node. Do any input/pointer objects return a property defining the node that was clicked/touched?
Has invited:

lijh

Favor from:

You can create a mask node for capturing event, just refer to the implement of Dropdown node.
 
https://github.com/qiciengine/ ... wn.js
 

justinboyd5

Favor from:

Phaser has the following method pointerOver():
 
http://phaser.io/examples/v2/input/pointer-over
 
I'm having trouble locating it in the QICI Engine Behaviour Objects.
 
Using this I won't need a mask node, I can add a condition to the update method checking if the pointer is over my node.

lijh

Favor from:

In QICI, you can use the OnEnter/OnExit signal of qc.Node instead.
 
See: http://docs-cdn.qiciengine.com ... .html

lijh

Favor from:

If you don't want to use OnEnter/OnExit, you can try 'checkHit' method of qc.Node.
 
Like this:
Demo.prototype.update = function() {
var cursorPos = this.game.input.cursorPosition;
var localPos = this.sprite.toLocal(cursorPos);
console.log(this.sprite.checkHit(cursorPos.x, cursorPos.y));
}

justinboyd5

Favor from:

Thanks! Unfortunately I wasn't able to get your example to work. I think I'm going to need to revisit this later. I really appreciate your input and replies. Thank you again!

To reply to a question, please Login or registered