Page 1 of 1

input text without guienv->addEditBox()?

Posted: Sat Sep 23, 2006 9:24 pm
by cyanide
is there any way to input text without using the editbox class? whenever i add one, my program crashes, and it seems to only happen on this computer. so i'd like a way around, as it's rather hard to make a chat program without text...

Posted: Sat Sep 23, 2006 9:27 pm
by zeno60
You could capture what key they input, then show that key on a static text area, when they press enter, get the text from the static text...? :shock:

Posted: Sat Sep 23, 2006 9:28 pm
by hybrid
Use one of the chat box additions to Irrlicht. Or track down the bug to fix this situation. It's rather unlikely that you have a computer where it does not work, it's definitely in the code somewhere.

Posted: Sat Sep 23, 2006 9:33 pm
by cyanide
i think i'll use zeno's idea. thanks, zeno!
hybrid, i've got hello world to lock up just by adding the guienv->addEditBox(L"Hello world",rect<int>(10,10,260,22),true); beneath the somewhat similar statictext. i've got no idea why, but it does not work. and i'm not good at recompiling, so... i'll just use the eventreceiver.

Posted: Sat Sep 23, 2006 10:41 pm
by monkeycracks
If that is from the same code as the edit box in your other post, I already fixed the only problem there should be.

Then you just do this


IGUIEditBox* whatever = guienv->addEditBox(L"Hello world",rect<int>(10,10,260,22),true);

and then in your event receiver

if(whateverkeyorbutton)
{
whatever->getText();
}