0 votes

Hey all,

I have a HUD which displays some data as text. I want users to be able to click on the map beneath the label. However, the label hogs all of the inputs, even though it does not process any of them. Is there a way that I can let the inputs pass by the label?

in Engine by (172 points)

2 Answers

0 votes
Best answer

Probably not the best solution but will do if you don't find anything else

You can check with wether the mouse is hovering on the label with the signals mouseentered(), and mouseexited()

You can then if (click) and (hover), call the function from the map with input the mouse positions.

by (120 points)
selected by

I've done some more digging and I've found that the other poster is, in general, correct, but for some reason it's not working for the specific thing I need--so I have to use your solution ¯_(ツ)_/¯

+1 vote

I think you can just set the Mouse | Filter mode of the Label to ignore. This should cause it to ignore mouse events, but still allow other controls to receive them.

by (14,792 points)

I've done more digging and I've found that you are in general correct, but in my particular circumstances for some reason this doesn't work.

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.