Open Ali-RS opened 7 years ago
Yeah, I've often thought about this. Now that there is a standard way to do pop-ups then it's much easier. Still, there are many different kinds of requirements for tooltips in a 3D game and coming up with a nice system that handles them all is tough.
For custom solutions, it's not too hard to cobble one together yourself, though. For example, create a tooltip command listener with a static reference to an app state... then make sure your style (or code) registers that listener with the appropriate GUI elements. So on highlight and unhighlight, the listener would contact that central app state that could decide if the tooltip needed to be popped up and/or switched. To find the tooltip text the app state could use a variety of strategies that might be up to the application... whether pulling from a UserData key or loading an Entity and doing some special processing with a strategy object.
It's not straight forward to add all of that to a framework in a way that works for everyone and I haven't yet thought of a nicely composable solution where apps can include/or-not the parts they need.
It is a good request, though.
I start to wonder if things like this might be better in some kind of "tips and tricks" section with code snippets. The ideal situation would be something users can easily contribute to.
From experience using tooltips in Swing, things get out of hand very quickly when one wants something more than just pop-up text. However maybe as a built in feature, that default support would be enough.
Hi
Thought it would be nice to have this feature in Lemur core. So we can easily add highlight (mouse over) message to GUI components. Like this example :