Changeset 7635 in orxonox.OLD for branches/qt_gui/src/lib
- Timestamp:
- May 17, 2006, 10:12:33 AM (19 years ago)
- Location:
- branches/qt_gui/src/lib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/qt_gui/src/lib/event/key_mapper.cc
r7256 r7635 71 71 * and you do not have to care about The namings, as they might change 72 72 */ 73 orxKeyMappingmap[] = {73 KeyMapper::KeyMapping KeyMapper::map[] = { 74 74 {&KeyMapper::PEV_FORWARD, CONFIG_NAME_PLAYER_FORWARD}, 75 75 {&KeyMapper::PEV_BACKWARD, CONFIG_NAME_PLAYER_BACKWARD}, … … 104 104 {&KeyMapper::PEV_PAUSE, CONFIG_NAME_PAUSE}, 105 105 {&KeyMapper::PEV_QUIT, CONFIG_NAME_QUIT}, 106 {NULL, NULL}106 {NULL, ""} 107 107 }; 108 108 … … 266 266 for(int i = 0; map[i].pValue != NULL; ++i) 267 267 { 268 PRINT(0)("%s = %i\n",map[i].pName , *map[i].pValue);268 PRINT(0)("%s = %i\n",map[i].pName.c_str(), *map[i].pValue); 269 269 } 270 270 PRINT(0)("=======================================================\n"); -
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 -
branches/qt_gui/src/lib/gui/gui_saveable.cc
r7633 r7635 14 14 */ 15 15 16 //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ 16 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GUI 17 17 18 18 #include "gui_saveable.h" -
branches/qt_gui/src/lib/util/preferences.cc
r7630 r7635 274 274 } 275 275 } 276 276 /// HACK DO WE HAVE TO CHECK THIS?? 277 277 //if ( didChanges ) 278 278 { 279 iniParser.debug();280 279 iniParser.writeFile( this->fileName ); 281 280 }
Note: See TracChangeset
for help on using the changeset viewer.