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.

55 lines
1.3 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: The main manager of the input
  4. //
  5. // $Revision: $
  6. // $NoKeywords: $
  7. //===========================================================================//
  8. #ifndef INPUTMANAGER_H
  9. #define INPUTMANAGER_H
  10. #ifdef _WIN32
  11. #pragma once
  12. #endif
  13. #include "gamemanager.h"
  14. #include "tier2/keybindings.h"
  15. #include "tier1/commandbuffer.h"
  16. #include "bitvec.h"
  17. //-----------------------------------------------------------------------------
  18. // Input management
  19. //-----------------------------------------------------------------------------
  20. class CInputManager : public CGameManager<>
  21. {
  22. public:
  23. // Inherited from IGameManager
  24. virtual bool Init();
  25. virtual void Update( );
  26. // Add a command into the command queue
  27. void AddCommand( const char *pCommand );
  28. private:
  29. // Per-frame update of commands
  30. void ProcessCommands( );
  31. // Purpose:
  32. void PrintConCommandBaseDescription( const ConCommandBase *pVar );
  33. CKeyBindings m_KeyBindings;
  34. CBitVec<BUTTON_CODE_LAST> m_ButtonUpToEngine;
  35. CCommandBuffer m_CommandBuffer;
  36. };
  37. //-----------------------------------------------------------------------------
  38. // Singleton accessor
  39. //-----------------------------------------------------------------------------
  40. extern CInputManager *g_pInputManager;
  41. #endif // INPUTMANAGER_H