OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Spooner on 21 Mar 2009, 15:53:44

Title: Links within structured text
Post by: Spooner on 21 Mar 2009, 15:53:44
Structured text seems to be able to show all sorts of information that you can get in HTML, but one thing I've been unable to do is put in a link. I particularly need this for my dynamic notepad for SPON Map, but I'm sure I can find other uses for it. Ideally I'd like to run code from the link, but just being able to link to map markers would be a boon. And yes, I've tried the same HTML as used in the briefing to no avail.

So far, I can place text, images, newlines, change colour and size of text/images, etc. either using HTML (parseText) or through special text commands (lineBreak, image). I suspect there might be a way to display links/active-text in some way, probably via HTML method, but I've not had any luck...
Title: Re: Links within structured text
Post by: i0n0s on 21 Mar 2009, 16:36:20
Since onHTMLLink exist, you should be able to add them via <a> like in briefing.
Take a look at the "jukebox" *erm*, the addon which controls winamp via ArmAlib. It can display links.
Title: Re: Links within structured text
Post by: Spooner on 23 Mar 2009, 12:34:12
Aaaaah! Thanks, I'll look at that!

EDIT:
Ack, no effect from that! At a guess, onHTMLLink is for HTML controls, not for structured text controls. The issue, however, is not the handler, but that in a structured text control,
Code: [Select]
Go and eat a nice <a href="fish">frog</a>, my good son.
doesn't even show the link (the word 'frog' isn't shown in the sentence). I can't use a HTML control, since they must be loaded from disk (via loadHTML) and thus would not be truly dynamic.

Gutted... :dunno: