- fgDeactivateSubMenu( menuEntry );
- }
-
- fgSetWindow( current_window );
-}
-
-/*
- * Deactivates a menu pointed by the function argument.
- */
-void fgDeactivateSubMenu( SFG_MenuEntry *menuEntry )
-{
- SFG_Window *current_window = fgStructure.Window;
- SFG_MenuEntry *subMenuIter;
- /* Hide the present menu's window */
- fgSetWindow( menuEntry->SubMenu->Window );
- glutHideWindow( );
-
- /* Forget about having that menu active anymore, now: */
- menuEntry->SubMenu->Window->ActiveMenu = NULL;
- menuEntry->SubMenu->IsActive = GL_FALSE;
-
- /* Hide all submenu windows, and the root menu's window. */
- for ( subMenuIter = (SFG_MenuEntry *)menuEntry->SubMenu->Entries.First;
- subMenuIter;
- subMenuIter = (SFG_MenuEntry *)subMenuIter->Node.Next )
- {
- /* Is that an active submenu by any case? */
- if( subMenuIter->SubMenu )
- fgDeactivateSubMenu( subMenuIter );