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.

86 lines
2.5 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #include "cbase.h"
  8. #include "c_csrootpanel.h"
  9. #include <vgui_controls/Controls.h>
  10. #include <vgui/IVGui.h>
  11. #include "clientmode_csnormal.h"
  12. //-----------------------------------------------------------------------------
  13. // Purpose:
  14. // Input : *parent -
  15. //-----------------------------------------------------------------------------
  16. C_CSRootPanel::C_CSRootPanel( vgui::VPANEL parent )
  17. : BaseClass( NULL, "CounterStrike Root Panel" )
  18. {
  19. SetParent( parent );
  20. SetPaintEnabled( false );
  21. SetPaintBorderEnabled( false );
  22. SetPaintBackgroundEnabled( false );
  23. // This panel does post child painting
  24. SetPostChildPaintEnabled( true );
  25. int w, h;
  26. surface()->GetScreenSize( w, h );
  27. // Make it screen sized
  28. SetBounds( 0, 0, w, h );
  29. // Ask for OnTick messages
  30. vgui::ivgui()->AddTickSignal( GetVPanel() );
  31. }
  32. //-----------------------------------------------------------------------------
  33. // Purpose:
  34. //-----------------------------------------------------------------------------
  35. C_CSRootPanel::~C_CSRootPanel( void )
  36. {
  37. }
  38. //-----------------------------------------------------------------------------
  39. // Purpose:
  40. //-----------------------------------------------------------------------------
  41. void C_CSRootPanel::PostChildPaint()
  42. {
  43. BaseClass::PostChildPaint();
  44. // Draw all panel effects
  45. RenderPanelEffects();
  46. }
  47. //-----------------------------------------------------------------------------
  48. // Purpose: For each panel effect, check if it wants to draw and draw it on
  49. // this panel/surface if so
  50. //-----------------------------------------------------------------------------
  51. void C_CSRootPanel::RenderPanelEffects( void )
  52. {
  53. }
  54. //-----------------------------------------------------------------------------
  55. // Purpose:
  56. //-----------------------------------------------------------------------------
  57. void C_CSRootPanel::OnTick( void )
  58. {
  59. }
  60. //-----------------------------------------------------------------------------
  61. // Purpose: Reset effects on level load/shutdown
  62. //-----------------------------------------------------------------------------
  63. void C_CSRootPanel::LevelInit( void )
  64. {
  65. }
  66. //-----------------------------------------------------------------------------
  67. // Purpose:
  68. //-----------------------------------------------------------------------------
  69. void C_CSRootPanel::LevelShutdown( void )
  70. {
  71. }