mirror of
https://github.com/nillerusr/source-engine.git
synced 2024-12-22 22:27:05 +00:00
87 lines
2.5 KiB
C++
87 lines
2.5 KiB
C++
//========= 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 )
|
|
{
|
|
}
|
|
|