View Single Post
08/23/14, 06:06 AM   #1
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
ZO_LinkHandler_CreateURLLink blocked?

Hello all,

I wanted to implement HTTP link clickable in pChat (you know, paste a youtube link, click on it and yeah, it opens your browser !), but I block on a ZO function wich seems to be buggy (or maybe i didn't understood how it works).

First, i wanted to use the same system as we can see at login screen (at the bottom of the page or when you clic help, etc). but I know, pregame funcs are not accessible .. BUT ..

there's a subfunction of ZO_LinkHandler_CreateLink() called ZO_LinkHandler_CreateURLLink(stringtodisplay, url)) wich should work.

it can be use with :

Lua Code:
  1. ZO_LinkHandler_CreateLink(stringtodisplay, nil, URL_LINK_TYPE, url)
or
Lua Code:
  1. ZO_LinkHandler_CreateURLLink(url, stringtodisplay)

There's also some constants used for dialog implemented ingame, like SI_CONFIRM_OPEN_URL_TITLE or SI_CONFIRM_OPEN_URL_TEXT

But either with or or other func, i got a

Assertion failed: TooltipControl: Attempt to set invalid or malformed link.
when I clic on the link. (it should send a call to ZO_Dialogs_ShowDialog i suppose, and the problem here, there are not a single reference to *URL* in dialogs for ingame.

URL_LINK_TYPE is also defined in zo_linkhandler.lua and all those funcs can be found trough zgoo..

I'm not a lua guru, but maybe i'm doing wrong ? or are those funcs really "not well implemented" ?

PS: I also tried to cheat and make handler by myself, I can recreate the window dialog, but ConfirmOpenURL() also seems do do not exists for ingame :/

thanks for expertise !
  Reply With Quote