Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   GUI Editable Text (https://forums.graalonline.com/forums/showthread.php?t=85674)

Struggler 05-22-2009 08:55 AM

GUI Editable Text
 
With the editable text in GUIs, how do I access what is typed in the blank to use in a clan name? Like for instance, you type in a blank the name of the account you are going to add, and press the button, it finds the player using the text blank? I tried using the EditableText.text thing to find it... Can someone explain hoW?

Gambet 05-22-2009 08:59 AM

Exactly like such, whatever.text is how you read it. Take a look at my buddy communication system and look at the GUI portion to see how to do it (the ToBuddy_SendButton.onAction() part).

Pelikano 05-22-2009 09:05 AM

You could use:

PHP Code:

new GuiTextEditCtrl("Test") {
  
profile GuiBlueTextEditProfile;
  
10;
  
10;
  
width 100;
  
height 20;
}

function 
Test.onAction() {
  
player.chat Test.gettext();
}

/* .onAction() gets called once the Enter key is pressed inside the GuiTextEditCtrl, .gettext() gets the Text inside it. */ 

Hope it helped, you may want to check the Wiki, it has a nice documentation about GUIs, wiki.graal.net

Gambet 05-22-2009 09:10 AM

Quote:

Originally Posted by Pelikano (Post 1493027)
You'd have to use:


Never used gettext() when reading player input with GUIs, but gettext() is definitely not the only way (as you make it sound like). An example of what I'm saying is the one that I pointed to in my post above.


Just commenting on the fact that it's not the only way, other than that, use it as you please. :)

Pelikano 05-22-2009 09:14 AM

Yeah, didn't want to make it sound like it's the only way, will edit, sorry :p


All times are GMT +2. The time now is 09:20 AM.

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