Home   Help Search Login Register  

Author Topic: Links within structured text  (Read 1250 times)

0 Members and 1 Guest are viewing this topic.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Links within structured text
« 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...
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline i0n0s

  • Former Staff
  • ****
Re: Links within structured text
« Reply #1 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.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Links within structured text
« Reply #2 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:
« Last Edit: 24 Mar 2009, 17:25:05 by Spooner »
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)