mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-07 03:22:27 +02:00
Merge branch 'master' into feature/openvr-linux
This commit is contained in:
commit
901b3f5234
4 changed files with 63 additions and 36 deletions
Binary file not shown.
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 4.2 KiB |
|
@ -3,10 +3,10 @@
|
|||
//
|
||||
// Created by David Rowe on 3 Jun 2015
|
||||
// Copyright 2015 High Fidelity, Inc.
|
||||
// Copyright 2020 Vircadia contributors.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
//
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
import Hifi 1.0
|
||||
import QtQuick 2.4
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
//
|
||||
// Created by Clement on 7/18/16
|
||||
// Copyright 2015 High Fidelity, Inc.
|
||||
// Copyright 2020 Vircadia contributors.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
|
@ -486,6 +487,7 @@ Item {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
id: signUpContainer
|
||||
width: loginContainer.width
|
||||
|
@ -494,7 +496,7 @@ Item {
|
|||
anchors {
|
||||
left: loginContainer.left
|
||||
top: loginContainer.bottom
|
||||
topMargin: 0.15 * parent.height
|
||||
topMargin: 0.05 * parent.height
|
||||
}
|
||||
TextMetrics {
|
||||
id: signUpTextMetrics
|
||||
|
@ -542,37 +544,54 @@ Item {
|
|||
"errorString": "" });
|
||||
}
|
||||
}
|
||||
}
|
||||
TextMetrics {
|
||||
id: dismissButtonTextMetrics
|
||||
font: loginErrorMessage.font
|
||||
text: dismissButton.text
|
||||
}
|
||||
HifiControlsUit.Button {
|
||||
id: dismissButton
|
||||
width: dismissButtonTextMetrics.width
|
||||
height: d.minHeightButton
|
||||
anchors {
|
||||
bottom: parent.bottom
|
||||
right: parent.right
|
||||
margins: 3 * hifi.dimensions.contentSpacing.y
|
||||
}
|
||||
color: hifi.buttons.noneBorderlessWhite
|
||||
text: qsTr("No thanks, take me in-world! >")
|
||||
fontCapitalization: Font.MixedCase
|
||||
fontFamily: linkAccountBody.fontFamily
|
||||
fontSize: linkAccountBody.fontSize
|
||||
fontBold: linkAccountBody.fontBold
|
||||
visible: loginDialog.getLoginDialogPoppedUp() && !linkAccountBody.linkSteam && !linkAccountBody.linkOculus;
|
||||
onClicked: {
|
||||
if (linkAccountBody.loginDialogPoppedUp) {
|
||||
var data = {
|
||||
"action": "user dismissed login screen"
|
||||
};
|
||||
UserActivityLogger.logAction("encourageLoginDialog", data);
|
||||
loginDialog.dismissLoginDialog();
|
||||
|
||||
Text {
|
||||
id: signUpTextSecond
|
||||
text: qsTr("or")
|
||||
anchors {
|
||||
left: signUpShortcutText.right
|
||||
leftMargin: hifi.dimensions.contentSpacing.x
|
||||
}
|
||||
lineHeight: 1
|
||||
color: "white"
|
||||
font.family: linkAccountBody.fontFamily
|
||||
font.pixelSize: linkAccountBody.textFieldFontSize
|
||||
font.bold: linkAccountBody.fontBold
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
visible: loginDialog.getLoginDialogPoppedUp() && !linkAccountBody.linkSteam && !linkAccountBody.linkOculus;
|
||||
}
|
||||
|
||||
TextMetrics {
|
||||
id: dismissButtonTextMetrics
|
||||
font: loginErrorMessage.font
|
||||
text: dismissButton.text
|
||||
}
|
||||
HifiControlsUit.Button {
|
||||
id: dismissButton
|
||||
width: loginButton.width
|
||||
height: d.minHeightButton
|
||||
anchors {
|
||||
top: signUpText.bottom
|
||||
topMargin: hifi.dimensions.contentSpacing.y
|
||||
left: loginButton.left
|
||||
}
|
||||
text: qsTr("Use without account, log in anonymously")
|
||||
fontCapitalization: Font.MixedCase
|
||||
fontFamily: linkAccountBody.fontFamily
|
||||
fontSize: linkAccountBody.fontSize
|
||||
fontBold: linkAccountBody.fontBold
|
||||
visible: loginDialog.getLoginDialogPoppedUp() && !linkAccountBody.linkSteam && !linkAccountBody.linkOculus;
|
||||
onClicked: {
|
||||
if (linkAccountBody.loginDialogPoppedUp) {
|
||||
var data = {
|
||||
"action": "user dismissed login screen"
|
||||
};
|
||||
UserActivityLogger.logAction("encourageLoginDialog", data);
|
||||
loginDialog.dismissLoginDialog();
|
||||
}
|
||||
root.tryDestroy();
|
||||
}
|
||||
root.tryDestroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -603,20 +603,28 @@ var toolBar = (function () {
|
|||
Script.setTimeout(dimensionsCheckFunction, DIMENSIONS_CHECK_INTERVAL);
|
||||
}
|
||||
// Make sure the model entity is loaded before we try to figure out
|
||||
// its dimensions.
|
||||
var MAX_LOADED_CHECKS = 10;
|
||||
// its dimensions. We need to give ample time to load the entity.
|
||||
var MAX_LOADED_CHECKS = 100; // 100 * 100ms = 10 seconds.
|
||||
var LOADED_CHECK_INTERVAL = 100;
|
||||
var isLoadedCheckCount = 0;
|
||||
var entityIsLoadedCheck = function() {
|
||||
isLoadedCheckCount++;
|
||||
if (isLoadedCheckCount === MAX_LOADED_CHECKS || Entities.isLoaded(entityID)) {
|
||||
var naturalDimensions = Entities.getEntityProperties(entityID, "naturalDimensions").naturalDimensions;
|
||||
|
||||
|
||||
if (isLoadedCheckCount === MAX_LOADED_CHECKS) {
|
||||
console.log("Model entity failed to load in time: " + (MAX_LOADED_CHECKS * LOADED_CHECK_INTERVAL) + " ... setting dimensions to: " + JSON.stringify(naturalDimensions))
|
||||
}
|
||||
|
||||
Entities.editEntity(entityID, {
|
||||
visible: true,
|
||||
dimensions: naturalDimensions
|
||||
})
|
||||
dimensionsCheckCallback();
|
||||
// We want to update the selection manager again since the script has moved on without us.
|
||||
selectionManager.clearSelections(this);
|
||||
entityListTool.sendUpdate();
|
||||
selectionManager.setSelections([entityID], this);
|
||||
return;
|
||||
}
|
||||
Script.setTimeout(entityIsLoadedCheck, LOADED_CHECK_INTERVAL);
|
||||
|
|
Loading…
Reference in a new issue