Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-02-2006, 10:35 PM
Andy0687 Andy0687 is offline
Enigma
Join Date: Feb 2002
Posts: 1,072
Andy0687 is on a distinguished road
GuiTextListCtrl

Hi im having a little bit of trouble understanding how to work getting the information out of the GuiTextListCtrl when I click one of the texts inside the list.

Ive got it working through the catchevent to the function but I cant figure out how to pull the text of what was actually selected out of that. The Wiki page for it also wasnt too helpful.

Any advice?
Reply With Quote
  #2  
Old 09-03-2006, 01:20 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
You mean something like this?
PHP Code:
function MyTextListControlName.onSelect(entryid,entrytext,entryindex) {
  echo(
"The player clicked on: " entrytext);

If you don't know the name of your control and use the catchevent function, then it will look like this:
PHP Code:
catchevent("MyTextListControlName","onSelect","MyEventCatchFunction");
...
function 
MyEventCatchFunction(controlobj,entryid,entrytext,entryindex) {
  echo(
"The player clicked on: " entrytext);

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 07:26 PM.


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