Additionally, If I remove the panel tag, the button registers events correctly, but it only shows the first control or element placed within the control definition tag, so in this example only the text shows and the image doesn’t appear at all.
My guess would be that the panel is grabbing the mouse event since you set visibleToMouse true on it. Especially since removing it fixes the problem. Once a nifty component accepts the event it doesn’t propagate to its children.
Then my only other guess is that adding that panel is doing something funky and the controller for the image changes. You could attach the nifty source and step through it to see whats going on. I usually look through the source pretty heavily when nifty doesn’t do what I think it should be.
It seems like it had something to do with the image tag or how I’m using it, although I can’t quite figure out what. I ran into the problem again trying to register a NiftyMouseMovedEvent with a panel that contained an image (not using a control definition) and it was only registering the event along the edges of the panel (as if the image was blocking the panel).
I just got rid of the image tag and it’s working perfectly, from now on I’m going just use the backgroundImage attribute on panels instead.