diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /app/legion/inputmanager.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'app/legion/inputmanager.h')
| -rw-r--r-- | app/legion/inputmanager.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/app/legion/inputmanager.h b/app/legion/inputmanager.h new file mode 100644 index 0000000..82517df --- /dev/null +++ b/app/legion/inputmanager.h @@ -0,0 +1,55 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: The main manager of the input +// +// $Revision: $ +// $NoKeywords: $ +//===========================================================================// + +#ifndef INPUTMANAGER_H +#define INPUTMANAGER_H + +#ifdef _WIN32 +#pragma once +#endif + +#include "gamemanager.h" +#include "tier2/keybindings.h" +#include "tier1/commandbuffer.h" +#include "bitvec.h" + + +//----------------------------------------------------------------------------- +// Input management +//----------------------------------------------------------------------------- +class CInputManager : public CGameManager<> +{ +public: + // Inherited from IGameManager + virtual bool Init(); + virtual void Update( ); + + // Add a command into the command queue + void AddCommand( const char *pCommand ); + +private: + // Per-frame update of commands + void ProcessCommands( ); + + // Purpose: + void PrintConCommandBaseDescription( const ConCommandBase *pVar ); + + CKeyBindings m_KeyBindings; + CBitVec<BUTTON_CODE_LAST> m_ButtonUpToEngine; + CCommandBuffer m_CommandBuffer; +}; + + +//----------------------------------------------------------------------------- +// Singleton accessor +//----------------------------------------------------------------------------- +extern CInputManager *g_pInputManager; + + +#endif // INPUTMANAGER_H + |