mouseDown doesn't receive events when I have a CamUi connected.
Short of making a signal for it, what is the right way for these to play
nice with each other? Signal priority doesn't appear to change anything.
A signal may not be a bad route actually. However if you need to write
some more custom logic you'll have to capture mouseDowns yourself
and selectively pass them (and other events) to the CamUi, rather than
using the convenience of attaching it to a Window.
I tried creating a signal and it doesn't work if CameraUi is
also connected. Passing in mouse events manually is actually the best
solution for my case, as it results in expected behavior --
interacting with 3D bodies doesn't move the camera..
@adria The virtual function callbacks (virtual App::mouseDown())
aren't signals - they will be blocked if the MouseEvent is set as
handled by any connected signal before it is called (such as CameraUi).
What you can do is connect to a signal for your own mouse down handling
behavoir, and make sure to either set a priority on that, or on the
CameraUi. For reference, this is usually how I init the CameraUi:
Some what related question: It looks like CameraUi handles mouse events even if it's disabled. Does that make sense? It seemed a surprising to me. I was hoping I'd be able to toggle that rather than connecting and disconnecting.
I started looking at how the toggling of the connected state would work
and there's no way to query if CameraUi is connected or not. It
looks like the only way to determine the state is checking if mWindow
is set but that's a private variable. Am I missing anything?