Hello,
I was wondering if there was a way to pass an argument in the callback of an EventHandler?
on(name: string, callback, scope?) -> pc.EventHandler
For example:
Foobar.prototype.initialize = function(){
this.buttonOne.element.on('mouseup',this.MouseUp(1),this);
this.buttonTwo.element.on('mouseup',this.MouseUp(2),this);
};
Foobar.prototype.MouseUp = function(id){
console.log("Clicked: " + id.toString());
};