mirror of
https://github.com/lubosz/overte.git
synced 2025-04-16 09:29:16 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi into mac-sleep-monitor
This commit is contained in:
commit
2eb3fdb1ec
7 changed files with 29 additions and 47 deletions
|
@ -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<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();
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include <regex>
|
||||
#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;
|
||||
|
|
|
@ -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 + ("\" ");
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -282,20 +282,7 @@ ItemKey entities::TextPayload::getKey() const {
|
|||
auto renderable = entityTreeRenderer->renderableForEntityId(_entityID);
|
||||
if (renderable) {
|
||||
auto textRenderable = std::static_pointer_cast<TextEntityRenderer>(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();
|
||||
|
|
|
@ -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