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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...