I'm trying to make a custom Patch9Frames button because TextureFrame is too limited, but I can't get the mouseenter and mouseleave signals. How can I do it with a Control?
This is the code I have:
extends Control
func _ready():
set_process_input(true)
connect("mouse_enter", self, "_mouse_enter")
connect("mouse_exit", self, "_mouse_exit")
func _mouse_enter():
print("Enter")
func _mouse_exit():
print("Exit")
I tested it on a Button and it works, but on a Patch9Frames or Control it doesn't...
I also tried to listen to NOTIFICATIONMOUSEENTER in _notification(), like the doc says for custom controls, but actually my control never receives the notification... that's weird :(