--
[ Picked text/plain from multipart/alternative ]
Well, there may be a better way to do it, but you can use the IEngineVgui
and IPanel interfaces to do this. First get a VPANEL handle for the game ui
panel. Note that the game UI is created in a different dll so you have to
use VPANEL handles and the IPanel interface to work with that panel
vgui::VPANEL gameui = enginevgui->GetPanel( PANEL_GAMEUIDLL );
By poking around you can find out that CServerBrowserDialog is the name of
the panel you want and that it is a child of the gameui panel, so, you can
use
vgui::ipanel()->GetName( VPANEL )
vgui::ipanel()->GetChild( VPANEL, int )
vgui::ipanel()->GetChildCount( VPANEL )
to find the panel you want by looking recursively under the gameui for it or
navigating to it starting at gameui. Once you have the VPANEL handle of the
server browser dialog you can show it using
vgui::ipanel()->SetVisible( VPANEL )
Alternatively you could try finding "GameMenu" under gameui and using
vgui::ipanel()->SendMessage (I think) send it a Command of OpenServerBrowser
Regards,
Paul
On 10/20/06, Oliver <[EMAIL PROTECTED]> wrote:
>
> --
> [ Picked text/plain from multipart/alternative ]
> It is possible to add the "Options" and "Find Servers" buttons to your
> main
> menu by adding the following to your GameMenu.res file:
>
> "[number]"
> {
> "label" "#GameUI_GameMenu_Options"
> "command" "OpenOptionsDialog"
> }
>
> "[number]"
> {
> "label" "Find Servers"
> "command" "OpenServerBrowser"
> }
>
> I am looking for a way to create a buttons in my own panel that, when
> clicked, launches these menus. Is there a con_command that I'm
> missing? Or
> some other way to control their visibility?
>
> 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