Topic was automatically imported from the old Question2Answer platform.
Asked By
Serneum
I currently have a project that has a RichTextLabel that displays text. Some of the text we display has BBCode for URLs ([url=someUrl]Text[/url]) and then we have a script on the node containing the label:
The label has a connection to that method and it works wonderfully when we run the project directly from the Godot editor or from a runnable .dmg file on our Macs. I exported the project to HTML5, uploaded it to a server, and noticed that the links do not work. I’m assuming the issue is the reliance on OS, but would like to have this work in both cases. Is there another class I can use and a method I can call to check how the project is running to see if I should use OS or the other class at runtime?
Basically, if it’s HTML let the browser handle the call (by doing nothing). If it’s not HTML, hook up the meta_click signal manually in the _ready function for any OS and make the OS call the url using the shell_open function.
This might be a year after you asked, but I was looking for the same thing and your question gave me the idea of using the meta_click function to solve my issue of running on the OS (so opposite of the issue you had).