aboutsummaryrefslogtreecommitdiff
path: root/mp/src/game/client/sdk/vgui/vgui_rootpanel_sdk.cpp
diff options
context:
space:
mode:
authorJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
committerJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
commit39ed87570bdb2f86969d4be821c94b722dc71179 (patch)
treeabc53757f75f40c80278e87650ea92808274aa59 /mp/src/game/client/sdk/vgui/vgui_rootpanel_sdk.cpp
downloadsource-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz
source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip
First version of the SOurce SDK 2013
Diffstat (limited to 'mp/src/game/client/sdk/vgui/vgui_rootpanel_sdk.cpp')
-rw-r--r--mp/src/game/client/sdk/vgui/vgui_rootpanel_sdk.cpp106
1 files changed, 106 insertions, 0 deletions
diff --git a/mp/src/game/client/sdk/vgui/vgui_rootpanel_sdk.cpp b/mp/src/game/client/sdk/vgui/vgui_rootpanel_sdk.cpp
new file mode 100644
index 00000000..8b81d37d
--- /dev/null
+++ b/mp/src/game/client/sdk/vgui/vgui_rootpanel_sdk.cpp
@@ -0,0 +1,106 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+#include "cbase.h"
+#include "vgui_int.h"
+#include "ienginevgui.h"
+#include "vgui_rootpanel_sdk.h"
+#include "vgui/IVGui.h"
+
+// memdbgon must be the last include file in a .cpp file!!!
+#include "tier0/memdbgon.h"
+
+C_SDKRootPanel *g_pRootPanel = NULL;
+
+
+//-----------------------------------------------------------------------------
+// Global functions.
+//-----------------------------------------------------------------------------
+void VGUI_CreateClientDLLRootPanel( void )
+{
+ g_pRootPanel = new C_SDKRootPanel( enginevgui->GetPanel( PANEL_CLIENTDLL ) );
+}
+
+void VGUI_DestroyClientDLLRootPanel( void )
+{
+ delete g_pRootPanel;
+ g_pRootPanel = NULL;
+}
+
+vgui::VPANEL VGui_GetClientDLLRootPanel( void )
+{
+ return g_pRootPanel->GetVPanel();
+}
+
+
+//-----------------------------------------------------------------------------
+// C_SDKRootPanel implementation.
+//-----------------------------------------------------------------------------
+C_SDKRootPanel::C_SDKRootPanel( vgui::VPANEL parent )
+ : BaseClass( NULL, "SDK Root Panel" )
+{
+ SetParent( parent );
+ SetPaintEnabled( false );
+ SetPaintBorderEnabled( false );
+ SetPaintBackgroundEnabled( false );
+
+ // This panel does post child painting
+ SetPostChildPaintEnabled( true );
+
+ // Make it screen sized
+ SetBounds( 0, 0, ScreenWidth(), ScreenHeight() );
+
+ // Ask for OnTick messages
+ vgui::ivgui()->AddTickSignal( GetVPanel() );
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+C_SDKRootPanel::~C_SDKRootPanel( void )
+{
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+void C_SDKRootPanel::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_SDKRootPanel::RenderPanelEffects( void )
+{
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+void C_SDKRootPanel::OnTick( void )
+{
+}
+
+//-----------------------------------------------------------------------------
+// Purpose: Reset effects on level load/shutdown
+//-----------------------------------------------------------------------------
+void C_SDKRootPanel::LevelInit( void )
+{
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+void C_SDKRootPanel::LevelShutdown( void )
+{
+}
+