Page 1 of 1

Add an event for hovering over buttons

Posted: Sat Mar 23, 2019 5:17 pm
by Therenas
As a prelude, this is not a super necessary feature that needs to be implemented at all costs, but it could make for some nice UI experiences.
I would like to know, as a modder, when a user hovers over a gui element. Doing this for all elements might be a bit silly/performance heavy, but I feel like adding it for buttons is reasonable, especially since you can now set hovered sprites and such. I imagine it being done by adding two events, one for when the hover starts and one for when it ends.

Now one use case for this could be the following: You are presenting several options to the user, each of which will have different effects on different values. It would be really nice to have the values (which are also on screen) change on hover, so the effects can be visualised immediately, without having to actually change the value. See this as an example:

Image

This could enable other things as well, of course. Again, this is not really important, but if the goal is to make nicer GUI's, I feel like this would be a step in the right direction.