Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Zylann | |
Old Version | Published before Godot 3 was released. |
I’m trying to make a custom Patch9Frames button because TextureFrame is too limited, but I can’t get the mouse_enter and mouse_leave 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 NOTIFICATION_MOUSE_ENTER in _notification(), like the doc says for custom controls, but actually my control never receives the notification… that’s weird