tweaks to how VrMenu is shown

This commit is contained in:
Brad Hefta-Gaub 2015-11-01 09:55:30 -08:00
parent 77816d818a
commit e899229cde
2 changed files with 5 additions and 4 deletions

View file

@ -81,6 +81,7 @@
{ "from": "Keyboard.Space", "to": "Actions.SHIFT" },
{ "from": "Keyboard.R", "to": "Actions.ACTION1" },
{ "from": "Keyboard.T", "to": "Actions.ACTION2" }
{ "from": "Keyboard.T", "to": "Actions.ACTION2" },
{ "from": "Keyboard.RightMouseClick", "to": "Actions.ContextMenu" }
]
}

View file

@ -635,6 +635,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) :
DependencyManager::get<AudioClient>()->toggleMute();
} else if (action == controller::toInt(controller::Action::CYCLE_CAMERA)) {
cycleCamera();
} else if (action == controller::toInt(controller::Action::CONTEXT_MENU)) {
VrMenu::toggle(); // show context menu even on non-stereo displays
}
}
});
@ -1789,9 +1791,7 @@ void Application::keyPressEvent(QKeyEvent* event) {
void Application::keyReleaseEvent(QKeyEvent* event) {
if (event->key() == Qt::Key_Alt && _altPressed && hasFocus()) {
if (getActiveDisplayPlugin()->isStereo()) {
VrMenu::toggle();
}
VrMenu::toggle(); // show context menu even on non-stereo displays
}
_keysPressed.remove(event->key());