bali33 Posted March 17, 2015 Share Posted March 17, 2015 Hi guys, I'm a Sprite that can be drag using the usual code : slot.inputEnabled = true;slot.input.enableDrag(false);It's works very as expected as long as my sprite is not dropped above another Sprite which have onInputOver/onInputOutcontent.events.onInputOver.add(this.onRevealElementOver,this);content.events.onInputOut.add(this.onRevealElementOut,this);When my "slot" is dropped above my "content" Sprite I can't drag it - and the onInputOver callback function of the "content" Sprite is called. As "slot" is above "content" I expected it to be draggable and prevent "content" onInputOver callback function to be called. Is that normal ? Thank you Link to comment Share on other sites More sharing options...
bali33 Posted March 17, 2015 Author Share Posted March 17, 2015 I just noticed that even if the "content" Sprite has no events (onInputOver/out) the problem persist. So it's not about events but there is something that prevent "slot" to be drag when above "content". Any idea ? Thank you [EDIT] Ok - it seems that the issue appear when "concent.inputEnabled = true" Link to comment Share on other sites More sharing options...
rich Posted March 17, 2015 Share Posted March 17, 2015 If both items have input enabled then the issue is the order in which they are being considered for input. You can override it by using input.priorityID. http://phaser.io/examples/v2/input/input-priority Link to comment Share on other sites More sharing options...
bali33 Posted March 17, 2015 Author Share Posted March 17, 2015 Thank you - I'm going to look at it right now ! Link to comment Share on other sites More sharing options...
in mono Posted April 9, 2015 Share Posted April 9, 2015 A semi-related question: can I have the onInputOver event of a sprite fire while I'm dragging another sprite on top of it? Edit: Only now I saw that upon initiating a drag, all other sprites have their input disabled (enableInput : false). I suppose this behaviour is intended, but is there an elegant way to override it? Link to comment Share on other sites More sharing options...
Recommended Posts