+3 votes

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():
    connect("mouse_enter", self, "_mouse_enter")
    connect("mouse_exit", self, "_mouse_exit")

func _mouse_enter():

func _mouse_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 :(

in Engine by (29,120 points)
edited by

1 Answer

+3 votes
Best answer

Uncheck Focus > Ignore Mouse On

by (9,796 points)
selected by

That simple... thank you :'D

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.