| 798 | } |
| 799 | |
| 800 | void EditorMode::handleHotkeys(OIS::KeyCode keycode) |
| 801 | { |
| 802 | //keycode minus two because the codes are shifted by two against the actual number |
| 803 | unsigned int keynumber = keycode - 2; |
| 804 | |
| 805 | ODFrameListener& frameListener = ODFrameListener::getSingleton(); |
| 806 | InputManager& inputManager = mModeManager->getInputManager(); |
| 807 | |
| 808 | if (getKeyboard()->isModifierDown(OIS::Keyboard::Shift)) |
| 809 | { |
| 810 | inputManager.mHotkeyLocationIsValid[keynumber] = true; |
| 811 | inputManager.mHotkeyLocation[keynumber] = frameListener.getCameraViewTarget(); |
| 812 | } |
| 813 | else |
| 814 | { |
| 815 | if (inputManager.mHotkeyLocationIsValid[keynumber]) |
| 816 | frameListener.cameraFlyTo(inputManager.mHotkeyLocation[keynumber]); |
| 817 | } |
| 818 | } |
| 819 | |
| 820 | //! Rendering methods |
| 821 | void EditorMode::onFrameStarted(const Ogre::FrameEvent& evt) |
nothing calls this directly
no test coverage detected