mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 20:58:38 +02:00
Merge pull request #15917 from PrestonB1123/disablePShortcut
disabled P shortcut and re-enabled in metaverse
This commit is contained in:
commit
dd9b4a8143
2 changed files with 8 additions and 21 deletions
|
@ -4429,27 +4429,6 @@ void Application::keyPressEvent(QKeyEvent* event) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Qt::Key_P: {
|
|
||||||
if (!isShifted && !isMeta && !isOption && !event->isAutoRepeat()) {
|
|
||||||
AudioInjectorOptions options;
|
|
||||||
options.localOnly = true;
|
|
||||||
options.positionSet = false; // system sound
|
|
||||||
options.stereo = true;
|
|
||||||
|
|
||||||
Setting::Handle<bool> notificationSounds{ MenuOption::NotificationSounds, true };
|
|
||||||
Setting::Handle<bool> notificationSoundSnapshot{ MenuOption::NotificationSoundsSnapshot, true };
|
|
||||||
if (notificationSounds.get() && notificationSoundSnapshot.get()) {
|
|
||||||
if (_snapshotSoundInjector) {
|
|
||||||
DependencyManager::get<AudioInjectorManager>()->setOptionsAndRestart(_snapshotSoundInjector, options);
|
|
||||||
} else {
|
|
||||||
_snapshotSoundInjector = DependencyManager::get<AudioInjectorManager>()->playSound(_snapshotSound, options);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
takeSnapshot(true);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case Qt::Key_Apostrophe: {
|
case Qt::Key_Apostrophe: {
|
||||||
if (isMeta) {
|
if (isMeta) {
|
||||||
auto cursor = Cursor::Manager::instance().getCursor();
|
auto cursor = Cursor::Manager::instance().getCursor();
|
||||||
|
|
|
@ -12,11 +12,19 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
(function () { // BEGIN LOCAL_SCOPE
|
(function () { // BEGIN LOCAL_SCOPE
|
||||||
|
var snapActivateSound = SoundCache.getSound(Script.resourcesPath() + "sounds/snapshot/snap.wav");
|
||||||
function keyPressEvent(event) {
|
function keyPressEvent(event) {
|
||||||
if (event.text.toUpperCase() === "B" && event.isControl) {
|
if (event.text.toUpperCase() === "B" && event.isControl) {
|
||||||
Window.openWebBrowser();
|
Window.openWebBrowser();
|
||||||
} else if (event.text.toUpperCase() === "N" && event.isControl) {
|
} else if (event.text.toUpperCase() === "N" && event.isControl) {
|
||||||
Users.toggleIgnoreRadius();
|
Users.toggleIgnoreRadius();
|
||||||
|
} else if (event.text.toUpperCase() === "P") {
|
||||||
|
Audio.playSound(snapActivateSound, {
|
||||||
|
position: { x: MyAvatar.position.x, y: MyAvatar.position.y, z: MyAvatar.position.z },
|
||||||
|
localOnly: true,
|
||||||
|
volume: 0.5
|
||||||
|
});
|
||||||
|
Window.takeSnapshot(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue