Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-22-2009, 09:05 AM
Pelikano Pelikano is offline
Registered User
Pelikano's Avatar
Join Date: Oct 2008
Posts: 1,133
Pelikano has a little shameless behaviour in the past
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
Reply With Quote
  #2  
Old 05-22-2009, 09:10 AM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by Pelikano View Post
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 09:24 PM.


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