Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7638 in orxonox.OLD for branches/qt_gui/src/lib/event/key_mapper.cc


Ignore:
Timestamp:
May 17, 2006, 11:36:39 AM (18 years ago)
Author:
bensch
Message:

orxonox/qt_gui: keynames get read

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/qt_gui/src/lib/event/key_mapper.cc

    r7636 r7638  
    2727#include "util/preferences.h"
    2828#include "key_names.h"
     29#include "event_def.h"
    2930#include "debug.h"
    3031
     
    7273 */
    7374KeyMapper::KeyMapping KeyMapper::map[] = {
    74   {&KeyMapper::PEV_FORWARD,              CONFIG_NAME_PLAYER_FORWARD},
    75   {&KeyMapper::PEV_BACKWARD,             CONFIG_NAME_PLAYER_BACKWARD},
    76   {&KeyMapper::PEV_UP,                   CONFIG_NAME_PLAYER_UP},
    77   {&KeyMapper::PEV_DOWN,                 CONFIG_NAME_PLAYER_DOWN},
    78   {&KeyMapper::PEV_LEFT,                 CONFIG_NAME_PLAYER_LEFT},
    79   {&KeyMapper::PEV_RIGHT,                CONFIG_NAME_PLAYER_RIGHT},
    80   {&KeyMapper::PEV_ROLL_LEFT,            CONFIG_NAME_PLAYER_ROLL_RIGHT},
    81   {&KeyMapper::PEV_ROLL_RIGHT,           CONFIG_NAME_PLAYER_ROLL_LEFT},
    82   {&KeyMapper::PEV_STRAFE_LEFT,          "StrafeLeft"},
    83   {&KeyMapper::PEV_STRAFE_RIGHT,         "StrafeRight"},
    84 
    85   {&KeyMapper::PEV_FIRE1,                CONFIG_NAME_PLAYER_FIRE},
    86   {&KeyMapper::PEV_FIRE1,                "Fire1"},
    87   {&KeyMapper::PEV_FIRE2,                "Fire2"},
    88   {&KeyMapper::PEV_NEXT_WEAPON,          CONFIG_NAME_PLAYER_NEXT_WEAPON},
    89   {&KeyMapper::PEV_PREVIOUS_WEAPON,      CONFIG_NAME_PLAYER_PREV_WEAPON},
    90 
    91   {&KeyMapper::PEV_CHANGE_SHIP,          CONFIG_NAME_PLAYER_CHANGE_SHIP},
    92 
    93 
    94   {&KeyMapper::PEV_VIEW0,                CONFIG_NAME_VIEW0},
    95   {&KeyMapper::PEV_VIEW1,                CONFIG_NAME_VIEW1},
    96   {&KeyMapper::PEV_VIEW2,                CONFIG_NAME_VIEW2},
    97   {&KeyMapper::PEV_VIEW3,                CONFIG_NAME_VIEW3},
    98   {&KeyMapper::PEV_VIEW4,                CONFIG_NAME_VIEW4},
    99   {&KeyMapper::PEV_VIEW5,                CONFIG_NAME_VIEW5},
    100 
    101   {&KeyMapper::PEV_NEXT_WORLD,           CONFIG_NAME_NEXT_WORLD},
    102   {&KeyMapper::PEV_PREVIOUS_WORLD,       CONFIG_NAME_PREV_WORLD},
    103 
    104   {&KeyMapper::PEV_PAUSE,                CONFIG_NAME_PAUSE},
    105   {&KeyMapper::PEV_QUIT,                 CONFIG_NAME_QUIT},
    106   {NULL, ""}
     75  {&KeyMapper::PEV_FORWARD,              CONFIG_NAME_PLAYER_FORWARD,         SDLK_w},
     76  {&KeyMapper::PEV_BACKWARD,             CONFIG_NAME_PLAYER_BACKWARD,        SDLK_s},
     77  {&KeyMapper::PEV_UP,                   CONFIG_NAME_PLAYER_UP,              SDLK_r},
     78  {&KeyMapper::PEV_DOWN,                 CONFIG_NAME_PLAYER_DOWN,            SDLK_f},
     79  {&KeyMapper::PEV_LEFT,                 CONFIG_NAME_PLAYER_LEFT,            SDLK_a},
     80  {&KeyMapper::PEV_RIGHT,                CONFIG_NAME_PLAYER_RIGHT,           SDLK_d},
     81  {&KeyMapper::PEV_ROLL_RIGHT,           CONFIG_NAME_PLAYER_ROLL_LEFT,       SDLK_z},
     82  {&KeyMapper::PEV_ROLL_LEFT,            CONFIG_NAME_PLAYER_ROLL_RIGHT,      SDLK_c},
     83  {&KeyMapper::PEV_STRAFE_LEFT,          "StrafeLeft",                       SDLK_q},
     84  {&KeyMapper::PEV_STRAFE_RIGHT,         "StrafeRight",                      SDLK_e},
     85
     86  {&KeyMapper::PEV_FIRE1,                CONFIG_NAME_PLAYER_FIRE,            EV_MOUSE_BUTTON_LEFT},
     87  {&KeyMapper::PEV_FIRE2,                "Fire2",                            EV_MOUSE_BUTTON_RIGHT},
     88  {&KeyMapper::PEV_NEXT_WEAPON,          CONFIG_NAME_PLAYER_NEXT_WEAPON,     EV_MOUSE_BUTTON_WHEELUP},
     89  {&KeyMapper::PEV_PREVIOUS_WEAPON,      CONFIG_NAME_PLAYER_PREV_WEAPON,     EV_MOUSE_BUTTON_WHEELDOWN},
     90
     91  {&KeyMapper::PEV_CHANGE_SHIP,          CONFIG_NAME_PLAYER_CHANGE_SHIP,     SDLK_g},
     92
     93
     94  {&KeyMapper::PEV_VIEW0,                CONFIG_NAME_VIEW0,                  SDLK_1},
     95  {&KeyMapper::PEV_VIEW1,                CONFIG_NAME_VIEW1,                  SDLK_2},
     96  {&KeyMapper::PEV_VIEW2,                CONFIG_NAME_VIEW2,                  SDLK_3},
     97  {&KeyMapper::PEV_VIEW3,                CONFIG_NAME_VIEW3,                  SDLK_4},
     98  {&KeyMapper::PEV_VIEW4,                CONFIG_NAME_VIEW4,                  SDLK_5},
     99  {&KeyMapper::PEV_VIEW5,                CONFIG_NAME_VIEW5,                  SDLK_6},
     100
     101  {&KeyMapper::PEV_NEXT_WORLD,           CONFIG_NAME_NEXT_WORLD,             SDLK_x},
     102  {&KeyMapper::PEV_PREVIOUS_WORLD,       CONFIG_NAME_PREV_WORLD,             SDLK_z},
     103
     104  {&KeyMapper::PEV_PAUSE,                CONFIG_NAME_PAUSE,                  SDLK_p},
     105  {&KeyMapper::PEV_QUIT,                 CONFIG_NAME_QUIT,                   SDLK_ESCAPE},
     106  {NULL, "", 0}
    107107};
    108108
Note: See TracChangeset for help on using the changeset viewer.