Sorry if this has already been posted.
I am working on creating a 2D RPG at the moment and I have been racking my brain with this problem. When GUI elements are hidden, they still remain "hovered over" when they are next shown.
Essentially, there are certain elements in the GUI that become hidden when they are clicked on. For example the "next" button of the dialog box. I have a function which takes the mouse_entered() and mouse_exited() signals and changes the colour of the text. When the text is hidden it will remain in the mouse_entered() state and when it is shown again the colour will be in the hovered state and not the neutral state.
Am I missing something here? Am I being an idiot I cannot tell I have been trying to figure this out for a few weeks now and the only solution I've come to is that if I call .clear() on the labels and then add the text back in it seems to work. However, this is a really messy solution and it won't work for a lot of the elements that are children of things that do need to be hidden like colour rectangles.
Is there a more elegant solution that I am not seeing or do I need to reset the text every time and restructure my scenes?
Any help is appreciated!