diff options
| author | Joe Ludwig <[email protected]> | 2013-06-26 15:22:04 -0700 |
|---|---|---|
| committer | Joe Ludwig <[email protected]> | 2013-06-26 15:22:04 -0700 |
| commit | 39ed87570bdb2f86969d4be821c94b722dc71179 (patch) | |
| tree | abc53757f75f40c80278e87650ea92808274aa59 /sp/src/public/tier2/keybindings.h | |
| download | source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip | |
First version of the SOurce SDK 2013
Diffstat (limited to 'sp/src/public/tier2/keybindings.h')
| -rw-r--r-- | sp/src/public/tier2/keybindings.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/sp/src/public/tier2/keybindings.h b/sp/src/public/tier2/keybindings.h new file mode 100644 index 00000000..4b2185cf --- /dev/null +++ b/sp/src/public/tier2/keybindings.h @@ -0,0 +1,42 @@ +//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//
+//===========================================================================//
+
+#ifndef KEYBINDINGS_H
+#define KEYBINDINGS_H
+
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "tier1/utlstring.h"
+#include "inputsystem/ButtonCode.h"
+
+class CUtlBuffer;
+
+
+class CKeyBindings
+{
+public:
+ void SetBinding( ButtonCode_t code, const char *pBinding );
+ void SetBinding( const char *pButtonName, const char *pBinding );
+
+ void Unbind( ButtonCode_t code );
+ void Unbind( const char *pButtonName );
+ void UnbindAll();
+
+ int GetBindingCount() const;
+ void WriteBindings( CUtlBuffer &buf );
+ const char *ButtonNameForBinding( const char *pBinding );
+ const char *GetBindingForButton( ButtonCode_t code );
+
+private:
+ CUtlString m_KeyInfo[ BUTTON_CODE_LAST ];
+};
+
+
+#endif // KEYBINDINGS_H
|