diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /gameui/matchmaking/welcomedialog.cpp | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'gameui/matchmaking/welcomedialog.cpp')
| -rw-r--r-- | gameui/matchmaking/welcomedialog.cpp | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/gameui/matchmaking/welcomedialog.cpp b/gameui/matchmaking/welcomedialog.cpp new file mode 100644 index 0000000..7249c70 --- /dev/null +++ b/gameui/matchmaking/welcomedialog.cpp @@ -0,0 +1,58 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: Matchmaking's "main menu" +// +//=============================================================================// + +#include "welcomedialog.h" +#include "GameUI_Interface.h" +#include "vgui_controls/MessageDialog.h" +#include "ixboxsystem.h" +#include "EngineInterface.h" + +// memdbgon must be the last include file in a .cpp file!!! +#include "tier0/memdbgon.h" + +//-------------------------------- +// CPlayerMatchDialog +//-------------------------------- +CWelcomeDialog::CWelcomeDialog( vgui::Panel *pParent ) : BaseClass( pParent, "WelcomeDialog" ) +{ + // do nothing +} + +//--------------------------------------------------------- +// Purpose: Set the title and menu positions +//--------------------------------------------------------- +void CWelcomeDialog::PerformLayout( void ) +{ + BaseClass::PerformLayout(); +} + +//----------------------------------------------------------------- +// Purpose: Forward commands to the matchmaking base panel +//----------------------------------------------------------------- +void CWelcomeDialog::OnCommand( const char *pCommand ) +{ + BaseClass::OnCommand( pCommand ); +} + +//------------------------------------------------------- +// Keyboard input +//------------------------------------------------------- +void CWelcomeDialog::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 |