mouse_enter signal is not triggered

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Zylann
:warning: 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 :frowning:

:bust_in_silhouette: Reply From: volzhs

Uncheck Focus > Ignore Mouse On

That simple… thank you :'D

Zylann | 2016-04-18 18:05