input text without guienv->addEditBox()?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
cyanide
Posts: 13
Joined: Sat Sep 03, 2005 9:39 pm

input text without guienv->addEditBox()?

Post 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...
zeno60
Posts: 342
Joined: Sun May 21, 2006 2:48 am
Location: NC, USA
Contact:

Post 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:
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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.
cyanide
Posts: 13
Joined: Sat Sep 03, 2005 9:39 pm

Post 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.
monkeycracks
Posts: 1029
Joined: Thu Apr 06, 2006 12:45 am
Location: Tennesee, USA
Contact:

Post 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();
}
Post Reply