Change the color of a text if the cursor is on/off it

Hello guys, I was wondering if someone could help me with that.
In my Menu game scene I have multiple texts, such as start, options, quit, etc.
They are all white. I’m trying to change the color of the text when the cursor is on it, and go back to the previous colour if the cursor is off of it.

Let’s take the start for exemple and suppose the original color is X:

In the menu events, I added a condition: the cursor/mouse is on “start” and added an action: change the color of “start” to Y. So far, so good. The color is changed.
But now, how can I go back to the previous colour (in this case, X) if the cursor/mouse leaves the text/object “start”?

I tried added another condition: the cursor/mouse is on “background” (which is another object that I created and covers all the screen but it’s behind the text object "start) and added an action: change the color of “start” to X, but then nothing happens (even the first condition/event don’t work anymore).

Can anyone help me with this one?
Thanks!

Add a condition with cursor/mouse touch inverted and do the color change.

Also check out the menu function example included with GD :smiley:

2 Likes

shame on me, only after i posted this i found the menu function exemple…
but thanks anyway Phenomena, it worked!
:slight_smile:

1 Like