I’m racking my brain over this issue.
I have a strategy board game where I have set up a tooltip system that displays info based on the element that the cursor hovers over. This could be the terrain, a unit, or whatever in the 3D scene. It works like a charm.
I’d like to disable the tooltips when a nifty gui element is under the cursor.
I use a fairly ancient version of Nifty GUI (1.4.0 snapshot), though i guess the whole thing is kinda antiquated by now anyway. Updating nifty is out of the question at this point.
I’ve tried everything I could think of:
- Added an invisible panel at the very bottom with 100% screen coverage that enables the tooltips on hover and hides it when hovering ends. Unfortunately, the effect would not be ended by ANYTHING above it. I’ve tried the “visibleToMouse” option on the other layers and ALL elements and styles, not even elements that start their own hover effects would consume the hover of the bottom panel.
I used the effect with “nop” and onStartEffect & onEndEffect. It turns on and off properly based on the panel’s bounds, but like I said, nothing else affects it.
Tried searching for any API functionality on nifty for getting the topmost hovered element, or a list of hovered elements, ANYTHING. I found nothing.
Tried raycasting on the gui node. It became apparent that nifty doesn’t use the jme scenegraph system for its elements, so I am at a loss.
Any help would be very very very much appreciated, thanks!