summaryrefslogtreecommitdiff
path: root/gameui/matchmaking/pausedialog.cpp
blob: f15858390c580b67dab4addb5bc3689724bf993f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//========= 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;
	}
}