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/sessionlobbydialog.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'gameui/matchmaking/sessionlobbydialog.h')
| -rw-r--r-- | gameui/matchmaking/sessionlobbydialog.h | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/gameui/matchmaking/sessionlobbydialog.h b/gameui/matchmaking/sessionlobbydialog.h new file mode 100644 index 0000000..9049333 --- /dev/null +++ b/gameui/matchmaking/sessionlobbydialog.h @@ -0,0 +1,85 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//=============================================================================// + +#ifndef SESSIONLOBBYDIALOG_H +#define SESSIONLOBBYDIALOG_H +#ifdef _WIN32 +#pragma once +#endif + +#include "basedialog.h" + +//----------------------------------------------------------------------------- +// Purpose: Simple menu to choose a matchmaking session type +//----------------------------------------------------------------------------- +class CSessionLobbyDialog : public CBaseDialog +{ + DECLARE_CLASS_SIMPLE( CSessionLobbyDialog, CBaseDialog ); + +public: + CSessionLobbyDialog( vgui::Panel *parent ); + ~CSessionLobbyDialog(); + + virtual void OnCommand( const char *pCommand ); + virtual void OnKeyCodePressed( vgui::KeyCode code ); + + virtual void PerformLayout(); + virtual void ApplySettings( KeyValues *inResourceData ); + virtual void ApplySchemeSettings( vgui::IScheme *pScheme ); + + void SetDialogKeys( KeyValues *pKeys ); + void UpdatePlayerInfo( uint64 nPlayerId, const char *pName, int nTeam, byte cVoiceState, int nPlayersNeeded, bool bHost ); + void UpdateCountdown( int seconds ); + +private: + void ActivateNextMenu(); + void ActivatePreviousMenu(); + void UpdatePlayerCountDisplay( int iTeam ); + void SetLobbyReadyState( int nPlayersNeeded ); + void PositionTeamInfos(); + + void SetTextFromKeyvalues( CPropertyLabel *pLabel ); + + void SetStartGame( bool bStartGame ); + + enum + { + BLUE_TEAM_LOBBY, + RED_TEAM_LOBBY, + TOTAL_LOBBY_TEAMS, + }; + + CDialogMenu m_Menus[TOTAL_LOBBY_TEAMS]; + + vgui::Panel *m_pLobbyStateBg; + CPropertyLabel *m_pLobbyStateLabel; + CPropertyLabel *m_pLobbyStateIcon; + CPropertyLabel *m_pHostLabel; + vgui::EditablePanel *m_pHostOptionsPanel; + + KeyValues *m_pDialogKeys; + + CScenarioInfoPanel *m_pScenarioInfo; + CScenarioInfoPanel *m_pTeamInfos[TOTAL_LOBBY_TEAMS]; + + int m_nMinInfoHeight[TOTAL_LOBBY_TEAMS]; + + uint64 m_nHostId; + bool m_bReady; + bool m_bHostLobby; + bool m_bCenterOnScreen; + int m_iLocalTeam; + int m_iActiveMenu; + int m_nImageBorderWidth; + int m_nTeamspacing; + char m_szCommand[MAX_COMMAND_LEN]; + + bool m_bStartingGame; + int m_nLastPlayersNeeded; +}; + + +#endif // SESSIONLOBBYDIALOG_H |