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.

68 lines
1.7 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef BUYMENU_H
  8. #define BUYMENU_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include <vgui_controls/WizardPanel.h>
  13. #include <game/client/iviewport.h>
  14. #include "vgui/KeyCode.h"
  15. class CBuySubMenu;
  16. namespace vgui
  17. {
  18. class Panel;
  19. }
  20. //-----------------------------------------------------------------------------
  21. // Purpose: Draws the class menu
  22. //-----------------------------------------------------------------------------
  23. class CBuyMenu : public vgui::WizardPanel, public IViewPortPanel
  24. {
  25. private:
  26. DECLARE_CLASS_SIMPLE( CBuyMenu, vgui::WizardPanel );
  27. public:
  28. CBuyMenu(IViewPort *pViewPort);
  29. ~CBuyMenu();
  30. virtual const char *GetName( void ) { return PANEL_BUY; }
  31. virtual void SetData(KeyValues *data) {};
  32. virtual void Reset() {};
  33. virtual void Update();
  34. virtual bool NeedsUpdate( void ) { return false; }
  35. virtual bool HasInputElements( void ) { return true; }
  36. virtual void ShowPanel( bool bShow );
  37. // both vgui::Frame and IViewPortPanel define these, so explicitly define them here as passthroughs to vgui
  38. vgui::VPANEL GetVPanel( void ) { return BaseClass::GetVPanel(); }
  39. virtual bool IsVisible() { return BaseClass::IsVisible(); }
  40. virtual void SetParent( vgui::VPANEL parent ) { BaseClass::SetParent( parent ); }
  41. virtual void OnKeyCodePressed( vgui::KeyCode code );
  42. virtual void OnKeyCodeTyped( vgui::KeyCode code );
  43. virtual GameActionSet_t GetPreferredActionSet() { return GAME_ACTION_SET_MENUCONTROLS; }
  44. public:
  45. virtual void OnClose();
  46. protected:
  47. CBuySubMenu *m_pMainMenu;
  48. IViewPort *m_pViewPort;
  49. int m_iTeam;
  50. int m_iClass;
  51. };
  52. #endif // BUYMENU_H