aboutsummaryrefslogtreecommitdiff
path: root/sp/src/public/vgui_controls/ControllerMap.h
diff options
context:
space:
mode:
authorJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
committerJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
commit39ed87570bdb2f86969d4be821c94b722dc71179 (patch)
treeabc53757f75f40c80278e87650ea92808274aa59 /sp/src/public/vgui_controls/ControllerMap.h
downloadsource-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz
source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip
First version of the SOurce SDK 2013
Diffstat (limited to 'sp/src/public/vgui_controls/ControllerMap.h')
-rw-r--r--sp/src/public/vgui_controls/ControllerMap.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/sp/src/public/vgui_controls/ControllerMap.h b/sp/src/public/vgui_controls/ControllerMap.h
new file mode 100644
index 00000000..62fda7e0
--- /dev/null
+++ b/sp/src/public/vgui_controls/ControllerMap.h
@@ -0,0 +1,48 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef CONTROLLERMAP_H
+#define CONTROLLERMAP_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "Panel.h"
+#include "utlmap.h"
+#include "utlsymbol.h"
+
+class CControllerMap : public vgui::Panel
+{
+ DECLARE_CLASS_SIMPLE( CControllerMap, vgui::Panel )
+
+ virtual void OnKeyCodeTyped( vgui::KeyCode code );
+
+public:
+ CControllerMap( vgui::Panel *parent, const char *name );
+
+ virtual void ApplySettings( KeyValues *inResourceData );
+
+ int NumButtons( void )
+ {
+ return m_buttonMap.Count();
+ }
+
+ const char *GetBindingText( int idx );
+ const char *GetBindingIcon( int idx );
+
+private:
+
+ struct button_t
+ {
+ CUtlSymbol cmd;
+ CUtlSymbol text;
+ CUtlSymbol icon;
+ };
+ CUtlMap< int, button_t > m_buttonMap;
+};
+
+#endif // CONTROLLERMAP_H \ No newline at end of file