mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-08 17:03:11 +02:00
disabled P shortcut and re-enabled in metaverse
This commit is contained in:
parent
eb1cb3b11c
commit
07c71cbadb
2 changed files with 8 additions and 21 deletions
|
@ -4429,27 +4429,6 @@ void Application::keyPressEvent(QKeyEvent* event) {
|
|||
}
|
||||
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: {
|
||||
if (isMeta) {
|
||||
auto cursor = Cursor::Manager::instance().getCursor();
|
||||
|
|
|
@ -12,11 +12,19 @@
|
|||
//
|
||||
|
||||
(function () { // BEGIN LOCAL_SCOPE
|
||||
var snapActivateSound = SoundCache.getSound(Script.resourcesPath() + "sounds/snapshot/snap.wav");
|
||||
function keyPressEvent(event) {
|
||||
if (event.text.toUpperCase() === "B" && event.isControl) {
|
||||
Window.openWebBrowser();
|
||||
} else if (event.text.toUpperCase() === "N" && event.isControl) {
|
||||
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