Changeset 1237
- Timestamp:
- May 6, 2008, 3:01:27 PM (17 years ago)
- Location:
- code/branches/input/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/input/src/core/InputBuffer.cc
r1236 r1237 1 1 /* 2 * ORXONOX - the hottest 3D action shooter ever to exist3 * > www.orxonox.net <4 *5 *6 * License notice:7 *8 * This program is free software; you can redistribute it and/or9 * modify it under the terms of the GNU General Public License10 * as published by the Free Software Foundation; either version 211 * of the License, or (at your option) any later version.12 *13 * This program is distributed in the hope that it will be useful,14 * but WITHOUT ANY WARRANTY; without even the implied warranty of15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the16 * GNU General Public License for more details.17 *18 * You should have received a copy of the GNU General Public License19 * along with this program; if not, write to the Free Software20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.21 *22 * Author:23 * Fabian 'x3n' Landau24 * Co-authors:25 * Reto Grieder26 *27 */2 * ORXONOX - the hottest 3D action shooter ever to exist 3 * > www.orxonox.net < 4 * 5 * 6 * License notice: 7 * 8 * This program is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU General Public License 10 * as published by the Free Software Foundation; either version 2 11 * of the License, or (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program; if not, write to the Free Software 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 * 22 * Author: 23 * Fabian 'x3n' Landau 24 * Co-authors: 25 * Reto Grieder 26 * 27 */ 28 28 29 29 #include "InputBuffer.h" -
code/branches/input/src/core/InputBuffer.h
r1236 r1237 1 1 /* 2 * ORXONOX - the hottest 3D action shooter ever to exist3 * > www.orxonox.net <4 *5 *6 * License notice:7 *8 * This program is free software; you can redistribute it and/or9 * modify it under the terms of the GNU General Public License10 * as published by the Free Software Foundation; either version 211 * of the License, or (at your option) any later version.12 *13 * This program is distributed in the hope that it will be useful,14 * but WITHOUT ANY WARRANTY; without even the implied warranty of15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the16 * GNU General Public License for more details.17 *18 * You should have received a copy of the GNU General Public License19 * along with this program; if not, write to the Free Software20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.21 *22 * Author:23 * Fabian 'x3n' Landau24 * Co-authors:25 * ... 26 *27 */2 * ORXONOX - the hottest 3D action shooter ever to exist 3 * > www.orxonox.net < 4 * 5 * 6 * License notice: 7 * 8 * This program is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU General Public License 10 * as published by the Free Software Foundation; either version 2 11 * of the License, or (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program; if not, write to the Free Software 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 * 22 * Author: 23 * Fabian 'x3n' Landau 24 * Co-authors: 25 * Reto Grieder 26 * 27 */ 28 28 29 29 #ifndef _InputBuffer_H__ -
code/branches/input/src/core/InputHandler.cc
r1236 r1237 55 55 std::string keyNames[] = { 56 56 "UNASSIGNED", 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 57 "ESCAPE", 58 "1", 59 "2", 60 "3", 61 "4", 62 "5", 63 "6", 64 "7", 65 "8", 66 "9", 67 "0", 68 "MINUS", 69 "EQUALS", 70 "BACK", 71 "TAB", 72 "Q", 73 "W", 74 "E", 75 "R", 76 "T", 77 "Y", 78 "U", 79 "I", 80 "O", 81 "P", 82 "LBRACKET", 83 "RBRACKET", 84 "RETURN", 85 "LCONTROL", 86 "A", 87 "S", 88 "D", 89 "F", 90 "G", 91 "H", 92 "J", 93 "K", 94 "L", 95 "SEMICOLON", 96 "APOSTROPHE", 97 "GRAVE", 98 "LSHIFT", 99 "BACKSLASH", 100 "Z", 101 "X", 102 "C", 103 "V", 104 "B", 105 "N", 106 "M", 107 "COMMA", 108 "PERIOD", 109 "SLASH", 110 "RSHIFT", 111 "MULTIPLY", 112 "LMENU", 113 "SPACE", 114 "CAPITAL", 115 "F1", 116 "F2", 117 "F3", 118 "F4", 119 "F5", 120 "F6", 121 "F7", 122 "F8", 123 "F9", 124 "F10", 125 "NUMLOCK", 126 "SCROLL", 127 "NUMPAD7", 128 "NUMPAD8", 129 "NUMPAD9", 130 "SUBTRACT", 131 "NUMPAD4", 132 "NUMPAD5", 133 "NUMPAD6", 134 "ADD", 135 "NUMPAD1", 136 "NUMPAD2", 137 "NUMPAD3", 138 "NUMPAD0", 139 "DECIMAL", 140 140 "","", 141 142 143 141 "OEM_102", 142 "F11", 143 "F12", 144 144 "","","","","","","","","","","", 145 146 147 145 "F13", 146 "F14", 147 "F15", 148 148 "","","","","","","","","","", 149 149 "KANA", 150 150 "","", 151 151 "ABNT_C1", 152 152 "","","","","", 153 154 "", 155 156 "", 157 158 153 "CONVERT", 154 "", 155 "NOCONVERT", 156 "", 157 "YEN", 158 "ABNT_C2", 159 159 "","","","","","","","","","","","","","", 160 160 "NUMPADEQUALS", 161 161 "","", 162 163 164 165 166 167 168 169 170 162 "PREVTRACK", 163 "AT", 164 "COLON", 165 "UNDERLINE", 166 "KANJI", 167 "STOP", 168 "AX", 169 "UNLABELED", 170 "NEXTTRACK", 171 171 "","", 172 173 172 "NUMPADENTER", 173 "RCONTROL", 174 174 "","", 175 176 177 178 "", 179 175 "MUTE", 176 "CALCULATOR", 177 "PLAYPAUSE", 178 "", 179 "MEDIASTOP", 180 180 "","","","","","","","","", 181 182 "", 183 184 "", 185 186 187 "", 188 189 "", 190 191 181 "VOLUMEDOWN", 182 "", 183 "VOLUMEUP", 184 "", 185 "WEBHOME", 186 "NUMPADCOMMA", 187 "", 188 "DIVIDE", 189 "", 190 "SYSRQ", 191 "RMENU", 192 192 "","","","","","","","","","","","", 193 194 "", 195 196 197 198 "", 199 200 "", 201 202 "", 203 204 205 206 207 193 "PAUSE", 194 "", 195 "HOME", 196 "UP", 197 "PGUP", 198 "", 199 "LEFT", 200 "", 201 "RIGHT", 202 "", 203 "END", 204 "DOWN", 205 "PGDOWN", 206 "INSERT", 207 "DELETE", 208 208 "","","","","","","", 209 210 211 212 213 209 "LWIN", 210 "RWIN", 211 "APPS", 212 "POWER", 213 "SLEEP", 214 214 "","","", 215 216 "", 217 218 219 220 221 222 223 224 225 215 "WAKE", 216 "", 217 "WEBSEARCH", 218 "WEBFAVORITES", 219 "WEBREFRESH", 220 "WEBSTOP", 221 "WEBFORWARD", 222 "WEBBACK", 223 "MYCOMPUTER", 224 "MAIL", 225 "MEDIASELECT" 226 226 }; 227 227 for (int i = 0; i < numberOfKeys_s; i++) … … 562 562 //bool GUIInputHandler::keyPressed(const OIS::KeyEvent &e) 563 563 //{ 564 565 564 ////CEGUI::System::getSingleton().injectKeyDown( arg.key ); 565 ////CEGUI::System::getSingleton().injectChar( arg.text ); 566 566 // return true; 567 567 //} … … 573 573 //bool GUIInputHandler::keyReleased(const OIS::KeyEvent &e) 574 574 //{ 575 575 ////CEGUI::System::getSingleton().injectKeyUp( arg.key ); 576 576 // return true; 577 577 //} … … 583 583 //bool GUIInputHandler::mouseMoved(const OIS::MouseEvent &e) 584 584 //{ 585 585 ////CEGUI::System::getSingleton().injectMouseMove( arg.state.X.rel, arg.state.Y.rel ); 586 586 // return true; 587 587 //} … … 594 594 //bool GUIInputHandler::mousePressed(const OIS::MouseEvent &e, OIS::MouseButton id) 595 595 //{ 596 596 ////CEGUI::System::getSingleton().injectMouseButtonDown(convertOISMouseButtonToCegui(id)); 597 597 // return true; 598 598 //} … … 605 605 //bool GUIInputHandler::mouseReleased(const OIS::MouseEvent &e, OIS::MouseButton id) 606 606 //{ 607 607 ////CEGUI::System::getSingleton().injectMouseButtonUp(convertOISMouseButtonToCegui(id)); 608 608 // return true; 609 609 //} -
code/branches/input/src/core/InputHandler.h
r1236 r1237 95 95 bool mouseWheelTurned (const MouseState& state); 96 96 97 98 97 bool joyStickButtonPressed (const JoyStickState& state, int button); 98 bool joyStickButtonReleased(const JoyStickState& state, int button); 99 99 bool joyStickButtonHeld (const JoyStickState& state, int button); 100 101 102 103 100 bool joyStickAxisMoved (const JoyStickState& state, int axis) ; 101 bool joyStickSliderMoved (const JoyStickState& state, int index) ; 102 bool joyStickPovMoved (const JoyStickState& state, int index) ; 103 bool joyStickVector3Moved (const JoyStickState& state, int index) ; 104 104 105 105 private: // variables … … 153 153 //private: 154 154 // // input events 155 156 157 155 //bool keyPressed (const OIS::KeyEvent &arg); 156 //bool keyReleased (const OIS::KeyEvent &arg); 157 //bool keyHeld (const OIS::KeyEvent &arg); 158 158 159 159 // bool mousePressed (const OIS::MouseEvent &arg, OIS::MouseButton id); 160 161 160 //bool mouseReleased(const OIS::MouseEvent &arg, OIS::MouseButton id); 161 //bool mouseHeld (const OIS::MouseEvent &arg, OIS::MouseButton id); 162 162 // bool mouseMoved (const OIS::MouseEvent &arg); 163 163 164 165 166 167 168 169 164 //bool buttonPressed (const OIS::JoyStickEvent &arg, int button); 165 //bool buttonReleased(const OIS::JoyStickEvent &arg, int button); 166 //bool buttonHeld (const OIS::JoyStickEvent &arg, int button); 167 //bool axisMoved (const OIS::JoyStickEvent &arg, int axis); 168 //bool sliderMoved (const OIS::JoyStickEvent &arg, int id); 169 //bool povMoved (const OIS::JoyStickEvent &arg, int id); 170 170 //}; 171 171 -
code/branches/input/src/core/InputInterfaces.h
r1236 r1237 30 30 @file 31 31 @brief Declarations of various interface classes for the input management. 32 32 */ 33 33 34 34 #ifndef _InputInterfaces_H__ … … 43 43 namespace KeyCode 44 44 { 45 enum Enum 46 { 47 Unassigned = OIS::KC_UNASSIGNED, 48 Escape = OIS::KC_ESCAPE, 49 _1 = OIS::KC_1, 50 _2 = OIS::KC_2, 51 _3 = OIS::KC_3, 52 _4 = OIS::KC_4, 53 _5 = OIS::KC_5, 45 // note: KeyCode comments were directly taken from OISKeyboard.h 46 enum Enum 47 { 48 Unassigned = OIS::KC_UNASSIGNED, 49 Escape = OIS::KC_ESCAPE, 50 _1 = OIS::KC_1, 51 _2 = OIS::KC_2, 52 _3 = OIS::KC_3, 53 _4 = OIS::KC_4, 54 _5 = OIS::KC_5, 54 55 _6 = OIS::KC_6, 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 56 _7 = OIS::KC_7, 57 _8 = OIS::KC_8, 58 _9 = OIS::KC_9, 59 _0 = OIS::KC_0, 60 Minus = OIS::KC_MINUS, // - on main keyboard 61 Equals = OIS::KC_EQUALS, 62 Back = OIS::KC_BACK, // backspace 63 Tab = OIS::KC_TAB, 64 Q = OIS::KC_Q, 65 W = OIS::KC_W, 66 E = OIS::KC_E, 67 R = OIS::KC_R, 68 T = OIS::KC_T, 69 Y = OIS::KC_Y, 70 U = OIS::KC_U, 71 I = OIS::KC_I, 72 O = OIS::KC_O, 73 P = OIS::KC_P, 74 LeftBracket = OIS::KC_LBRACKET, 75 RightBracket = OIS::KC_RBRACKET, 76 Return = OIS::KC_RETURN, // Enter on main keyboard 77 LeftControl = OIS::KC_LCONTROL, 78 A = OIS::KC_A, 79 S = OIS::KC_S, 80 D = OIS::KC_D, 81 F = OIS::KC_F, 82 G = OIS::KC_G, 83 H = OIS::KC_H, 84 J = OIS::KC_J, 85 K = OIS::KC_K, 86 L = OIS::KC_L, 87 Semicolon = OIS::KC_SEMICOLON, 88 Apostrophe = OIS::KC_APOSTROPHE, 89 Grave = OIS::KC_GRAVE, // accent 90 LeftShift = OIS::KC_LSHIFT, 91 Backslash = OIS::KC_BACKSLASH, 92 Z = OIS::KC_Z, 93 X = OIS::KC_X, 94 C = OIS::KC_C, 95 V = OIS::KC_V, 96 B = OIS::KC_B, 97 N = OIS::KC_N, 98 M = OIS::KC_M, 99 Comma = OIS::KC_COMMA, 100 Period = OIS::KC_PERIOD, // . on main keyboard 101 Slash = OIS::KC_SLASH, // / on main keyboard 102 RightShift = OIS::KC_RSHIFT, 103 Multiply = OIS::KC_MULTIPLY, // * on numeric keypad 104 LeftAlt = OIS::KC_LMENU, // left Alt 105 Space = OIS::KC_SPACE, 106 CapsLock = OIS::KC_CAPITAL, 107 F1 = OIS::KC_F1, 108 F2 = OIS::KC_F2, 109 F3 = OIS::KC_F3, 110 F4 = OIS::KC_F4, 111 F5 = OIS::KC_F5, 112 F6 = OIS::KC_F6, 113 F7 = OIS::KC_F7, 114 F8 = OIS::KC_F8, 115 F9 = OIS::KC_F9, 116 F10 = OIS::KC_F10, 117 Numlock = OIS::KC_NUMLOCK, 118 Scrolllock = OIS::KC_SCROLL, // Scroll Lock 119 Numpad7 = OIS::KC_NUMPAD7, 120 Numpad8 = OIS::KC_NUMPAD8, 121 Numpad9 = OIS::KC_NUMPAD9, 122 NumpadSubtract= OIS::KC_SUBTRACT, // - on numeric keypad 123 Numpad4 = OIS::KC_NUMPAD4, 124 Numpad5 = OIS::KC_NUMPAD5, 125 Numpad6 = OIS::KC_NUMPAD6, 126 NumpadAdd = OIS::KC_ADD, // + on numeric keypad 127 Numpad1 = OIS::KC_NUMPAD1, 128 Numpad2 = OIS::KC_NUMPAD2, 129 Numpad3 = OIS::KC_NUMPAD3, 130 Numpad0 = OIS::KC_NUMPAD0, 131 NumpadPeriod = OIS::KC_DECIMAL, // . on numeric keypad 132 LessThan = OIS::KC_OEM_102, // < > | on UK/Germany keyboards 133 F11 = OIS::KC_F11, 134 F12 = OIS::KC_F12, 135 F13 = OIS::KC_F13, // (NEC PC98) 136 F14 = OIS::KC_F14, // (NEC PC98) 137 F15 = OIS::KC_F15, // (NEC PC98) 138 Kana = OIS::KC_KANA, // (Japanese keyboard) 139 ABNT_C1 = OIS::KC_ABNT_C1, // / ? on Portugese (Brazilian) keyboards 140 Convert = OIS::KC_CONVERT, // (Japanese keyboard) 141 NoConvert = OIS::KC_NOCONVERT, // (Japanese keyboard) 142 Yen = OIS::KC_YEN, // (Japanese keyboard) 143 ABNT_C2 = OIS::KC_ABNT_C2, // Numpad . on Portugese (Brazilian) keyboards 144 NumpadEquals = OIS::KC_NUMPADEQUALS, // = on numeric keypad (NEC PC98) 145 PreviousTrack = OIS::KC_PREVTRACK, // Previous Track (KC_CIRCUMFLEX on Japanese keyboard) 146 AT = OIS::KC_AT, // (NEC PC98) 147 Colon = OIS::KC_COLON, // (NEC PC98) 148 Underline = OIS::KC_UNDERLINE, // (NEC PC98) 149 Kanji = OIS::KC_KANJI, // (Japanese keyboard) 150 Stop = OIS::KC_STOP, // (NEC PC98) 151 AX = OIS::KC_AX, // (Japan AX) 152 Unlabeled = OIS::KC_UNLABELED, // (J3100) 153 NextTrack = OIS::KC_NEXTTRACK, // Next Track 154 NumpadEnter = OIS::KC_NUMPADENTER, // Enter on numeric keypad 155 RightControl = OIS::KC_RCONTROL, 156 Mute = OIS::KC_MUTE, // Mute 157 Calculator = OIS::KC_CALCULATOR, // Calculator 158 PlayPause = OIS::KC_PLAYPAUSE, // Play / Pause 159 MediaStop = OIS::KC_MEDIASTOP, // Media Stop 160 VolumeDown = OIS::KC_VOLUMEDOWN, // Volume - 161 VolumeUp = OIS::KC_VOLUMEUP, // Volume + 162 WebHome = OIS::KC_WEBHOME, // Web home 163 NumpadComma = OIS::KC_NUMPADCOMMA, // , on numeric keypad (NEC PC98) 164 Divide = OIS::KC_DIVIDE, // / on numeric keypad 165 SYSRQ = OIS::KC_SYSRQ, 166 RightAlt = OIS::KC_RMENU, // right Alt 167 Pause = OIS::KC_PAUSE, // Pause 168 Home = OIS::KC_HOME, // Home on arrow keypad 169 Up = OIS::KC_UP, // UpArrow on arrow keypad 170 PageUp = OIS::KC_PGUP, // PgUp on arrow keypad 171 Left = OIS::KC_LEFT, // LeftArrow on arrow keypad 172 Right = OIS::KC_RIGHT, // RightArrow on arrow keypad 173 End = OIS::KC_END, // End on arrow keypad 174 Down = OIS::KC_DOWN, // DownArrow on arrow keypad 175 PageDown = OIS::KC_PGDOWN, // PgDn on arrow keypad 176 Insert = OIS::KC_INSERT, // Insert on arrow keypad 177 Delete = OIS::KC_DELETE, // Delete on arrow keypad 178 LeftWindows = OIS::KC_LWIN, // Left Windows key 179 RightWindows = OIS::KC_RWIN, // Right Windows key 180 Apps = OIS::KC_APPS, // AppMenu key 181 Power = OIS::KC_POWER, // System Power 182 Sleep = OIS::KC_SLEEP, // System Sleep 183 Wake = OIS::KC_WAKE, // System Wake 184 WebSearch = OIS::KC_WEBSEARCH, // Web Search 185 WebFavorites = OIS::KC_WEBFAVORITES, // Web Favorites 186 WebRefresh = OIS::KC_WEBREFRESH, // Web Refresh 187 WebStop = OIS::KC_WEBSTOP, // Web Stop 188 WebForward = OIS::KC_WEBFORWARD, // Web Forward 189 WebBack = OIS::KC_WEBBACK, // Web Back 190 MyComputer = OIS::KC_MYCOMPUTER, // My Computer 191 Mail = OIS::KC_MAIL, // Mail 192 MediaSelect = OIS::KC_MEDIASELECT // Media Select 193 }; 193 194 } 194 195 195 /*using OIS::KC_UNASSIGNED;196 using OIS::KC_ESCAPE;197 using OIS::KC_1;198 using OIS::KC_2;199 using OIS::KC_3;200 using OIS::KC_4;201 using OIS::KC_5;202 using OIS::KC_6;203 using OIS::KC_7;204 using OIS::KC_8;205 using OIS::KC_9;206 using OIS::KC_0;207 using OIS::KC_MINUS;208 using OIS::KC_EQUALS;209 using OIS::KC_BACK;210 using OIS::KC_TAB;211 using OIS::KC_Q;212 using OIS::KC_W;213 using OIS::KC_E;214 using OIS::KC_R;215 using OIS::KC_T;216 using OIS::KC_Y;217 using OIS::KC_U;218 using OIS::KC_I;219 using OIS::KC_O;220 using OIS::KC_P;221 using OIS::KC_LBRACKET;222 using OIS::KC_RBRACKET;223 using OIS::KC_RETURN;224 using OIS::KC_LCONTROL;225 using OIS::KC_A;226 using OIS::KC_S;227 using OIS::KC_D;228 using OIS::KC_F;229 using OIS::KC_G;230 using OIS::KC_H;231 using OIS::KC_J;232 using OIS::KC_K;233 using OIS::KC_L;234 using OIS::KC_SEMICOLON;235 using OIS::KC_APOSTROPHE;236 using OIS::KC_GRAVE;237 using OIS::KC_LSHIFT;238 using OIS::KC_BACKSLASH;239 using OIS::KC_Z;240 using OIS::KC_X;241 using OIS::KC_C;242 using OIS::KC_V;243 using OIS::KC_B;244 using OIS::KC_N;245 using OIS::KC_M;246 using OIS::KC_COMMA;247 using OIS::KC_PERIOD;248 using OIS::KC_SLASH;249 using OIS::KC_RSHIFT;250 using OIS::KC_MULTIPLY;251 using OIS::KC_LMENU;252 using OIS::KC_SPACE;253 using OIS::KC_CAPITAL;254 using OIS::KC_F1;255 using OIS::KC_F2;256 using OIS::KC_F3;257 using OIS::KC_F4;258 using OIS::KC_F5;259 using OIS::KC_F6;260 using OIS::KC_F7;261 using OIS::KC_F8;262 using OIS::KC_F9;263 using OIS::KC_F10;264 using OIS::KC_NUMLOCK;265 using OIS::KC_SCROLL;266 using OIS::KC_NUMPAD7;267 using OIS::KC_NUMPAD8;268 using OIS::KC_NUMPAD9;269 using OIS::KC_SUBTRACT;270 using OIS::KC_NUMPAD4;271 using OIS::KC_NUMPAD5;272 using OIS::KC_NUMPAD6;273 using OIS::KC_ADD;274 using OIS::KC_NUMPAD1;275 using OIS::KC_NUMPAD2;276 using OIS::KC_NUMPAD3;277 using OIS::KC_NUMPAD0;278 using OIS::KC_DECIMAL;279 using OIS::KC_OEM_102;280 using OIS::KC_F11;281 using OIS::KC_F12;282 using OIS::KC_F13;283 using OIS::KC_F14;284 using OIS::KC_F15;285 using OIS::KC_KANA;286 using OIS::KC_ABNT_C1;287 using OIS::KC_CONVERT;288 using OIS::KC_NOCONVERT;289 using OIS::KC_YEN;290 using OIS::KC_ABNT_C2;291 using OIS::KC_NUMPADEQUALS;292 using OIS::KC_PREVTRACK;293 using OIS::KC_AT;294 using OIS::KC_COLON;295 using OIS::KC_UNDERLINE;296 using OIS::KC_KANJI;297 using OIS::KC_STOP;298 using OIS::KC_AX;299 using OIS::KC_UNLABELED;300 using OIS::KC_NEXTTRACK;301 using OIS::KC_NUMPADENTER;302 using OIS::KC_RCONTROL;303 using OIS::KC_MUTE;304 using OIS::KC_CALCULATOR;305 using OIS::KC_PLAYPAUSE;306 using OIS::KC_MEDIASTOP;307 using OIS::KC_VOLUMEDOWN;308 using OIS::KC_VOLUMEUP;309 using OIS::KC_WEBHOME;310 using OIS::KC_NUMPADCOMMA;311 using OIS::KC_DIVIDE;312 using OIS::KC_SYSRQ;313 using OIS::KC_RMENU;314 using OIS::KC_PAUSE;315 using OIS::KC_HOME;316 using OIS::KC_UP;317 using OIS::KC_PGUP;318 using OIS::KC_LEFT;319 using OIS::KC_RIGHT;320 using OIS::KC_END;321 using OIS::KC_DOWN;322 using OIS::KC_PGDOWN;323 using OIS::KC_INSERT;324 using OIS::KC_DELETE;325 using OIS::KC_LWIN;326 using OIS::KC_RWIN;327 using OIS::KC_APPS;328 using OIS::KC_POWER;329 using OIS::KC_SLEEP;330 using OIS::KC_WAKE;331 using OIS::KC_WEBSEARCH;332 using OIS::KC_WEBFAVORITES;333 using OIS::KC_WEBREFRESH;334 using OIS::KC_WEBSTOP;335 using OIS::KC_WEBFORWARD;336 using OIS::KC_WEBBACK;337 using OIS::KC_MYCOMPUTER;338 using OIS::KC_MAIL;339 using OIS::KC_MEDIASELECT;340 }341 typedef OIS::KeyCode KeyCode;*/342 343 //typedef OIS::MouseButton MouseButton;344 345 196 namespace MouseButton 346 197 { … … 358 209 } 359 210 360 /*using OIS::MB_Left;361 using OIS::MB_Right;362 using OIS::MB_Middle;363 using OIS::MB_Button3;364 using OIS::MB_Button4;365 using OIS::MB_Button5;366 using OIS::MB_Button6;367 using OIS::MB_Button7;*/368 369 211 namespace KeyboardModifier 370 212 { 371 213 enum Enum 372 214 { 373 374 375 215 Shift = 0x0000001, 216 Ctrl = 0x0000010, 217 Alt = 0x0000100 376 218 }; 377 219 } … … 392 234 { 393 235 public: 394 236 KeyEvent(KeyCode::Enum key, unsigned int text) : key(key), text(text) { } 395 237 KeyEvent(const OIS::KeyEvent& evt, unsigned int mod) : key((KeyCode::Enum)evt.key), text(evt.text), modifiers(mod) { } 396 238 KeyEvent(const Key& key, unsigned int mod) : key(key.key), text(key.text), modifiers(mod) { } 397 239 bool isModifierDown(KeyboardModifier::Enum modifier) const { return (KeyboardModifier::Enum)modifier&modifiers; } 398 240 399 400 241 const KeyCode::Enum key; 242 unsigned int text; 401 243 unsigned int modifiers; 402 244 }; … … 446 288 public: 447 289 virtual ~JoyStickHandler() { } 448 449 290 virtual bool joyStickButtonPressed (const JoyStickState& state, int button) = 0; 291 virtual bool joyStickButtonReleased(const JoyStickState& state, int button) = 0; 450 292 virtual bool joyStickButtonHeld (const JoyStickState& state, int button) = 0; 451 452 453 454 293 virtual bool joyStickAxisMoved (const JoyStickState& state, int axis) = 0; 294 virtual bool joyStickSliderMoved (const JoyStickState& state, int index) {return true;} 295 virtual bool joyStickPovMoved (const JoyStickState& state, int index) {return true;} 296 virtual bool joyStickVector3Moved (const JoyStickState& state, int index) {return true;} 455 297 }; 456 298 -
code/branches/input/src/core/InputManager.h
r1236 r1237 134 134 135 135 // input events 136 137 136 bool mousePressed (const OIS::MouseEvent &arg, OIS::MouseButtonID id); 137 bool mouseReleased (const OIS::MouseEvent &arg, OIS::MouseButtonID id); 138 138 bool mouseMoved (const OIS::MouseEvent &arg); 139 140 141 142 143 144 145 146 139 bool keyPressed (const OIS::KeyEvent &arg); 140 bool keyReleased (const OIS::KeyEvent &arg); 141 bool buttonPressed (const OIS::JoyStickEvent &arg, int button); 142 bool buttonReleased(const OIS::JoyStickEvent &arg, int button); 143 bool axisMoved (const OIS::JoyStickEvent &arg, int axis); 144 bool sliderMoved (const OIS::JoyStickEvent &arg, int id); 145 bool povMoved (const OIS::JoyStickEvent &arg, int id); 146 bool vector3Moved (const OIS::JoyStickEvent &arg, int id); 147 147 148 148 static InputManager& _getSingleton(); -
code/branches/input/src/orxonox/objects/SpaceShip.cc
r1236 r1237 246 246 247 247 COUT(4) << "Loader: Initialized spaceship steering with values " << maxSpeedForward_ << " " << maxSpeedRotateUpDown_ << " " << maxSpeedRotateRightLeft_ << " " << maxSpeedLoopRightLeft_ << " " << std::endl; 248 248 } 249 249 */ 250 250 if (xmlElem->Attribute("maxSpeed") && xmlElem->Attribute("maxSideAndBackSpeed") && xmlElem->Attribute("maxRotation") && xmlElem->Attribute("transAcc") && xmlElem->Attribute("rotAcc") && xmlElem->Attribute("transDamp") && xmlElem->Attribute("rotDamp")) … … 272 272 273 273 COUT(4) << "Loader: Initialized SpaceShip" << std::endl; 274 275 276 277 278 279 274 } 275 276 if (xmlElem->Attribute("camera")) 277 { 278 this->setCamera(); 279 } 280 280 } 281 281
Note: See TracChangeset
for help on using the changeset viewer.