| 1070 | } |
| 1071 | |
| 1072 | void GameMode::handleHotkeys(OIS::KeyCode keycode) |
| 1073 | { |
| 1074 | ODFrameListener& frameListener = ODFrameListener::getSingleton(); |
| 1075 | InputManager& inputManager = mModeManager->getInputManager(); |
| 1076 | |
| 1077 | //keycode minus two because the codes are shifted by two against the actual number |
| 1078 | unsigned int keynumber = keycode - 2; |
| 1079 | |
| 1080 | if (getKeyboard()->isModifierDown(OIS::Keyboard::Shift)) |
| 1081 | { |
| 1082 | inputManager.mHotkeyLocationIsValid[keynumber] = true; |
| 1083 | inputManager.mHotkeyLocation[keynumber] = frameListener.getCameraViewTarget(); |
| 1084 | } |
| 1085 | else if (inputManager.mHotkeyLocationIsValid[keynumber]) |
| 1086 | { |
| 1087 | frameListener.cameraFlyTo(inputManager.mHotkeyLocation[keynumber]); |
| 1088 | } |
| 1089 | } |
| 1090 | |
| 1091 | void GameMode::onFrameStarted(const Ogre::FrameEvent& evt) |
| 1092 | { |
nothing calls this directly
no test coverage detected