GLUI replace one menu with another

Started by
-1 comments, last by Kishmet 15 years, 6 months ago
Hey all. Still having some issues with GLUI, but the problem is different this time =).

GLUI *firstUI = GLUI_Master.create_glui_subwindow(windowHandler, GLUI_SUBWINDOW_LEFT);
firstUI->add_separator(); // Just to add something.

GLUI *secondUI = GLUI_Master.create_glui_subwindow(windowHandler, GLUI_SUBWINDOW_LEFT);

If I use the code above to create a simple UI for my program, the to panels will appear next to each other on the left side of the main window - awesome, no problem. But I dont really want the two panels next to each other - I was hoping to make the secondUI replace the first one (same position). So for testing:

GLUI *firstUI = GLUI_Master.create_glui_subwindow(windowHandler, GLUI_SUBWINDOW_LEFT);
firstUI->add_separator(); // Just to add something.

firstUI->hide(); // NEEDS to be called before the close command can be used.
firstUI->disable(); // Might be needed... not sure.
firstUI->close();

GLUI *secondUI = GLUI_Master.create_glui_subwindow(windowHandler, GLUI_SUBWINDOW_LEFT);

But this just removes the firstUI, and still places the secondUI some distance from the left border of the main window, as if the firstUI is still there. Annoying. Is there anyway, around this problem? So one menu can be replaced by another? The code above is just for example - I dont really care how the menu is replaced, as long as it stays on the same position as the old menu. Havn't been able to find that much information about how to use GLUI, other than the manual, and some very basic tutorials, which never really get to the point at which I'm stuck, so I hope someone here can lend a hand =) /kish

This topic is closed to new replies.

Advertisement