everybody!
I'm creating a small game
I have a popup that is shown when the cursor is over an element
Here is the method of creating a sprite:
createSprite: function(x, y, elementName) {
var obj = game.add.sprite(x, y, elementName);
//smth
obj.events.onInputOver.add(this.activeSlot, this);
//smth
return obj;
}
here is the Method that is called when the cursor is over a sprite:
activeSlot: function(overElement) {
//smth
this.showPopupItem(overElement);
}
And here is showPopupItem method:
showPopupItem: function(overedElement) {
//here I'm creating sprites and images that are shown
}
The popup is destroyed when the cursor is not over an element
Everything works fine, BUT here is one problem:
When I am hovering a sprite and then change the screen via four fingers on MAC OS, then I move mouse and so on, and then again the screen of the game is opened the popup doesn't hide at all
I wonder, what can I do with that
Thank you in advance for your answer) Good luck!