Re: [hlcoders] 2 versions of same gui

2006-08-16 Thread Oliver Gray
--
[ Picked text/plain from multipart/alternative ]
PANEL_ROOT did the trick, thanks!

On 8/16/06, Robbie Groenewoudt <[EMAIL PROTECTED]> wrote:
>
> --
> [ Picked text/plain from multipart/alternative ]
> PANEL_ROOT
>
> On 8/17/06, Oliver Gray <[EMAIL PROTECTED]> wrote:
> >
> > --
> > [ 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
>
>
--

___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] 2 versions of same gui

2006-08-16 Thread Robbie Groenewoudt
--
[ Picked text/plain from multipart/alternative ]
PANEL_ROOT

On 8/17/06, Oliver Gray <[EMAIL PROTECTED]> wrote:
>
> --
> [ 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



RE: [hlcoders] 2 versions of same gui

2006-08-16 Thread Ben Everett
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: hlcoders@list.valvesoftware.com
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