Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   GuiTextEdit (https://forums.graalonline.com/forums/showthread.php?t=69972)

Andy0687 11-09-2006 09:40 PM

GuiTextEdit
 
This might be a simple question but i cant figure it out.

When im doing an onAction from a button, how can I get the value that a player has entered in the TextEdit section?

KuJi 11-09-2006 10:17 PM

Quote:

Originally Posted by Andy0687 (Post 1241240)
This might be a simple question but i cant figure it out.

When im doing an onAction from a button, how can I get the value that a player has entered in the TextEdit section?

If you make names like

TextEdit#-WINDOWID
Button#-WINDOWID

# being TextEdit0 | TextEdit1 etc

then you can cut the catchevent down ex:

PHP Code:

function onActionButton(temp.bname)
{
  
temp.windowid temp.bname.substring(temp.bname.pos("-") + 1);
  
temp.text makevar("TextEdit0-" temp.windowid).text;


I guess..

Andy0687 11-09-2006 10:29 PM

Quote:

Originally Posted by KuJi (Post 1241255)
temp.text = makevar("TextEdit0-" @ temp.windowid).text;

Ugh .text on the end lol, i knew it was going to be simple, thats all I really needed, thanks.

KuJi 11-09-2006 10:31 PM

Quote:

Originally Posted by Andy0687 (Post 1241261)
Ugh .text on the end lol, i knew it was going to be simple, thats all I really needed, thanks.

Haha.. just need the obj.text.

Thought you mean how to find using catchevent =p


All times are GMT +2. The time now is 03:16 PM.

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