summaryrefslogtreecommitdiff
path: root/gameui/matchmaking/pausedialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gameui/matchmaking/pausedialog.cpp')
-rw-r--r--gameui/matchmaking/pausedialog.cpp47
1 files changed, 47 insertions, 0 deletions
diff --git a/gameui/matchmaking/pausedialog.cpp b/gameui/matchmaking/pausedialog.cpp
new file mode 100644
index 0000000..f158583
--- /dev/null
+++ b/gameui/matchmaking/pausedialog.cpp
@@ -0,0 +1,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;
+ }
+} \ No newline at end of file