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 07-26-2012, 10:54 PM
Astram Astram is offline
Era iPhone PR
Astram's Avatar
Join Date: Aug 2010
Posts: 324
Astram can only hope to improve
Send a message via AIM to Astram
GUI Openning + Textlist Help

Hey, I have a question. You may have known me before, but I left for around 1 year. Now I am back and I am deciding to script again, however forgetting some things. However, on a GUI I'm working on, when I say /test the first time, the GUI opens. However, after I "X" out, the second time I try, it doesn't open. I am calling the GUINAME.open(); event too, because I think that is how you do it, if I remember correctly but I just can't remember 100%.

In this GUI I also have a text list. However, I don't know how to get the selected row from the TextList and use it on text. For example, I don't know how to take Archer from a selected text list, and show up in the same GUI as "You selected: Archer". I think this is because it won't update it I believe until you re-open it. But then the selected text will be gone, so please give me help on these 2 things!

Thanks!
__________________
-Toad
The worlds biggest Toad fan...
Era iPhone FTW!


Reply With Quote
  #2  
Old 07-26-2012, 11:17 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
It's show() not open, and you can use an event to get what you selected.

All GUI objects have these functions on this page: http://wiki.graal.net/index.php/Crea...ent/GuiControl

PHP Code:
//#CLIENTSIDE

// < Your GUI Stuff Here >

function YourGUITextListName.onDblClick(entryid,entrytext,entryindex) {
  echo(
"You selected: " entrytext);

See here for other events GuiTextListCtrl has: http://wiki.graal.net/index.php/Crea...uiTextListCtrl
__________________
Quote:
Reply With Quote
  #3  
Old 07-27-2012, 03:03 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
Quote:
Originally Posted by fowlplay4 View Post
It's show() not open, and you can use an event to get what you selected.

All GUI objects have these functions on this page: http://wiki.graal.net/index.php/Crea...ent/GuiControl
To expand on this, the reason it's not working is because when the window is closed, visible becomes false. When you show the window the next time by using new GuiWindowCtrl, it reuses the same window object. Since visible is still false, it doesn't show.

Normally I just set visible = true when creating a new window.
__________________
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 04:33 AM.


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