Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-24-2011, 04:48 AM
Alpho Alpho is offline
Registered User
Alpho's Avatar
Join Date: Dec 2011
Location: California, USA
Posts: 80
Alpho will become famous soon enough
Html -> GS2

Is there any way to have an image scripted with html, when clicked, jumps to a gs2 function that is somewhere else in a script?

Example:
PHP Code:
<a href=onTest>Click Here</a>

function 
onTest() {
  
player.chat "It works!";

Of course the above wouldn't work, but I think you guys get what I mean.
Reply With Quote
  #2  
Old 12-24-2011, 05:02 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Yes. Set htmllinks = false then use the onURL event, e.g.

PHP Code:
new GuiMLTextCtrl("Test") {
  
htmllinks false;
  
text "This is a <a href=\"foo\">link</a>!";

PHP Code:
function Test.onURL(temp.url) {
  echo(
"You clicked: " temp.url);

__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:04 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.