I have a few questions after working with JavaFX a few days.
1) I noticed something a bit weird. I remake my scene graph every frame, because it's simpler than modifying an old one. So far it's fast enough, and I do it a couple of hundred times per second. But I noticed that mouse click events often disappear when I do that. Say I have a Label, and it listens to MOUSE_PRESSED events. Only about every 20th time I press it does it trigger the handler. Is it an issue with JavaFX, or can it be fixed in JME3-JFX, do you think?
2) How does drag-and-drop work? I think I heard someone say you had to do something special to get it to work.
3) I was thinking about how one could change isCovered to somehow allow mouse click through some JavaFX thing that is not invisible. Has anyone done this already? I can think of a few ways with varying degree of difficulty and robustness:
Method 1: Use some specific alpha, like 126/127, to mean that mouse clicks on that should not count, but it will look like a solid color anyway, probably. Can it go wrong if something behind a 126/127 alpha thing is more transparent? Does the final image end up with some other alpha then?
Method 2: Pass all events to JavaFX. In JavaFX, use an invisible Pane as a parent, behind your whole scene. For any event that is not consumed earlier, that Pane gets the event, and then you know that it went through, and then JME gets it. Will that round trip cause noticable delay?
Method 3: Keep track of the shapes that you are using for things that should block the mouse clicks, and in isCovered check if the mouse is in any of the shapes. Should work, but is kind of tedious to implement, unless there is a smart way to get all the shapes.