This is the testing Godot forums! All forum posts unique to this forum will be deleted! Please use the main forums here for any posts you want to keep. All forum rules still apply.

RichTextLabel - clicks outside url tag

bethleembethleem Posts: 11Member

II have a RichTextLabel with the text "Hi. I´m a text and you must click [url]here[/url] but you may not." and I want to change this text in GDScript. So, if the player clicks in the url tag content, I catch it with meta_clicked signal and do stuff, all rigth.

But, if the player click in every other place inside de richtexlabel but outside the url tag, I need to catch that and do other stuff. If I use _input, it catches the clicks always, be in the url tag or not. Any way I can catch a "inverse meta_clicked" so to speak, a way to detect a click only if is not clicked in the url tag? I´m pretty new at "signal technology" and can´t figure it out.

Thx!

Comments

  • bethleembethleem Posts: 11Member

    Never mind. I just managed to code a dirty but efficient workaround that do the job. Signals rocks!

  • MegalomaniakMegalomaniak Posts: 2,580Admin

    @bethleem said:
    Never mind. I just managed to code a dirty but efficient workaround that do the job. Signals rocks!

    Cool! Considering that no-one was around able to offer a solution, might you be willing to share yours with the rest of us, too? :)

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.