How to disable a RichTextLabel url

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Large_Lad

For my project I am using the [url] tag to define dialog options for the player.
I also have a separate custom bb code tag that hides text options not yet available.

Even when hidden said url can still be clicked. Disabling meta underline does not fix this problem instead it just makes the hidden url harder to find.

What can I do about this?

You are probably handling the click in the meta_pressed(meta) signal, right? Then you could simply not handle the click if the option is not yet available to the player.

MrEliptik | 2021-03-20 21:27

There’s a bug where sometimes URLs open the page when clicked without having to connect the signal to a function that calls OS.shell_open and sometimes they don’t. The former is the intended behavior. Maybe you can just remove the URL tag from options that are disabled?

exuin | 2021-03-21 00:52