summaryrefslogtreecommitdiff
path: root/game/client/cstrike/c_csrootpanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'game/client/cstrike/c_csrootpanel.cpp')
-rw-r--r--game/client/cstrike/c_csrootpanel.cpp86
1 files changed, 86 insertions, 0 deletions
diff --git a/game/client/cstrike/c_csrootpanel.cpp b/game/client/cstrike/c_csrootpanel.cpp
new file mode 100644
index 0000000..2fa0648
--- /dev/null
+++ b/game/client/cstrike/c_csrootpanel.cpp
@@ -0,0 +1,86 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#include "cbase.h"
+#include "c_csrootpanel.h"
+#include <vgui_controls/Controls.h>
+#include <vgui/IVGui.h>
+#include "clientmode_csnormal.h"
+
+
+//-----------------------------------------------------------------------------
+// Purpose:
+// Input : *parent -
+//-----------------------------------------------------------------------------
+C_CSRootPanel::C_CSRootPanel( vgui::VPANEL parent )
+ : BaseClass( NULL, "CounterStrike Root Panel" )
+{
+ SetParent( parent );
+ SetPaintEnabled( false );
+ SetPaintBorderEnabled( false );
+ SetPaintBackgroundEnabled( false );
+
+ // This panel does post child painting
+ SetPostChildPaintEnabled( true );
+
+ int w, h;
+ surface()->GetScreenSize( w, h );
+
+ // Make it screen sized
+ SetBounds( 0, 0, w, h );
+
+ // Ask for OnTick messages
+ vgui::ivgui()->AddTickSignal( GetVPanel() );
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+C_CSRootPanel::~C_CSRootPanel( void )
+{
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+void C_CSRootPanel::PostChildPaint()
+{
+ BaseClass::PostChildPaint();
+
+ // Draw all panel effects
+ RenderPanelEffects();
+}
+
+//-----------------------------------------------------------------------------
+// Purpose: For each panel effect, check if it wants to draw and draw it on
+// this panel/surface if so
+//-----------------------------------------------------------------------------
+void C_CSRootPanel::RenderPanelEffects( void )
+{
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+void C_CSRootPanel::OnTick( void )
+{
+}
+
+//-----------------------------------------------------------------------------
+// Purpose: Reset effects on level load/shutdown
+//-----------------------------------------------------------------------------
+void C_CSRootPanel::LevelInit( void )
+{
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+void C_CSRootPanel::LevelShutdown( void )
+{
+}
+