Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Kikutaâ„¢ on Thu 23/03/2006 19:57:07

Title: 2 TextBoxs in the same Gui.
Post by: Kikutaâ„¢ on Thu 23/03/2006 19:57:07
Hey.

I've created two text boxs, differents, in the same gui, implemented the their instructions. Everything went well except the fact that when I click in one TextBox and start writing, the same thing appears in both of them. I could, in fact, split them into 2 differents Gui, but I don't want. :P

So, does anyone here had a smilliar problem ?
Title: Re: 2 TextBoxs in the same Gui.
Post by: RickJ on Thu 23/03/2006 20:26:34
 ;) Yeah, that's how they work.  I brought this up a long time ago and it's in the tracker (http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=272).  Anyway, what I do is use a button control for the input field.  When the button is clicked I make the text box visible, resize, and position it over the button, copy the button text to the textbox text, and erase the button text.  The textbox event handler then copies the text from the textbox back to the button and makes the textbox invisible.   With this method you can have as many input fields as you want. 
Title: Re: 2 TextBoxs in the same Gui.
Post by: Ashen on Thu 23/03/2006 22:19:01
There's also this thread (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=25521.0) on the first page of Beginner's Tech, and another recent thread linked in it, that might be of use to you.