Hi all!
I’m creating a UI which has different buttons, and each of them contains a text as a child. The idea is that whenever the player hovers over a button, the colour of the text will change.
In order to achieve this, I’m using a function that looks like this:
It works as explained above, however there’s something I’m not happy with. I don’t want to create a unique function for every button that I have, I would like to create one that works for all of them. Any ideas on how to do so following the same logic? In my head it would be easy if I could somehow query the engine: tell me which element am I hovering over, and use that to drive the branches that I have in place and the colour and opacity. However I don’t know how to do so, and therefore I’m creating at the moment one function per button.
Thanks for your time, here’s hoping there’s an easy solution!
