Counter Strike : Global Offensive Source Code
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.

48 lines
934 B

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef CONTROLLERMAP_H
  8. #define CONTROLLERMAP_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "Panel.h"
  13. #include "utlmap.h"
  14. #include "utlsymbol.h"
  15. class CControllerMap : public vgui::Panel
  16. {
  17. DECLARE_CLASS_SIMPLE( CControllerMap, vgui::Panel )
  18. virtual void OnKeyCodeTyped( vgui::KeyCode code );
  19. public:
  20. CControllerMap( vgui::Panel *parent, const char *name );
  21. virtual void ApplySettings( KeyValues *inResourceData );
  22. int NumButtons( void )
  23. {
  24. return m_buttonMap.Count();
  25. }
  26. const char *GetBindingText( int idx );
  27. const char *GetBindingIcon( int idx );
  28. private:
  29. struct button_t
  30. {
  31. CUtlSymbol cmd;
  32. CUtlSymbol text;
  33. CUtlSymbol icon;
  34. };
  35. CUtlMap< int, button_t > m_buttonMap;
  36. };
  37. #endif // CONTROLLERMAP_H