diff options
| author | John Schoenick <[email protected]> | 2015-09-09 18:35:41 -0700 |
|---|---|---|
| committer | John Schoenick <[email protected]> | 2015-09-09 18:35:41 -0700 |
| commit | 0d8dceea4310fde5706b3ce1c70609d72a38efdf (patch) | |
| tree | c831ef32c2c801a5c5a80401736b52c7b5a528ec /mp/src/game/client/hud_vote.h | |
| parent | Updated the SDK with the latest code from the TF and HL2 branches. (diff) | |
| download | source-sdk-2013-master.tar.xz source-sdk-2013-master.zip | |
Diffstat (limited to 'mp/src/game/client/hud_vote.h')
| -rw-r--r-- | mp/src/game/client/hud_vote.h | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/mp/src/game/client/hud_vote.h b/mp/src/game/client/hud_vote.h index 91ba1e9b..38956366 100644 --- a/mp/src/game/client/hud_vote.h +++ b/mp/src/game/client/hud_vote.h @@ -25,6 +25,8 @@ extern INetworkStringTable *g_pStringTableServerPopFiles; extern INetworkStringTable *g_pStringTableServerMapCycleMvM; #endif +static const int k_MAX_VOTE_NAME_LENGTH = 256; + namespace vgui { class SectionedListPanel; @@ -32,6 +34,13 @@ namespace vgui class ImageList; }; +struct VoteIssue_t +{ + char szName[k_MAX_VOTE_NAME_LENGTH]; + char szNameString[k_MAX_VOTE_NAME_LENGTH]; + bool bIsActive; +}; + class VoteBarPanel : public vgui::Panel, public CGameEventListener { DECLARE_CLASS_SIMPLE( VoteBarPanel, vgui::Panel ); @@ -69,8 +78,9 @@ public: virtual void PostApplySchemeSettings( vgui::IScheme *pScheme ); virtual void ApplySettings(KeyValues *inResourceData); + void InitializeIssueList( void ); void UpdateCurrentMap( void ); - void AddVoteIssues( CUtlStringList &m_VoteSetupIssues ); + void AddVoteIssues( CUtlVector< VoteIssue_t > &m_VoteSetupIssues ); void AddVoteIssueParams_MapCycle( CUtlStringList &m_VoteSetupMapCycle ); #ifdef TF_CLIENT_DLL @@ -94,7 +104,7 @@ private: vgui::Button *m_pCallVoteButton; vgui::ImageList *m_pImageList; - CUtlVector<const char*> m_VoteIssues; + CUtlVector< VoteIssue_t > m_VoteIssues; CUtlVector<const char*> m_VoteIssuesMapCycle; #ifdef TF_CLIENT_DLL @@ -137,12 +147,12 @@ class CHudVote : public vgui::EditablePanel, public CHudElement void MsgFunc_VoteSetup( bf_read &msg ); void PropagateOptionParameters( void ); - void ShowVoteUI( void ); + void ShowVoteUI( bool bShow ) { m_bShowVoteActivePanel = bShow; } bool IsVoteUIActive( void ); + bool IsVoteSystemActive( void ) { return m_bVoteSystemActive; } private: bool IsPlayingDemo() const; - void SetVoteActive( bool bActive ); EditablePanel *m_pVoteActive; VoteBarPanel *m_voteBar; @@ -151,7 +161,7 @@ private: EditablePanel *m_pCallVoteFailed; CVoteSetupDialog *m_pVoteSetupDialog; - CUtlStringList m_VoteSetupIssues; + CUtlVector< VoteIssue_t > m_VoteSetupIssues; CUtlStringList m_VoteSetupMapCycle; #ifdef TF_CLIENT_DLL @@ -160,7 +170,8 @@ private: CUtlStringList m_VoteSetupChoices; - bool m_bVoteActive; + bool m_bVotingActive; + bool m_bVoteSystemActive; float m_flVoteResultCycleTime; // what time will we cycle to the result float m_flHideTime; // what time will we hide bool m_bVotePassed; // what mode are we going to cycle to @@ -172,6 +183,7 @@ private: float m_flPostVotedHideTime; bool m_bShowVoteActivePanel; int m_iVoteCallerIdx; + int m_nVoteTeamIndex; // If defined, only players on this team will see/vote on the issue }; #endif // HUD_VOTE_H |