Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | dezekeerjoran | |
Old Version | Published before Godot 3 was released. |
how can you make a event happen when a label is a certain word?
Can you give more details?
If you are really talking about Label, then… you could do:
if label.get_text() == "Word":
do_stuff()`
But that’s not an event, a Label is not interactive, hence my question
Zylann | 2016-12-21 01:29
thanks, it works. But i don’t really what you mean with ‘not interactive’ and not an event.
still thank you.
dezekeerjoran | 2016-12-21 11:01
It’s not interactive because a Label only shows text, it doesn’t require user input. It’s also not an event because nothing else causes the label to change, it’s just you (programmer) that sets its value. Something the user is doing will trigger an event (text entered, mouse moved, key pressed), and for example LineEdit does that. But Labels are static, they don’t handle such a thing.
Zylann | 2016-12-21 13:36
ho, oke thanks:)
dezekeerjoran | 2016-12-21 13:54