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.

107 lines
2.8 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef CSCLASSMENU_H
  8. #define CSCLASSMENU_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include <classmenu.h>
  13. #include <vgui_controls/EditablePanel.h>
  14. #include <filesystem.h>
  15. #include <cs_shareddefs.h>
  16. #include "cbase.h"
  17. #include "cs_gamerules.h"
  18. #include "vgui_controls/ImagePanel.h"
  19. #include "backgroundpanel.h"
  20. using namespace vgui;
  21. //-----------------------------------------------------------------------------
  22. // These are maintained in a list so the renderer can draw a 3D character
  23. // model on top of them.
  24. //-----------------------------------------------------------------------------
  25. class CCSClassImagePanel : public vgui::ImagePanel
  26. {
  27. public:
  28. typedef vgui::ImagePanel BaseClass;
  29. CCSClassImagePanel( vgui::Panel *pParent, const char *pName );
  30. virtual ~CCSClassImagePanel();
  31. virtual void ApplySettings( KeyValues *inResourceData );
  32. virtual void Paint();
  33. public:
  34. char m_ModelName[128];
  35. };
  36. extern CUtlVector<CCSClassImagePanel*> g_ClassImagePanels;
  37. //-----------------------------------------------------------------------------
  38. // Purpose: Draws the Terrorist class menu
  39. //-----------------------------------------------------------------------------
  40. class CClassMenu_TER : public CClassMenu
  41. {
  42. private:
  43. DECLARE_CLASS_SIMPLE( CClassMenu_TER, CClassMenu );
  44. // Background panel -------------------------------------------------------
  45. public:
  46. virtual void PaintBackground();
  47. virtual void PerformLayout();
  48. virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
  49. bool m_backgroundLayoutFinished;
  50. // End background panel ---------------------------------------------------
  51. public:
  52. CClassMenu_TER(IViewPort *pViewPort);
  53. virtual Panel* CreateControlByName(const char *controlName);
  54. const char *GetName( void );
  55. void ShowPanel(bool bShow);
  56. void Update();
  57. virtual void SetVisible(bool state);
  58. };
  59. //-----------------------------------------------------------------------------
  60. // Purpose: Draws the Counter-Terrorist class menu
  61. //-----------------------------------------------------------------------------
  62. class CClassMenu_CT : public CClassMenu
  63. {
  64. private:
  65. DECLARE_CLASS_SIMPLE( CClassMenu_CT, CClassMenu );
  66. // Background panel -------------------------------------------------------
  67. public:
  68. virtual void PaintBackground();
  69. virtual void PerformLayout();
  70. virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
  71. bool m_backgroundLayoutFinished;
  72. // End background panel ---------------------------------------------------
  73. public:
  74. CClassMenu_CT(IViewPort *pViewPort);
  75. virtual Panel *CreateControlByName(const char *controlName);
  76. const char *GetName( void );
  77. void ShowPanel(bool bShow);
  78. void Update();
  79. virtual void SetVisible(bool state);
  80. };
  81. #endif // CSCLASSMENU_H