Off the top of my head this is what I think: Multiple inheritance and a reference to the parent for in-game and menu (possibly done when you create the panel?) Some logic for determining when you are in-game and at the main-menu and updating the parent accordingly
There will most likely be some more steps necessary in there, but that's the first ideas that pop in-mind. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Oliver Gray Sent: Wednesday, August 16, 2006 5:57 PM To: [email protected] Subject: [hlcoders] 2 versions of same gui -- [ Picked text/plain from multipart/alternative ] Hi all, In our mod we want to have the same frame reachable from both the main menu (i.e. the menu you see when the game starts) and from inside the game when the game is running. I know it seems odd to do this, but it is necessary. In vgui_int.cpp, in order for a frame to show up in the main menu, we have to call (in VGui_CreateGlobalPanels): VPANEL GameUiDll = enginevgui->GetPanel( PANEL_GAMEUIDLL); CreateGui->Create(GameUiDll); In order for a frame to show up in the game, we have to call: VPANEL gameParent = enginevgui->GetPanel( PANEL_CLIENTDLL ); CreateGuiInGame->Create(gameParent); Currently CreateGuiInGame is the same code as CreateGui, just in a different class. QUESTION: Does anyone know of a slick way to have a frame able to show up in both the main menu and in the game using just one class? Thanks! -- _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

