Change button mouse state

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Brice
:warning: Old Version Published before Godot 3 was released.

Hello, if i remove a button from the scene tree when the mouse is on this button, it stays hovered, is there a way to change the mouse state of this button with code ?

I have tried with emit_signal("mouse_exit") and Mainloop::_input_event() but it doesn’t works.