Jump to content
  • Advertisement
Sign in to follow this  
Kishmet

GLUI replace one menu with another

This topic is 3563 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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!