Changeset 7635 in orxonox.OLD for branches/qt_gui/src/lib/event/key_mapper.h
- Timestamp:
- May 17, 2006, 10:12:33 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/qt_gui/src/lib/event/key_mapper.h
r7256 r7635 10 10 11 11 #include "base_object.h" 12 //#include "event_def.h" 13 12 #include <string> 14 13 class IniParser; 15 14 16 //! A mapping from key-name to key-id17 typedef struct orxKeyMapping 15 //! The map class functionalities 16 class KeyMapper : public BaseObject 18 17 { 19 int* pValue; 20 char* pName; 21 }; 18 public: 19 //! A mapping from key-name to key-id 20 typedef struct KeyMapping 21 { 22 int* pValue; 23 const std::string pName; 24 }; 22 25 23 24 //! The map class functionalities 25 class KeyMapper : public BaseObject { 26 27 public: 26 public: 28 27 KeyMapper(); 29 28 virtual ~KeyMapper(); … … 33 32 void loadKeyBindings(IniParser* iniParser); 34 33 34 static const KeyMapping* const getKeyMapping() { return KeyMapper::map; }; 35 35 36 void debug(); 36 37 37 38 private: 38 39 int* nameToIndex (const std::string& name); 39 40 void mapKeys(const std::string& name, int* index); 40 41 41 42 public: 42 43 static int PEV_FORWARD; //!< forward button 43 44 static int PEV_BACKWARD; //!< backward buttton … … 73 74 static int PEV_QUIT; //!< quit button 74 75 75 private: 76 int coord[2]; //!< temp place to save variables in nameToIndex() function 76 private: 77 int coord[2]; //!< temp place to save variables in nameToIndex() function 78 static KeyMapping map[]; //!< The KeyMapping that maps strings to ID's and Vice Versa 77 79 }; 78 80
Note: See TracChangeset
for help on using the changeset viewer.