mirror of
https://github.com/nillerusr/source-engine.git
synced 2024-12-22 14:16:50 +00:00
47 lines
1.0 KiB
C++
47 lines
1.0 KiB
C++
//========= Copyright Valve Corporation, All rights reserved. ============//
|
|
//
|
|
// Purpose: Multiplayer pause menu
|
|
//
|
|
//=============================================================================//
|
|
|
|
#include "pausedialog.h"
|
|
#include "GameUI_Interface.h"
|
|
|
|
// memdbgon must be the last include file in a .cpp file!!!
|
|
#include "tier0/memdbgon.h"
|
|
|
|
//--------------------------------
|
|
// CPauseDialog
|
|
//--------------------------------
|
|
CPauseDialog::CPauseDialog( vgui::Panel *pParent ) : BaseClass( pParent, "PauseDialog" )
|
|
{
|
|
// do nothing
|
|
}
|
|
|
|
void CPauseDialog::Activate( void )
|
|
{
|
|
BaseClass::Activate();
|
|
|
|
SetDeleteSelfOnClose( false );
|
|
m_Menu.SetFocus( 0 );
|
|
}
|
|
|
|
//-------------------------------------------------------
|
|
// Keyboard input
|
|
//-------------------------------------------------------
|
|
void CPauseDialog::OnKeyCodePressed( vgui::KeyCode code )
|
|
{
|
|
switch( code )
|
|
{
|
|
case KEY_XBUTTON_B:
|
|
if ( GameUI().IsInLevel() )
|
|
{
|
|
m_pParent->OnCommand( "ResumeGame" );
|
|
}
|
|
break;
|
|
|
|
default:
|
|
BaseClass::OnKeyCodePressed( code );
|
|
break;
|
|
}
|
|
} |