summaryrefslogtreecommitdiff
path: root/game/client/dod/VGUI/dodteammenu.h
diff options
context:
space:
mode:
Diffstat (limited to 'game/client/dod/VGUI/dodteammenu.h')
-rw-r--r--game/client/dod/VGUI/dodteammenu.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/game/client/dod/VGUI/dodteammenu.h b/game/client/dod/VGUI/dodteammenu.h
new file mode 100644
index 0000000..6df7bc1
--- /dev/null
+++ b/game/client/dod/VGUI/dodteammenu.h
@@ -0,0 +1,67 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef DODTEAMMENU_H
+#define DODTEAMMENU_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "teammenu.h"
+#include "dodmenubackground.h"
+#include "dodbutton.h"
+#include "dodmouseoverpanelbutton.h"
+#include "IconPanel.h"
+
+//-----------------------------------------------------------------------------
+// Purpose: Displays the team menu
+//-----------------------------------------------------------------------------
+class CDODTeamMenu : public CTeamMenu
+{
+private:
+ DECLARE_CLASS_SIMPLE( CDODTeamMenu, CTeamMenu );
+
+public:
+ CDODTeamMenu(IViewPort *pViewPort);
+ ~CDODTeamMenu();
+
+ virtual void Update();
+ virtual void OnTick();
+ void ShowPanel( bool bShow );
+ virtual void SetVisible( bool state );
+
+ virtual void PaintBackground();
+ virtual Panel *CreateControlByName( const char *controlName );
+
+ virtual void ApplySchemeSettings( IScheme *pScheme );
+
+ virtual void OnKeyCodePressed(KeyCode code);
+
+private:
+ enum { NUM_TEAMS = 3 };
+
+ MESSAGE_FUNC_CHARPTR( OnShowPage, "ShowPage", page );
+
+ // VGUI2 override
+ void OnCommand( const char *command);
+ // helper functions
+ void SetVisibleButton(const char *textEntryName, bool state);
+
+ CDODMenuBackground *m_pBackground;
+
+ vgui::EditablePanel *m_pPanel;
+
+ CDODMouseOverButton<vgui::EditablePanel> *m_pFirstButton;
+
+ int m_iLastPlayerCount;
+
+ int m_iActiveTeam;
+
+ ButtonCode_t m_iTeamMenuKey;
+};
+
+#endif // DODTEAMMENU_H