diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index a098f965d8..449e27b689 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -4445,27 +4445,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 notificationSounds{ MenuOption::NotificationSounds, true }; - Setting::Handle notificationSoundSnapshot{ MenuOption::NotificationSoundsSnapshot, true }; - if (notificationSounds.get() && notificationSoundSnapshot.get()) { - if (_snapshotSoundInjector) { - DependencyManager::get()->setOptionsAndRestart(_snapshotSoundInjector, options); - } else { - _snapshotSoundInjector = DependencyManager::get()->playSound(_snapshotSound, options); - } - } - takeSnapshot(true); - } - break; - } - case Qt::Key_Apostrophe: { if (isMeta) { auto cursor = Cursor::Manager::instance().getCursor(); diff --git a/launchers/darwin/src/Launcher.m b/launchers/darwin/src/Launcher.m index 71eb7828e9..1a84e9143d 100644 --- a/launchers/darwin/src/Launcher.m +++ b/launchers/darwin/src/Launcher.m @@ -442,7 +442,7 @@ static BOOL const DELETE_ZIP_FILES = TRUE; NSString* contentPath = [[self getDownloadPathForContentAndScripts] stringByAppendingString:@"content"]; NSString* displayName = [ self displayName]; - NSString* scriptsPath = [[self getAppPath] stringByAppendingString:@"interface.app/Contents/Resources/scripts/simplifiedUI/"]; + NSString* scriptsPath = [[self getAppPath] stringByAppendingString:@"interface.app/Contents/Resources/scripts/simplifiedUIBootstrapper.js"]; NSString* domainUrl = [[Settings sharedSettings] getDomainUrl]; NSString* userToken = [[Launcher sharedLauncher] getTokenString]; NSString* homeBookmark = [[NSString stringWithFormat:@"hqhome="] stringByAppendingString:domainUrl]; @@ -453,7 +453,7 @@ static BOOL const DELETE_ZIP_FILES = TRUE; @"--tokens", userToken, @"--cache", contentPath, @"--displayName", displayName, - @"--scripts", scriptsPath, + @"--defaultScriptsOverride", scriptsPath, @"--setBookmark", homeBookmark, @"--no-updater", @"--no-launcher", nil]; @@ -461,7 +461,7 @@ static BOOL const DELETE_ZIP_FILES = TRUE; arguments = [NSArray arrayWithObjects: @"--url" , domainUrl, @"--cache", contentPath, - @"--scripts", scriptsPath, + @"--defaultScriptsOverride", scriptsPath, @"--setBookmark", homeBookmark, @"--no-updater", @"--no-launcher", nil]; diff --git a/launchers/win32/LauncherDlg.cpp b/launchers/win32/LauncherDlg.cpp index 1b6b16d303..704a2f3050 100644 --- a/launchers/win32/LauncherDlg.cpp +++ b/launchers/win32/LauncherDlg.cpp @@ -9,6 +9,7 @@ // #include "stdafx.h" +#include #include "LauncherApp.h" #include "LauncherDlg.h" @@ -268,7 +269,10 @@ afx_msg void CLauncherDlg::OnNextClicked() { m_orgname.GetWindowTextW(orgname); m_username.GetWindowTextW(username); m_password.GetWindowTextW(password); - + // trim spaces + orgname = CString(std::regex_replace(LauncherUtils::cStringToStd(orgname), std::regex("^ +| +$|( ) +"), "$1").c_str()); + username = CString(std::regex_replace(LauncherUtils::cStringToStd(username), std::regex("^ +| +$|( ) +"), "$1").c_str()); + // encode username = LauncherUtils::urlEncodeString(username); password = LauncherUtils::urlEncodeString(password); LauncherUtils::ResponseError error; diff --git a/launchers/win32/LauncherManager.cpp b/launchers/win32/LauncherManager.cpp index e6c950596c..e56e0e71fc 100644 --- a/launchers/win32/LauncherManager.cpp +++ b/launchers/win32/LauncherManager.cpp @@ -296,8 +296,9 @@ HWND LauncherManager::launchApplication() { LauncherManager::getAndCreatePaths(PathType::Interface_Directory, installDir); CString interfaceExe = installDir + _T("\\interface.exe"); CString urlParam = _T("--url \"") + _domainURL + ("\" "); - CString scriptsURL = installDir + _T("\\scripts\\simplifiedUI"); - CString scriptsParam = _T("--scripts \"") + scriptsURL + ("\" "); + CString scriptsURL = installDir + _T("\\scripts\\simplifiedUIBootstrapper.js"); + scriptsURL.Replace(_T("\\"), _T("/")); + CString scriptsParam = _T("--defaultScriptsOverride \"") + scriptsURL + ("\" "); CString cacheDir; LauncherManager::getAndCreatePaths(PathType::Content_Directory, cacheDir); CString cacheParam = _T("--cache \"") + cacheDir + ("\" "); diff --git a/libraries/entities-renderer/src/RenderableEntityItem.cpp b/libraries/entities-renderer/src/RenderableEntityItem.cpp index f8bd6f8ce1..11e369b532 100644 --- a/libraries/entities-renderer/src/RenderableEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableEntityItem.cpp @@ -173,16 +173,19 @@ render::hifi::Layer EntityRenderer::getHifiRenderLayer() const { } ItemKey EntityRenderer::getKey() { + ItemKey::Builder builder = ItemKey::Builder().withTypeShape().withTypeMeta().withTagBits(getTagMask()).withLayer(getHifiRenderLayer()); + if (isTransparent()) { - return ItemKey::Builder::transparentShape().withTypeMeta().withTagBits(getTagMask()).withLayer(getHifiRenderLayer()); + builder.withTransparent(); + } else if (_canCastShadow) { + builder.withShadowCaster(); } - // This allows shapes to cast shadows - if (_canCastShadow) { - return ItemKey::Builder::opaqueShape().withTypeMeta().withTagBits(getTagMask()).withShadowCaster().withLayer(getHifiRenderLayer()); - } else { - return ItemKey::Builder::opaqueShape().withTypeMeta().withTagBits(getTagMask()).withLayer(getHifiRenderLayer()); + if (!_visible) { + builder.withInvisible(); } + + return builder; } uint32_t EntityRenderer::metaFetchMetaSubItems(ItemIDs& subItems) const { diff --git a/libraries/entities-renderer/src/RenderableTextEntityItem.cpp b/libraries/entities-renderer/src/RenderableTextEntityItem.cpp index 146b9861dc..0ead1de71a 100644 --- a/libraries/entities-renderer/src/RenderableTextEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableTextEntityItem.cpp @@ -282,20 +282,7 @@ ItemKey entities::TextPayload::getKey() const { auto renderable = entityTreeRenderer->renderableForEntityId(_entityID); if (renderable) { auto textRenderable = std::static_pointer_cast(renderable); - ItemKey::Builder key; - // Similar to EntityRenderer::getKey() - if (textRenderable->isTextTransparent()) { - key = ItemKey::Builder::transparentShape().withSubMetaCulled().withTagBits(textRenderable->getTagMask()).withLayer(textRenderable->getHifiRenderLayer()); - } else if (textRenderable->_canCastShadow) { - key = ItemKey::Builder::opaqueShape().withSubMetaCulled().withTagBits(textRenderable->getTagMask()).withShadowCaster().withLayer(textRenderable->getHifiRenderLayer()); - } else { - key = ItemKey::Builder::opaqueShape().withSubMetaCulled().withTagBits(textRenderable->getTagMask()).withLayer(textRenderable->getHifiRenderLayer()); - } - - if (!textRenderable->_visible) { - key.withInvisible(); - } - return key; + return ItemKey::Builder(textRenderable->getKey()).withoutMetaCullGroup().withSubMetaCulled(); } } return ItemKey::Builder::opaqueShape(); diff --git a/scripts/system/keyboardShortcuts/keyboardShortcuts.js b/scripts/system/keyboardShortcuts/keyboardShortcuts.js index cf3927ac2d..165928d089 100644 --- a/scripts/system/keyboardShortcuts/keyboardShortcuts.js +++ b/scripts/system/keyboardShortcuts/keyboardShortcuts.js @@ -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); } }