Is clicked block: look farther before leaving

You know that there is < and >, but it doesnt account for layers, all things being touched by mouse regardless of being on top are all said to be clicked, i would also like a mouse down and visible block for selection

<is clicked :: sensing>
<is hovered :: sensing>

From what I can understand, you’re asking for a block that is able to detect if the user is clicking on a sprite, but only report true for the topmost sprite that the mouse is over.

This can already be done in snap.

This grabs all the sprites by asking the stage for them, which returns them all in layer order (first item is the back layer, and last is the top layer). Then it filters out the sprites that are not touching the mouse.

With that, you can then create two more blocks, <is hovered? :: sensing> and <is clicked? :: sensing>


There is a typo. The two blocks are <is hovered? :: sensing> and <is clicked? :: sensing>

Oh wow, this is really clever and nice, thank you, @ego-lay_atman-bay !