From f521a129b67c5f74497503e505cc881c02220778 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Tue, 13 Mar 2018 10:07:34 -0700 Subject: [PATCH] fixing issues --- .../resources/controllers/keyboardMouse.json | 3 -- .../qml/hifi/dialogs/RunningScripts.qml | 1 + interface/src/Application.cpp | 29 +++++++++---------- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/interface/resources/controllers/keyboardMouse.json b/interface/resources/controllers/keyboardMouse.json index 58d8b7e689..d44b150ab1 100644 --- a/interface/resources/controllers/keyboardMouse.json +++ b/interface/resources/controllers/keyboardMouse.json @@ -1,9 +1,6 @@ { "name": "Keyboard/Mouse to Actions", "channels": [ - - { "from": "Keyboard.A", "when": "Keyboard.Shift", "to": "Actions.LATERAL_LEFT" }, - { "from": "Keyboard.D", "when": "Keyboard.Shift", "to": "Actions.LATERAL_RIGHT" }, { "from": "Keyboard.A", "when": "Keyboard.RightMouseButton", "to": "Actions.LATERAL_LEFT" }, { "from": "Keyboard.D", "when": "Keyboard.RightMouseButton", "to": "Actions.LATERAL_RIGHT" }, { "from": "Keyboard.E", "to": "Actions.LATERAL_RIGHT" }, diff --git a/interface/resources/qml/hifi/dialogs/RunningScripts.qml b/interface/resources/qml/hifi/dialogs/RunningScripts.qml index 00273171df..9e3ebcbab0 100644 --- a/interface/resources/qml/hifi/dialogs/RunningScripts.qml +++ b/interface/resources/qml/hifi/dialogs/RunningScripts.qml @@ -25,6 +25,7 @@ ScrollingWindow { resizable: true destroyOnHidden: false implicitWidth: 424 + opacity: parent.opacity implicitHeight: isHMD ? 695 : 728 minSize: Qt.vector2d(424, 300) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index d6e0deff22..22e6ad48ce 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3419,22 +3419,21 @@ void Application::keyPressEvent(QKeyEvent* event) { } break; - case Qt::Key_Print: - if (!isOption && !isShifted && isMeta) { - AudioInjectorOptions options; - options.localOnly = true; - options.stereo = true; + case Qt::Key_P: { + AudioInjectorOptions options; + options.localOnly = true; + options.stereo = true; - if (_snapshotSoundInjector) { - _snapshotSoundInjector->setOptions(options); - _snapshotSoundInjector->restart(); - } else { - QByteArray samples = _snapshotSound->getByteArray(); - _snapshotSoundInjector = AudioInjector::playSound(samples, options); - } - takeSnapshot(true); + if (_snapshotSoundInjector) { + _snapshotSoundInjector->setOptions(options); + _snapshotSoundInjector->restart(); + } else { + QByteArray samples = _snapshotSound->getByteArray(); + _snapshotSoundInjector = AudioInjector::playSound(samples, options); } + takeSnapshot(true); break; + } case Qt::Key_Apostrophe: { if (isMeta) { @@ -5120,11 +5119,11 @@ void Application::update(float deltaTime) { // FIXME can we drop drive keys and just have the avatar read the action states directly? myAvatar->clearDriveKeys(); if (_myCamera.getMode() != CAMERA_MODE_INDEPENDENT) { - if (!_controllerScriptingInterface->areActionsCaptured()) { + if (!_controllerScriptingInterface->areActionsCaptured() && _myCamera.getMode() != CAMERA_MODE_MIRROR) { myAvatar->setDriveKey(MyAvatar::TRANSLATE_Z, -1.0f * userInputMapper->getActionState(controller::Action::TRANSLATE_Z)); myAvatar->setDriveKey(MyAvatar::TRANSLATE_Y, userInputMapper->getActionState(controller::Action::TRANSLATE_Y)); myAvatar->setDriveKey(MyAvatar::TRANSLATE_X, userInputMapper->getActionState(controller::Action::TRANSLATE_X)); - if (deltaTime > FLT_EPSILON && _myCamera.getMode() != CAMERA_MODE_MIRROR) { + if (deltaTime > FLT_EPSILON) { myAvatar->setDriveKey(MyAvatar::PITCH, -1.0f * userInputMapper->getActionState(controller::Action::PITCH)); myAvatar->setDriveKey(MyAvatar::YAW, -1.0f * userInputMapper->getActionState(controller::Action::YAW)); myAvatar->setDriveKey(MyAvatar::STEP_YAW, -1.0f * userInputMapper->getActionState(controller::Action::STEP_YAW));