Sign in to follow this  

GLUI replace one menu with another

This topic is 3342 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites

This topic is 3342 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this