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.

102 lines
2.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef CSTRIKEBUYMENU_H
  8. #define CSTRIKEBUYMENU_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include <vgui_controls/WizardPanel.h>
  13. #include <buymenu.h>
  14. class BuyPresetEditPanel;
  15. class BuyPresetButton;
  16. namespace vgui
  17. {
  18. class Panel;
  19. class Button;
  20. class Label;
  21. }
  22. enum
  23. {
  24. NUM_BUY_PRESET_BUTTONS = 4,
  25. };
  26. //============================
  27. // Base CS buy Menu
  28. //============================
  29. class CCSBaseBuyMenu : public CBuyMenu
  30. {
  31. private:
  32. typedef vgui::WizardPanel BaseClass;
  33. public:
  34. CCSBaseBuyMenu(IViewPort *pViewPort, const char *subPanelName);
  35. virtual void ShowPanel( bool bShow );
  36. virtual void Paint( void );
  37. virtual void SetVisible( bool state );
  38. void HandleBlackMarket( void );
  39. private:
  40. void UpdateBuyPresets( bool showDefaultPanel = false ); ///< Update the Buy Preset buttons and their info panels on the main buy menu
  41. vgui::Panel *m_pMainBackground;
  42. BuyPresetButton *m_pBuyPresetButtons[NUM_BUY_PRESET_BUTTONS];
  43. BuyPresetEditPanel *m_pLoadout;
  44. vgui::Label *m_pMoney;
  45. int m_lastMoney;
  46. vgui::EditablePanel *m_pBlackMarket;
  47. HFont m_hUnderlineFont;
  48. // Background panel -------------------------------------------------------
  49. public:
  50. virtual void PaintBackground();
  51. virtual void PerformLayout();
  52. virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
  53. bool m_backgroundLayoutFinished;
  54. // End background panel ---------------------------------------------------
  55. };
  56. //============================
  57. // CT main buy Menu
  58. //============================
  59. class CCSBuyMenu_CT : public CCSBaseBuyMenu
  60. {
  61. private:
  62. typedef vgui::WizardPanel BaseClass;
  63. public:
  64. CCSBuyMenu_CT(IViewPort *pViewPort);
  65. virtual const char *GetName( void ) { return PANEL_BUY_CT; }
  66. };
  67. //============================
  68. // Terrorist main buy Menu
  69. //============================
  70. class CCSBuyMenu_TER : public CCSBaseBuyMenu
  71. {
  72. private:
  73. typedef vgui::WizardPanel BaseClass;
  74. public:
  75. CCSBuyMenu_TER(IViewPort *pViewPort);
  76. virtual const char *GetName( void ) { return PANEL_BUY_TER; }
  77. };
  78. #endif // CSTRIKEBUYMENU_H