Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.3 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #include "cbase.h"
  8. #include "vgui_int.h"
  9. #include "ienginevgui.h"
  10. #include "c_csrootpanel.h"
  11. // memdbgon must be the last include file in a .cpp file!!!
  12. #include "tier0/memdbgon.h"
  13. C_CSRootPanel *g_pCSRootPanel = NULL;
  14. //-----------------------------------------------------------------------------
  15. // Purpose:
  16. //-----------------------------------------------------------------------------
  17. void VGUI_CreateClientDLLRootPanel( void )
  18. {
  19. g_pCSRootPanel = new C_CSRootPanel( enginevgui->GetPanel( PANEL_CLIENTDLL ) );
  20. }
  21. //-----------------------------------------------------------------------------
  22. // Purpose:
  23. //-----------------------------------------------------------------------------
  24. void VGUI_DestroyClientDLLRootPanel( void )
  25. {
  26. delete g_pCSRootPanel;
  27. g_pCSRootPanel = NULL;
  28. }
  29. //-----------------------------------------------------------------------------
  30. // Purpose: Game specific root panel
  31. // Output : vgui::Panel
  32. //-----------------------------------------------------------------------------
  33. vgui::VPANEL VGui_GetClientDLLRootPanel( void )
  34. {
  35. return g_pCSRootPanel->GetVPanel();
  36. }