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?

asked May 13 in Engine by Bush2Tree (50 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.

answered May 13 by PeterA (52 points)
selected May 14 by Bush2Tree

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.

answered May 13 by jgodfrey (5,496 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 How to use this Q&A? before posting your first questions.