Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
1.5 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef DODTEAMMENU_H
  8. #define DODTEAMMENU_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "teammenu.h"
  13. #include "dodmenubackground.h"
  14. #include "dodbutton.h"
  15. #include "dodmouseoverpanelbutton.h"
  16. #include "IconPanel.h"
  17. //-----------------------------------------------------------------------------
  18. // Purpose: Displays the team menu
  19. //-----------------------------------------------------------------------------
  20. class CDODTeamMenu : public CTeamMenu
  21. {
  22. private:
  23. DECLARE_CLASS_SIMPLE( CDODTeamMenu, CTeamMenu );
  24. public:
  25. CDODTeamMenu(IViewPort *pViewPort);
  26. ~CDODTeamMenu();
  27. virtual void Update();
  28. virtual void OnTick();
  29. void ShowPanel( bool bShow );
  30. virtual void SetVisible( bool state );
  31. virtual void PaintBackground();
  32. virtual Panel *CreateControlByName( const char *controlName );
  33. virtual void ApplySchemeSettings( IScheme *pScheme );
  34. virtual void OnKeyCodePressed(KeyCode code);
  35. private:
  36. enum { NUM_TEAMS = 3 };
  37. MESSAGE_FUNC_CHARPTR( OnShowPage, "ShowPage", page );
  38. // VGUI2 override
  39. void OnCommand( const char *command);
  40. // helper functions
  41. void SetVisibleButton(const char *textEntryName, bool state);
  42. CDODMenuBackground *m_pBackground;
  43. vgui::EditablePanel *m_pPanel;
  44. CDODMouseOverButton<vgui::EditablePanel> *m_pFirstButton;
  45. int m_iLastPlayerCount;
  46. int m_iActiveTeam;
  47. ButtonCode_t m_iTeamMenuKey;
  48. };
  49. #endif // DODTEAMMENU_H