Jump to content

making objects rendered later transparent for interactions


coolblue
 Share

Recommended Posts

It looks like the last object rendered (regardless of it's size) is the only thing that will respond to mouse events regardless of it's interactive setting.

 

For example, if I have a layer (container) of sprites and I want them to respond to mouse events, but, I want them to render below an unfilled rectangle, then, even if I set the interactivity member of the rectangle to false, I still can't trigger mouse events on the sprites.

 

Is that the case? 

Link to comment
Share on other sites

Ok, no worries. Yes, I'm aware that you are looking to re-write it, I was just checking here that I wasn't missing something before I raised an issue, in the hope that that would be helpful to you. Easy enough to work around it or patch around it for now and it's still brilliant to use.

I don't know if your considering it, but it would be very simple to make a clean fix for this issue if you had a dispatcher in your core. You could have an onrender event and pass the display object that was rendered, as an argument to the subscribers. The interaction manager could then cherry pick and maintain whatever state it needed for resolving event sources and the renderer could forget about it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...