(I think) I’m trying to do something similar, trying to “consume” the MouseEvent.CLICK so that other components can’t use it. I tried e.cancel() but I couldn’t figure out if it was doing anything – is e.cancel() meant to be the “consume” type function that prevents other components from using it?
Or if I’m going about this all wrong, any clues on how to get a mouse click to affect only the top-most component layer, and nothing underneath?
EDIT: so to try to explain it better – I’m on Heaps / HashLink backend
I have two buttons, the small one is in front of a bigger one, and I want the mouse click to only affect the small one. The bigger button is not a parent of the small button, I’m using absolute positioning to overlap them.
But it seems like both buttons are in hover state at the same time, independently, so they probably each get their own separate mouse click events.
Right now I’m doing hacks to disable the bigger button if the small button is clicked, but (I think) I’m wondering if there’s a more elegant way to tell HaxeUI to only process the front-most click event for any interaction or something.
EDIT 2: ok I found a new workaround for this – I just added my small button “overlay” to the app / Screen.instance root, instead of some other component, similar to a dialog modal, and now mouse clicks don’t get shared anymore! sorry to bother everyone lol