Jump to content

How to make a link in a text window active/clickable?


Recommended Posts

Hello!

How can I make these links (see example below) active? When clicking them, they should be opened in the default app of the respective OS.

image.thumb.png.b4389877f3790ebc0e03c705f6a2c610.png

 

Can a "gamepaths.txt" file that is opened by a function like this ...

function init(data)
{
    Engine.GetGUIObjectByName("mainText").caption = Engine.TranslateLines(Engine.ReadFile("gui/common/gamepaths.txt"));
}

... have an object with a link like this?

<object type="button" style="ModernButtonRed" size="100%-408 100%-52 100%-218 100%-24">
  <translatableAttribute id="caption">Modding Guide</translatableAttribute>
  <action on="Press">Engine.OpenURL("https://trac.wildfiregames.com/wiki/Modding_Guide");</action>
</object>

 

Edited by Ceres
Link to comment
Share on other sites

I do not see a security issue when offering a clickable link to the local OS, especially not, if the user does not run pyrogenesis as admin/su/root. And the pyrogenesis code has access to the local folders in question anyway. Regarding external links, I agree that there could be a security issue, but on the other hand, the game already provides access (after accepting certain terms and conditions) to mod.io.

PS: This is the reason for my question:

 

Edited by Ceres
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...