MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / handleHotkeys

Method handleHotkeys

source/modes/EditorMode.cpp:800–818  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

798}
799
800void 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
821void EditorMode::onFrameStarted(const Ogre::FrameEvent& evt)

Callers

nothing calls this directly

Calls 2

cameraFlyToMethod · 0.80
getCameraViewTargetMethod · 0.45

Tested by

no test coverage detected