Probs with modalWindows

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
Phoenix
Posts: 3
Joined: Fri Nov 21, 2003 5:23 pm

Probs with modalWindows

Post by Phoenix »

I need a modalWindow with some GUIthings. My Code see at moment like this:

gui::IGUIWindow* mod1 = guienv->addWindow(core::rect<int>(200,20,500,515),true,0);

// add list box

gui::IGUIListBox* box0 = mod1->Environment->addListBox(core::rect<int>(leftX,23,485,90), 0, 1);
box0->addItem(L"Irrlicht Software Engine [too slow]");
box0->addItem(L"Direct3D 8.1");
box0->addItem(L"OpenGL 1.2");
box0->setSelected(selecteddriver);

But there is only a Big Error because mod1->Environment is protected.

Please Help

CU Phoenix
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Why don't you use

guienv->addListBox(mod1...

instead of

mod1->Environment->addListBox(...

?
Phoenix
Posts: 3
Joined: Fri Nov 21, 2003 5:23 pm

Because !

Post by Phoenix »

The ListBox is an Element is depend of ModalWindow.
For Example the Coords are relativ of 0,0 of ModalWindow.
With
gui::IGUIListBox* box0 = guienv->addListBox(mod1...
The ListBox appears depend of MainWindow.

I hope, you understand what my prob is.

CU Phoenix
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Re: Because !

Post by niko »

Phoenix wrote: I hope, you understand what my prob is.
No, not really, sorry ;) I think I'll have to go and have some sleep...
Post Reply