mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 01:56:54 +02:00
overlay HMD implementation
This commit is contained in:
parent
67539bc87a
commit
f62c8ae87a
15 changed files with 268 additions and 268 deletions
|
@ -132,7 +132,7 @@ Windows.Window {
|
||||||
import QtQuick 2.3;
|
import QtQuick 2.3;
|
||||||
import QtQuick.Window 2.3;
|
import QtQuick.Window 2.3;
|
||||||
|
|
||||||
Window {
|
Windows.Window {
|
||||||
id: root;
|
id: root;
|
||||||
Rectangle {
|
Rectangle {
|
||||||
color: hifi.colors.baseGray
|
color: hifi.colors.baseGray
|
||||||
|
|
|
@ -17,16 +17,11 @@ import "windows" as Windows
|
||||||
|
|
||||||
import "LoginDialog"
|
import "LoginDialog"
|
||||||
|
|
||||||
Rectangle {
|
FocusScope {
|
||||||
id: root
|
id: root
|
||||||
HifiStylesUit.HifiConstants { id: hifi }
|
HifiStylesUit.HifiConstants { id: hifi }
|
||||||
objectName: "LoginDialog"
|
objectName: "LoginDialog"
|
||||||
// implicitWidth: 520
|
|
||||||
// implicitHeight: 320
|
|
||||||
// destroyOnCloseButton: true
|
|
||||||
// destroyOnHidden: true
|
|
||||||
visible: true
|
visible: true
|
||||||
// frame: Item {}
|
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
|
@ -87,5 +82,4 @@ Rectangle {
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
bodyLoader.setSource("LoginDialog/LinkAccountBody.qml", { "loginDialog": loginDialog, "root": root, "bodyLoader": bodyLoader });
|
bodyLoader.setSource("LoginDialog/LinkAccountBody.qml", { "loginDialog": loginDialog, "root": root, "bodyLoader": bodyLoader });
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,8 +18,8 @@ import "qrc:////qml//styles-uit" as HifiStylesUit
|
||||||
Item {
|
Item {
|
||||||
id: completeProfileBody
|
id: completeProfileBody
|
||||||
clip: true
|
clip: true
|
||||||
width: root.pane.width
|
width: root.width
|
||||||
height: root.pane.height
|
height: root.height
|
||||||
readonly property string termsContainerText: qsTr("By creating this user profile, you agree to High Fidelity's Terms of Service")
|
readonly property string termsContainerText: qsTr("By creating this user profile, you agree to High Fidelity's Terms of Service")
|
||||||
readonly property string fontFamily: "Cairo"
|
readonly property string fontFamily: "Cairo"
|
||||||
readonly property int fontSize: 24
|
readonly property int fontSize: 24
|
||||||
|
@ -40,17 +40,17 @@ Item {
|
||||||
if (root.isTablet === false) {
|
if (root.isTablet === false) {
|
||||||
var targetWidth = Math.max(Math.max(titleWidth, Math.max(additionalTextContainer.contentWidth,
|
var targetWidth = Math.max(Math.max(titleWidth, Math.max(additionalTextContainer.contentWidth,
|
||||||
termsContainer.contentWidth)), mainContainer.width)
|
termsContainer.contentWidth)), mainContainer.width)
|
||||||
parent.width = root.pane.width = Math.max(d.minWidth, Math.min(d.maxWidth, targetWidth))
|
parent.width = root.width = Math.max(d.minWidth, Math.min(d.maxWidth, targetWidth))
|
||||||
}
|
}
|
||||||
var targetHeight = Math.max(5 * hifi.dimensions.contentSpacing.y + d.minHeightButton + additionalTextContainer.height + termsContainer.height, d.maxHeight)
|
var targetHeight = Math.max(5 * hifi.dimensions.contentSpacing.y + d.minHeightButton + additionalTextContainer.height + termsContainer.height, d.maxHeight)
|
||||||
parent.height = root.pane.height = Math.max(d.minHeight, Math.min(d.maxHeight, targetHeight))
|
parent.height = root.height = Math.max(d.minHeight, Math.min(d.maxHeight, targetHeight))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: mainContainer
|
id: mainContainer
|
||||||
width: root.pane.width
|
width: root.width
|
||||||
height: root.pane.height
|
height: root.height
|
||||||
onHeightChanged: d.resize(); onWidthChanged: d.resize();
|
onHeightChanged: d.resize(); onWidthChanged: d.resize();
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
|
@ -40,15 +40,17 @@ Item {
|
||||||
id: d
|
id: d
|
||||||
readonly property int minWidth: 480
|
readonly property int minWidth: 480
|
||||||
readonly property int minWidthButton: !root.isTablet ? 256 : 174
|
readonly property int minWidthButton: !root.isTablet ? 256 : 174
|
||||||
property int maxWidth: root.isTablet ? 1280 : Window.innerWidth
|
// property int maxWidth: root.isTablet ? 1280 : Window.innerWidth
|
||||||
|
property int maxWidth: root.isTablet ? 1280 : root.width
|
||||||
readonly property int minHeight: 120
|
readonly property int minHeight: 120
|
||||||
readonly property int minHeightButton: !root.isTablet ? 56 : 42
|
readonly property int minHeightButton: !root.isTablet ? 56 : 42
|
||||||
property int maxHeight: root.isTablet ? 720 : Window.innerHeight
|
// property int maxHeight: root.isTablet ? 720 : Window.innerHeight
|
||||||
|
property int maxHeight: root.isTablet ? 720 : root.height
|
||||||
|
|
||||||
function resize() {
|
function resize() {
|
||||||
maxWidth = root.isTablet ? 1280 : Window.innerWidth;
|
maxWidth = root.isTablet ? 1280 : root.width;
|
||||||
maxHeight = root.isTablet ? 720 : Window.innerHeight;
|
maxHeight = root.isTablet ? 720 : root.height;
|
||||||
var targetWidth = Math.max(Math.max(titleWidth, topContainer.width), bottomContainer.width);
|
var targetWidth = Math.max(titleWidth, topContainer.width);
|
||||||
var targetHeight = hifi.dimensions.contentSpacing.y + topContainer.height + bottomContainer.height +
|
var targetHeight = hifi.dimensions.contentSpacing.y + topContainer.height + bottomContainer.height +
|
||||||
4 * hifi.dimensions.contentSpacing.y;
|
4 * hifi.dimensions.contentSpacing.y;
|
||||||
|
|
||||||
|
@ -73,199 +75,203 @@ Item {
|
||||||
bodyLoader.setSource("SignInBody.qml", { "loginDialog": loginDialog, "root": root, "bodyLoader": bodyLoader, "errorString": "" });
|
bodyLoader.setSource("SignInBody.qml", { "loginDialog": loginDialog, "root": root, "bodyLoader": bodyLoader, "errorString": "" });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: topContainer
|
id: mainContainer
|
||||||
width: root.width
|
anchors.fill: parent
|
||||||
height: 0.6 * root.height
|
|
||||||
onHeightChanged: d.resize(); onWidthChanged: d.resize();
|
onHeightChanged: d.resize(); onWidthChanged: d.resize();
|
||||||
anchors {
|
|
||||||
top: parent.top
|
|
||||||
left: parent.left
|
|
||||||
right: parent.right
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
id: topOpaqueRect
|
|
||||||
height: parent.height
|
|
||||||
width: parent.width
|
|
||||||
opacity: 0.9
|
|
||||||
color: "black"
|
|
||||||
visible: false
|
|
||||||
}
|
|
||||||
Item {
|
Item {
|
||||||
id: bannerContainer
|
id: topContainer
|
||||||
width: parent.width
|
width: root.width
|
||||||
height: banner.height
|
height: 0.6 * root.height
|
||||||
anchors {
|
anchors {
|
||||||
top: parent.top
|
top: parent.top
|
||||||
topMargin: 85
|
left: parent.left
|
||||||
}
|
right: parent.right
|
||||||
Image {
|
|
||||||
id: banner
|
|
||||||
anchors.centerIn: parent
|
|
||||||
source: "../../images/high-fidelity-banner.svg"
|
|
||||||
horizontalAlignment: Image.AlignHCenter
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Item {
|
|
||||||
id: splashContainer
|
|
||||||
width: parent.width
|
|
||||||
anchors.fill: parent
|
|
||||||
|
|
||||||
visible: true
|
|
||||||
|
|
||||||
Text {
|
|
||||||
id: flavorText
|
|
||||||
text: qsTr("BE ANYWHERE, WITH ANYONE RIGHT NOW")
|
|
||||||
width: 0.48 * parent.width
|
|
||||||
anchors.centerIn: parent
|
|
||||||
anchors {
|
|
||||||
top: banner.bottom
|
|
||||||
topMargin: 0.1 * parent.height
|
|
||||||
}
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
lineHeight: 0.5
|
|
||||||
color: "white"
|
|
||||||
font.family: linkAccountBody.fontFamily
|
|
||||||
font.pixelSize: !root.isTablet ? 2 * linkAccountBody.fontSize : linkAccountBody.fontSize
|
|
||||||
font.bold: linkAccountBody.fontBold
|
|
||||||
lineHeightMode: Text.ProportionalHeight
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HifiControlsUit.Button {
|
Rectangle {
|
||||||
id: signUpButton
|
id: topOpaqueRect
|
||||||
text: qsTr("Sign Up")
|
height: parent.height
|
||||||
width: d.minWidthButton
|
width: parent.width
|
||||||
height: d.minHeightButton
|
opacity: 0.9
|
||||||
color: hifi.buttons.blue
|
color: "black"
|
||||||
fontFamily: linkAccountBody.fontFamily
|
visible: false
|
||||||
fontSize: linkAccountBody.fontSize
|
|
||||||
fontBold: linkAccountBody.fontBold
|
|
||||||
anchors {
|
|
||||||
bottom: parent.bottom
|
|
||||||
bottomMargin: 0.1 * parent.height
|
|
||||||
left: parent.left
|
|
||||||
leftMargin: (parent.width - d.minWidthButton) / 2
|
|
||||||
}
|
|
||||||
onClicked: {
|
|
||||||
linkAccountBody.withSteam = false;
|
|
||||||
toggleSignIn(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
Item {
|
||||||
}
|
id: bannerContainer
|
||||||
Item {
|
width: parent.width
|
||||||
id: bottomContainer
|
height: banner.height
|
||||||
width: root.width
|
|
||||||
height: 0.4 * root.height
|
|
||||||
onHeightChanged: d.resize(); onWidthChanged: d.resize();
|
|
||||||
anchors {
|
|
||||||
top: topContainer.bottom
|
|
||||||
left: parent.left
|
|
||||||
right: parent.right
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
id: bottomOpaqueRect
|
|
||||||
height: parent.height
|
|
||||||
width: parent.width
|
|
||||||
opacity: 0.9
|
|
||||||
color: "black"
|
|
||||||
}
|
|
||||||
Item {
|
|
||||||
id: bottomButtonsContainer
|
|
||||||
|
|
||||||
width: parent.width
|
|
||||||
height: parent.height
|
|
||||||
|
|
||||||
HifiControlsUit.Button {
|
|
||||||
id: loginButton
|
|
||||||
width: d.minWidthButton
|
|
||||||
height: d.minHeightButton
|
|
||||||
text: qsTr("Log In")
|
|
||||||
fontFamily: linkAccountBody.fontFamily
|
|
||||||
fontSize: linkAccountBody.fontSize
|
|
||||||
fontBold: linkAccountBody.fontBold
|
|
||||||
anchors {
|
anchors {
|
||||||
top: parent.top
|
top: parent.top
|
||||||
topMargin: (parent.height / 2) - loginButton.height
|
topMargin: 85
|
||||||
left: parent.left
|
}
|
||||||
leftMargin: (parent.width - loginButton.width) / 2
|
Image {
|
||||||
|
id: banner
|
||||||
|
anchors.centerIn: parent
|
||||||
|
source: "../../images/high-fidelity-banner.svg"
|
||||||
|
horizontalAlignment: Image.AlignHCenter
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
id: splashContainer
|
||||||
|
width: parent.width
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
visible: true
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: flavorText
|
||||||
|
text: qsTr("BE ANYWHERE, WITH ANYONE RIGHT NOW")
|
||||||
|
width: 0.48 * parent.width
|
||||||
|
anchors.centerIn: parent
|
||||||
|
anchors {
|
||||||
|
top: banner.bottom
|
||||||
|
topMargin: 0.1 * parent.height
|
||||||
|
}
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
lineHeight: 0.5
|
||||||
|
// TODO change back to white when background is chosen
|
||||||
|
// color: "white"
|
||||||
|
color: "black"
|
||||||
|
font.family: linkAccountBody.fontFamily
|
||||||
|
font.pixelSize: !root.isTablet ? 2 * linkAccountBody.fontSize : linkAccountBody.fontSize
|
||||||
|
font.bold: linkAccountBody.fontBold
|
||||||
|
lineHeightMode: Text.ProportionalHeight
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
onClicked: {
|
HifiControlsUit.Button {
|
||||||
linkAccountBody.withSteam = false;
|
id: signUpButton
|
||||||
toggleSignIn(true);
|
text: qsTr("Sign Up")
|
||||||
|
width: d.minWidthButton
|
||||||
|
height: d.minHeightButton
|
||||||
|
color: hifi.buttons.blue
|
||||||
|
fontFamily: linkAccountBody.fontFamily
|
||||||
|
fontSize: linkAccountBody.fontSize
|
||||||
|
fontBold: linkAccountBody.fontBold
|
||||||
|
anchors {
|
||||||
|
bottom: parent.bottom
|
||||||
|
bottomMargin: 0.1 * parent.height
|
||||||
|
left: parent.left
|
||||||
|
leftMargin: (parent.width - d.minWidthButton) / 2
|
||||||
|
}
|
||||||
|
onClicked: {
|
||||||
|
linkAccountBody.withSteam = false;
|
||||||
|
toggleSignIn(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TextMetrics {
|
|
||||||
id: steamLoginButtonTextMetrics
|
|
||||||
font: dismissText.font
|
|
||||||
text: qsTr("STEAM LOG IN")
|
|
||||||
}
|
|
||||||
HifiControlsUit.Button {
|
|
||||||
id: steamLoginButton;
|
|
||||||
// textWidth + size of glyph + rightMargin
|
|
||||||
width: Math.max(d.minWidthButton, steamLoginButtonTextMetrics.width + 34 + buttonGlyphRightMargin + 2 * hifi.dimensions.contentSpacing.x);
|
|
||||||
height: d.minHeightButton
|
|
||||||
color: hifi.buttons.black;
|
|
||||||
anchors {
|
|
||||||
top: loginButton.bottom
|
|
||||||
topMargin: hifi.dimensions.contentSpacing.y
|
|
||||||
left: parent.left
|
|
||||||
leftMargin: (parent.width - steamLoginButton.width) / 2
|
|
||||||
}
|
|
||||||
text: qsTr("Steam Log In")
|
|
||||||
fontFamily: linkAccountBody.fontFamily
|
|
||||||
fontSize: linkAccountBody.fontSize
|
|
||||||
fontBold: linkAccountBody.fontBold
|
|
||||||
buttonGlyph: hifi.glyphs.steamSquare
|
|
||||||
buttonGlyphRightMargin: 10
|
|
||||||
onClicked: {
|
|
||||||
linkAccountBody.withSteam = true;
|
|
||||||
toggleSignIn(true);
|
|
||||||
}
|
|
||||||
visible: loginDialog.isSteamRunning();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
id: dismissTextContainer
|
id: bottomContainer
|
||||||
width: dismissText.width
|
width: root.width
|
||||||
height: dismissText.height
|
height: 0.4 * root.height
|
||||||
anchors {
|
anchors {
|
||||||
bottom: parent.bottom
|
top: topContainer.bottom
|
||||||
|
left: parent.left
|
||||||
right: parent.right
|
right: parent.right
|
||||||
margins: 10
|
|
||||||
}
|
}
|
||||||
visible: !root.isTablet && !HMD.active
|
|
||||||
Text {
|
|
||||||
id: dismissText
|
|
||||||
text: qsTr("No thanks, take me in-world! >")
|
|
||||||
|
|
||||||
lineHeight: 1
|
Rectangle {
|
||||||
color: "white"
|
id: bottomOpaqueRect
|
||||||
font.family: linkAccountBody.fontFamily
|
height: parent.height
|
||||||
font.pixelSize: linkAccountBody.fontSize
|
width: parent.width
|
||||||
font.bold: linkAccountBody.fontBold
|
opacity: 0.9
|
||||||
lineHeightMode: Text.ProportionalHeight
|
color: "black"
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
}
|
}
|
||||||
MouseArea {
|
Item {
|
||||||
id: dismissMouseArea
|
id: bottomButtonsContainer
|
||||||
anchors.fill: parent
|
|
||||||
acceptedButtons: Qt.LeftButton
|
width: parent.width
|
||||||
onClicked: {
|
height: parent.height
|
||||||
if (loginDialog.getLoginDialogPoppedUp()) {
|
|
||||||
console.log("[ENCOURAGELOGINDIALOG]: user dismissed login screen")
|
HifiControlsUit.Button {
|
||||||
var data = {
|
id: loginButton
|
||||||
"action": "user dismissed login screen"
|
width: d.minWidthButton
|
||||||
};
|
height: d.minHeightButton
|
||||||
UserActivityLogger.logAction("encourageLoginDialog", data);
|
text: qsTr("Log In")
|
||||||
loginDialog.dismissLoginDialog();
|
fontFamily: linkAccountBody.fontFamily
|
||||||
|
fontSize: linkAccountBody.fontSize
|
||||||
|
fontBold: linkAccountBody.fontBold
|
||||||
|
anchors {
|
||||||
|
top: parent.top
|
||||||
|
topMargin: (parent.height / 2) - loginButton.height
|
||||||
|
left: parent.left
|
||||||
|
leftMargin: (parent.width - loginButton.width) / 2
|
||||||
|
}
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
linkAccountBody.withSteam = false;
|
||||||
|
toggleSignIn(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
TextMetrics {
|
||||||
|
id: steamLoginButtonTextMetrics
|
||||||
|
font: dismissText.font
|
||||||
|
text: qsTr("STEAM LOG IN")
|
||||||
|
}
|
||||||
|
HifiControlsUit.Button {
|
||||||
|
id: steamLoginButton;
|
||||||
|
// textWidth + size of glyph + rightMargin
|
||||||
|
width: Math.max(d.minWidthButton, steamLoginButtonTextMetrics.width + 34 + buttonGlyphRightMargin + 2 * hifi.dimensions.contentSpacing.x);
|
||||||
|
height: d.minHeightButton
|
||||||
|
color: hifi.buttons.black;
|
||||||
|
anchors {
|
||||||
|
top: loginButton.bottom
|
||||||
|
topMargin: hifi.dimensions.contentSpacing.y
|
||||||
|
left: parent.left
|
||||||
|
leftMargin: (parent.width - steamLoginButton.width) / 2
|
||||||
|
}
|
||||||
|
text: qsTr("Steam Log In")
|
||||||
|
fontFamily: linkAccountBody.fontFamily
|
||||||
|
fontSize: linkAccountBody.fontSize
|
||||||
|
fontBold: linkAccountBody.fontBold
|
||||||
|
buttonGlyph: hifi.glyphs.steamSquare
|
||||||
|
buttonGlyphRightMargin: 10
|
||||||
|
onClicked: {
|
||||||
|
linkAccountBody.withSteam = true;
|
||||||
|
toggleSignIn(true);
|
||||||
|
}
|
||||||
|
visible: loginDialog.isSteamRunning();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
id: dismissTextContainer
|
||||||
|
width: dismissText.width
|
||||||
|
height: dismissText.height
|
||||||
|
anchors {
|
||||||
|
bottom: parent.bottom
|
||||||
|
right: parent.right
|
||||||
|
margins: 10
|
||||||
|
}
|
||||||
|
visible: !root.isTablet
|
||||||
|
Text {
|
||||||
|
id: dismissText
|
||||||
|
text: qsTr("No thanks, take me in-world! >")
|
||||||
|
|
||||||
|
lineHeight: 1
|
||||||
|
color: "white"
|
||||||
|
font.family: linkAccountBody.fontFamily
|
||||||
|
font.pixelSize: linkAccountBody.fontSize
|
||||||
|
font.bold: linkAccountBody.fontBold
|
||||||
|
lineHeightMode: Text.ProportionalHeight
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
}
|
||||||
|
MouseArea {
|
||||||
|
id: dismissMouseArea
|
||||||
|
anchors.fill: parent
|
||||||
|
acceptedButtons: Qt.LeftButton
|
||||||
|
onClicked: {
|
||||||
|
if (loginDialog.getLoginDialogPoppedUp()) {
|
||||||
|
console.log("[ENCOURAGELOGINDIALOG]: user dismissed login screen")
|
||||||
|
var data = {
|
||||||
|
"action": "user dismissed login screen"
|
||||||
|
};
|
||||||
|
UserActivityLogger.logAction("encourageLoginDialog", data);
|
||||||
|
loginDialog.dismissLoginDialog();
|
||||||
|
}
|
||||||
|
root.tryDestroy();
|
||||||
}
|
}
|
||||||
root.tryDestroy();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,10 +45,10 @@ Item {
|
||||||
|
|
||||||
var newWidth = Math.max(d.minWidth, Math.min(d.maxWidth, targetWidth));
|
var newWidth = Math.max(d.minWidth, Math.min(d.maxWidth, targetWidth));
|
||||||
if (!isNaN(newWidth)) {
|
if (!isNaN(newWidth)) {
|
||||||
parent.width = root.pane.width = newWidth;
|
parent.width = root.width = newWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
parent.height = root.pane.height = Math.max(d.minHeight, Math.min(d.maxHeight, targetHeight)) + hifi.dimensions.contentSpacing.y;
|
parent.height = root.height = Math.max(d.minHeight, Math.min(d.maxHeight, targetHeight)) + hifi.dimensions.contentSpacing.y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,13 +102,13 @@ Item {
|
||||||
loggingInText.text = "You are now logged in!";
|
loggingInText.text = "You are now logged in!";
|
||||||
}
|
}
|
||||||
successTimer.start();
|
successTimer.start();
|
||||||
loginDialog.resumeLoading();
|
loginDialog.dismissLoginDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: mainContainer
|
id: mainContainer
|
||||||
width: root.pane.width
|
width: root.width
|
||||||
height: root.pane.height
|
height: root.height
|
||||||
onHeightChanged: d.resize(); onWidthChanged: d.resize();
|
onHeightChanged: d.resize(); onWidthChanged: d.resize();
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
|
@ -21,8 +21,8 @@ import TabletScriptingInterface 1.0
|
||||||
Item {
|
Item {
|
||||||
id: signInBody
|
id: signInBody
|
||||||
clip: true
|
clip: true
|
||||||
height: root.pane.height
|
height: root.height
|
||||||
width: root.pane.width
|
width: root.width
|
||||||
property int textFieldHeight: 31
|
property int textFieldHeight: 31
|
||||||
property string fontFamily: "Cairo"
|
property string fontFamily: "Cairo"
|
||||||
property int fontSize: 24
|
property int fontSize: 24
|
||||||
|
@ -40,14 +40,18 @@ Item {
|
||||||
id: d
|
id: d
|
||||||
readonly property int minWidth: 480
|
readonly property int minWidth: 480
|
||||||
readonly property int minWidthButton: !root.isTablet ? 256 : 174
|
readonly property int minWidthButton: !root.isTablet ? 256 : 174
|
||||||
property int maxWidth: root.isTablet ? 1280 : Window.innerWidth
|
// property int maxWidth: root.isTablet ? 1280 : Window.innerWidth
|
||||||
|
property int maxWidth: root.isTablet ? 1280 : root.width
|
||||||
readonly property int minHeight: 120
|
readonly property int minHeight: 120
|
||||||
readonly property int minHeightButton: !root.isTablet ? 56 : 42
|
readonly property int minHeightButton: !root.isTablet ? 56 : 42
|
||||||
property int maxHeight: root.isTablet ? 720 : Window.innerHeight
|
// property int maxHeight: root.isTablet ? 720 : Window.innerHeight
|
||||||
|
property int maxHeight: root.isTablet ? 720 : root.height
|
||||||
|
|
||||||
function resize() {
|
function resize() {
|
||||||
maxWidth = root.isTablet ? 1280 : Window.innerWidth;
|
// maxWidth = root.isTablet ? 1280 : Window.innerWidth;
|
||||||
maxHeight = root.isTablet ? 720 : Window.innerHeight;
|
maxWidth = root.isTablet ? 1280 : root.width;
|
||||||
|
// maxHeight = root.isTablet ? 720 : Window.innerHeight;
|
||||||
|
maxHeight = root.isTablet ? 720 : root.height;
|
||||||
var targetWidth = Math.max(titleWidth, mainContainer.width);
|
var targetWidth = Math.max(titleWidth, mainContainer.width);
|
||||||
var targetHeight = hifi.dimensions.contentSpacing.y + mainContainer.height +
|
var targetHeight = hifi.dimensions.contentSpacing.y + mainContainer.height +
|
||||||
4 * hifi.dimensions.contentSpacing.y;
|
4 * hifi.dimensions.contentSpacing.y;
|
||||||
|
@ -86,10 +90,11 @@ Item {
|
||||||
loginButtonAtSignIn.text = "Log In";
|
loginButtonAtSignIn.text = "Log In";
|
||||||
loginButtonAtSignIn.color = hifi.buttons.black;
|
loginButtonAtSignIn.color = hifi.buttons.black;
|
||||||
emailField.placeholderText = "Username or Email";
|
emailField.placeholderText = "Username or Email";
|
||||||
var savedUsername = Settings.getValue("wallet/savedUsername", "");
|
// var savedUsername = Settings.getValue("wallet/savedUsername", "");
|
||||||
|
var savedUsername = "";
|
||||||
emailField.text = savedUsername === "Unknown user" ? "" : savedUsername;
|
emailField.text = savedUsername === "Unknown user" ? "" : savedUsername;
|
||||||
emailField.anchors.top = loginContainer.top;
|
emailField.anchors.top = loginContainer.top;
|
||||||
emailField.anchors.topMargin = !root.isTablet ? 0.2 * root.pane.height : 0.24 * root.pane.height;
|
emailField.anchors.topMargin = !root.isTablet ? 0.2 * root.height : 0.24 * root.height;
|
||||||
cantAccessContainer.anchors.topMargin = !root.isTablet ? 3.5 * hifi.dimensions.contentSpacing.y : hifi.dimensions.contentSpacing.y;
|
cantAccessContainer.anchors.topMargin = !root.isTablet ? 3.5 * hifi.dimensions.contentSpacing.y : hifi.dimensions.contentSpacing.y;
|
||||||
} else {
|
} else {
|
||||||
loginButtonAtSignIn.text = "Sign Up";
|
loginButtonAtSignIn.text = "Sign Up";
|
||||||
|
@ -106,8 +111,8 @@ Item {
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: mainContainer
|
id: mainContainer
|
||||||
width: root.pane.width
|
width: root.width
|
||||||
height: root.pane.height
|
height: root.height
|
||||||
onHeightChanged: d.resize(); onWidthChanged: d.resize();
|
onHeightChanged: d.resize(); onWidthChanged: d.resize();
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
@ -191,7 +196,8 @@ Item {
|
||||||
width: banner.width
|
width: banner.width
|
||||||
height: signInBody.textFieldHeight
|
height: signInBody.textFieldHeight
|
||||||
font.family: signInBody.fontFamily
|
font.family: signInBody.fontFamily
|
||||||
text: Settings.getValue("wallet/savedUsername", "");
|
// text: Settings.getValue("wallet/savedUsername", "");
|
||||||
|
text: "";
|
||||||
anchors {
|
anchors {
|
||||||
top: parent.top
|
top: parent.top
|
||||||
left: parent.left
|
left: parent.left
|
||||||
|
@ -200,7 +206,6 @@ Item {
|
||||||
focus: loginDialog.isLogIn
|
focus: loginDialog.isLogIn
|
||||||
placeholderText: "Username or Email"
|
placeholderText: "Username or Email"
|
||||||
activeFocusOnPress: true
|
activeFocusOnPress: true
|
||||||
onHeightChanged: d.resize(); onWidthChanged: d.resize();
|
|
||||||
}
|
}
|
||||||
HifiControlsUit.TextField {
|
HifiControlsUit.TextField {
|
||||||
id: passwordField
|
id: passwordField
|
||||||
|
|
|
@ -18,8 +18,8 @@ import "qrc:////qml//styles-uit" as HifiStylesUit
|
||||||
Item {
|
Item {
|
||||||
id: usernameCollisionBody
|
id: usernameCollisionBody
|
||||||
clip: true
|
clip: true
|
||||||
width: root.pane.width
|
width: root.width
|
||||||
height: root.pane.height
|
height: root.height
|
||||||
readonly property string fontFamily: "Cairo"
|
readonly property string fontFamily: "Cairo"
|
||||||
readonly property int fontSize: 24
|
readonly property int fontSize: 24
|
||||||
readonly property bool fontBold: true
|
readonly property bool fontBold: true
|
||||||
|
@ -55,16 +55,16 @@ Item {
|
||||||
hifi.dimensions.contentSpacing.y + textField.height +
|
hifi.dimensions.contentSpacing.y + textField.height +
|
||||||
hifi.dimensions.contentSpacing.y + buttons.height;
|
hifi.dimensions.contentSpacing.y + buttons.height;
|
||||||
|
|
||||||
parent.width = root.pane.width = Math.max(d.minWidth, Math.min(d.maxWidth, targetWidth))
|
parent.width = root.width = Math.max(d.minWidth, Math.min(d.maxWidth, targetWidth))
|
||||||
parent.height = root.pane.height = Math.max(Math.max(d.minHeight, Math.min(d.maxHeight, targetHeight)), mainContainer.height +
|
parent.height = root.height = Math.max(Math.max(d.minHeight, Math.min(d.maxHeight, targetHeight)), mainContainer.height +
|
||||||
(keyboardEnabled && keyboardRaised ? (200 + 2 * hifi.dimensions.contentSpacing.y) : hifi.dimensions.contentSpacing.y));
|
(keyboardEnabled && keyboardRaised ? (200 + 2 * hifi.dimensions.contentSpacing.y) : hifi.dimensions.contentSpacing.y));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: mainContainer
|
id: mainContainer
|
||||||
width: root.pane.width
|
width: root.width
|
||||||
height: root.pane.height
|
height: root.height
|
||||||
onHeightChanged: d.resize(); onWidthChanged: d.resize();
|
onHeightChanged: d.resize(); onWidthChanged: d.resize();
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
|
|
|
@ -79,18 +79,6 @@ FocusScope {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HifiControlsUit.Keyboard {
|
|
||||||
id: loginKeyboard
|
|
||||||
raised: root.keyboardEnabled && root.keyboardRaised
|
|
||||||
numeric: root.punctuationMode
|
|
||||||
password: root.isPassword
|
|
||||||
anchors {
|
|
||||||
left: bodyLoader.left
|
|
||||||
right: bodyLoader.right
|
|
||||||
top: bodyLoader.bottom
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Keys.onPressed: {
|
Keys.onPressed: {
|
||||||
if (!visible) {
|
if (!visible) {
|
||||||
return
|
return
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtWebEngine 1.5;
|
import QtWebEngine 1.5;
|
||||||
import Qt.labs.settings 1.0
|
import Qt.labs.settings 1.0 as QtSettings
|
||||||
|
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ OriginalDesktop.Desktop {
|
||||||
shown: tablet.toolbarMode;
|
shown: tablet.toolbarMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
Settings {
|
QtSettings.Settings {
|
||||||
id: settings;
|
id: settings;
|
||||||
category: "toolbar";
|
category: "toolbar";
|
||||||
property bool constrainToolbarToCenterX: true;
|
property bool constrainToolbarToCenterX: true;
|
||||||
|
|
|
@ -15,10 +15,10 @@ import Qt.labs.settings 1.0
|
||||||
|
|
||||||
import "../../styles-uit"
|
import "../../styles-uit"
|
||||||
import "../../controls-uit" as HifiControls
|
import "../../controls-uit" as HifiControls
|
||||||
import "../../windows"
|
import "../../windows" as Windows
|
||||||
import "../"
|
import "../"
|
||||||
|
|
||||||
ScrollingWindow {
|
Windows.ScrollingWindow {
|
||||||
id: root
|
id: root
|
||||||
objectName: "RunningScripts"
|
objectName: "RunningScripts"
|
||||||
title: "Running Scripts"
|
title: "Running Scripts"
|
||||||
|
@ -45,7 +45,7 @@ ScrollingWindow {
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: letterBoxMessage
|
id: letterBoxMessage
|
||||||
Window {
|
Windows.Window {
|
||||||
implicitWidth: 400
|
implicitWidth: 400
|
||||||
implicitHeight: 300
|
implicitHeight: 300
|
||||||
minSize: Qt.vector2d(424, 300)
|
minSize: Qt.vector2d(424, 300)
|
||||||
|
|
|
@ -378,6 +378,7 @@ static const QString DESKTOP_LOCATION = QStandardPaths::writableLocation(QStanda
|
||||||
Setting::Handle<int> maxOctreePacketsPerSecond{"maxOctreePPS", DEFAULT_MAX_OCTREE_PPS};
|
Setting::Handle<int> maxOctreePacketsPerSecond{"maxOctreePPS", DEFAULT_MAX_OCTREE_PPS};
|
||||||
|
|
||||||
Setting::Handle<bool> loginDialogPoppedUp{"loginDialogPoppedUp", false};
|
Setting::Handle<bool> loginDialogPoppedUp{"loginDialogPoppedUp", false};
|
||||||
|
static const QUrl OVERLAY_LOGIN_DIALOG_URL(PathUtils::qmlUrl("LoginDialog.qml"));
|
||||||
|
|
||||||
static const QString MARKETPLACE_CDN_HOSTNAME = "mpassets.highfidelity.com";
|
static const QString MARKETPLACE_CDN_HOSTNAME = "mpassets.highfidelity.com";
|
||||||
static const int INTERVAL_TO_CHECK_HMD_WORN_STATUS = 500; // milliseconds
|
static const int INTERVAL_TO_CHECK_HMD_WORN_STATUS = 500; // milliseconds
|
||||||
|
@ -5194,14 +5195,15 @@ void Application::pauseUntilLoginDetermined() {
|
||||||
myAvatar->setEnableMeshVisible(false);
|
myAvatar->setEnableMeshVisible(false);
|
||||||
|
|
||||||
const auto& nodeList = DependencyManager::get<NodeList>();
|
const auto& nodeList = DependencyManager::get<NodeList>();
|
||||||
|
// save interstitial mode setting until resuming.
|
||||||
|
_interstitialModeEnabled = nodeList->getDomainHandler().getInterstitialModeEnabled();
|
||||||
|
nodeList->getDomainHandler().setInterstitialModeEnabled(false);
|
||||||
// disconnect domain handler.
|
// disconnect domain handler.
|
||||||
nodeList->getDomainHandler().disconnect();
|
nodeList->getDomainHandler().disconnect();
|
||||||
Menu::getInstance()->setIsOptionChecked(MenuOption::Stats, false);
|
|
||||||
Menu::getInstance()->setVisible(false);
|
Menu::getInstance()->setVisible(false);
|
||||||
|
|
||||||
{
|
{
|
||||||
auto scriptEngines = DependencyManager::get<ScriptEngines>().data();
|
auto scriptEngines = DependencyManager::get<ScriptEngines>().data();
|
||||||
scriptEngines->reloadLocalFiles();
|
|
||||||
scriptEngines->loadControllerScripts();
|
scriptEngines->loadControllerScripts();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5260,6 +5262,7 @@ void Application::resumeAfterLoginDialogActionTaken() {
|
||||||
|
|
||||||
const auto& nodeList = DependencyManager::get<NodeList>();
|
const auto& nodeList = DependencyManager::get<NodeList>();
|
||||||
// disconnect domain handler.
|
// disconnect domain handler.
|
||||||
|
nodeList->getDomainHandler().setInterstitialModeEnabled(_interstitialModeEnabled);
|
||||||
nodeList->getDomainHandler().resetting();
|
nodeList->getDomainHandler().resetting();
|
||||||
|
|
||||||
Menu::getInstance()->setVisible(true);
|
Menu::getInstance()->setVisible(true);
|
||||||
|
@ -8495,9 +8498,36 @@ void Application::setShowBulletConstraintLimits(bool value) {
|
||||||
_physicsEngine->setShowBulletConstraintLimits(value);
|
_physicsEngine->setShowBulletConstraintLimits(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Application::createLoginDialogOverlay() {
|
||||||
|
auto avatarManager = DependencyManager::get<AvatarManager>();
|
||||||
|
auto myAvatar = avatarManager->getMyAvatar();
|
||||||
|
Overlays& overlays = qApp->getOverlays();
|
||||||
|
// DEFAULT_DPI / tablet scale percentage
|
||||||
|
float overlayDpi = 31.0f / (60 / 100.0f);
|
||||||
|
QVariantMap overlayProperties {
|
||||||
|
{ "name", "pleasework" },
|
||||||
|
{ "url", OVERLAY_LOGIN_DIALOG_URL },
|
||||||
|
{ "position", vec3toVariant(myAvatar->getHeadPosition() - glm::vec3(0.0f, -0.1f, 1.0f)) },
|
||||||
|
{ "orientation", quatToVariant(myAvatar->getWorldOrientation()) },
|
||||||
|
{ "isSolid", true },
|
||||||
|
{ "grabbable", false },
|
||||||
|
{ "ignorePickIntersection", false },
|
||||||
|
{ "alpha", 1.0 },
|
||||||
|
{ "dpi", overlayDpi },
|
||||||
|
{ "visible", true }
|
||||||
|
};
|
||||||
|
|
||||||
|
_loginDialogOverlayID = overlays.addOverlay("web3d", overlayProperties);
|
||||||
|
}
|
||||||
|
|
||||||
void Application::onDismissedLoginDialog() {
|
void Application::onDismissedLoginDialog() {
|
||||||
_loginDialogPoppedUp = false;
|
_loginDialogPoppedUp = false;
|
||||||
loginDialogPoppedUp.set(false);
|
loginDialogPoppedUp.set(false);
|
||||||
|
if (!_loginDialogOverlayID.isNull()) {
|
||||||
|
// deleting overlay.
|
||||||
|
qDebug() << "Deleting overlay";
|
||||||
|
getOverlays().deleteOverlay(_loginDialogOverlayID);
|
||||||
|
}
|
||||||
resumeAfterLoginDialogActionTaken();
|
resumeAfterLoginDialogActionTaken();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -320,6 +320,7 @@ public:
|
||||||
void setOtherAvatarsReplicaCount(int count) { DependencyManager::get<AvatarHashMap>()->setReplicaCount(count); }
|
void setOtherAvatarsReplicaCount(int count) { DependencyManager::get<AvatarHashMap>()->setReplicaCount(count); }
|
||||||
|
|
||||||
bool getLoginDialogPoppedUp() const { return _loginDialogPoppedUp; }
|
bool getLoginDialogPoppedUp() const { return _loginDialogPoppedUp; }
|
||||||
|
void createLoginDialogOverlay();
|
||||||
|
|
||||||
#if defined(Q_OS_ANDROID)
|
#if defined(Q_OS_ANDROID)
|
||||||
void beforeEnterBackground();
|
void beforeEnterBackground();
|
||||||
|
@ -682,6 +683,8 @@ private:
|
||||||
|
|
||||||
int _maxOctreePPS = DEFAULT_MAX_OCTREE_PPS;
|
int _maxOctreePPS = DEFAULT_MAX_OCTREE_PPS;
|
||||||
bool _loginDialogPoppedUp = false;
|
bool _loginDialogPoppedUp = false;
|
||||||
|
bool _interstitialModeEnabled{ false };
|
||||||
|
OverlayID _loginDialogOverlayID;
|
||||||
|
|
||||||
quint64 _lastFaceTrackerUpdate;
|
quint64 _lastFaceTrackerUpdate;
|
||||||
|
|
||||||
|
|
|
@ -29,12 +29,12 @@
|
||||||
#include "avatar/AvatarManager.h"
|
#include "avatar/AvatarManager.h"
|
||||||
#include "scripting/HMDScriptingInterface.h"
|
#include "scripting/HMDScriptingInterface.h"
|
||||||
#include "ui/overlays/Overlays.h"
|
#include "ui/overlays/Overlays.h"
|
||||||
|
#include "ui/overlays/Web3DOverlay.h"
|
||||||
#include "Constants.h"
|
#include "Constants.h"
|
||||||
|
|
||||||
HIFI_QML_DEF(LoginDialog)
|
HIFI_QML_DEF(LoginDialog)
|
||||||
|
|
||||||
static const QUrl TABLET_LOGIN_DIALOG_URL("dialogs/TabletLoginDialog.qml");
|
static const QUrl TABLET_LOGIN_DIALOG_URL("dialogs/TabletLoginDialog.qml");
|
||||||
static const QUrl OVERLAY_LOGIN_DIALOG_URL("../LoginDialog.qml");
|
|
||||||
|
|
||||||
LoginDialog::LoginDialog(QQuickItem *parent) : OffscreenQmlDialog(parent) {
|
LoginDialog::LoginDialog(QQuickItem *parent) : OffscreenQmlDialog(parent) {
|
||||||
auto accountManager = DependencyManager::get<AccountManager>();
|
auto accountManager = DependencyManager::get<AccountManager>();
|
||||||
|
@ -69,7 +69,7 @@ void LoginDialog::showWithSelection() {
|
||||||
} else {
|
} else {
|
||||||
if (qApp->getLoginDialogPoppedUp()) {
|
if (qApp->getLoginDialogPoppedUp()) {
|
||||||
// pop up those overlay things.
|
// pop up those overlay things.
|
||||||
createLoginDialogOverlay();
|
qApp->createLoginDialogOverlay();
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
tablet->initialScreen(TABLET_LOGIN_DIALOG_URL);
|
tablet->initialScreen(TABLET_LOGIN_DIALOG_URL);
|
||||||
|
@ -257,24 +257,6 @@ bool LoginDialog::getLoginDialogPoppedUp() const {
|
||||||
return qApp->getLoginDialogPoppedUp();
|
return qApp->getLoginDialogPoppedUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoginDialog::createLoginDialogOverlay() {
|
|
||||||
Overlays& overlays = qApp->getOverlays();
|
|
||||||
auto avatarManager = DependencyManager::get<AvatarManager>();
|
|
||||||
auto myAvatar = avatarManager->getMyAvatar();
|
|
||||||
|
|
||||||
QVariantMap overlayProperties {
|
|
||||||
{ "name", "" },
|
|
||||||
{ "visible", true },
|
|
||||||
{ "grabbable", false },
|
|
||||||
{ "ignoreRayIntersection", false },
|
|
||||||
{ "url", OVERLAY_LOGIN_DIALOG_URL },
|
|
||||||
{ "dimensions", myAvatar->getSessionUUID().toString() },
|
|
||||||
{}
|
|
||||||
};
|
|
||||||
|
|
||||||
overlays.addOverlay("web3d", overlayProperties);
|
|
||||||
}
|
|
||||||
|
|
||||||
QString errorStringFromAPIObject(const QJsonValue& apiObject) {
|
QString errorStringFromAPIObject(const QJsonValue& apiObject) {
|
||||||
if (apiObject.isArray()) {
|
if (apiObject.isArray()) {
|
||||||
return apiObject.toArray()[0].toString();
|
return apiObject.toArray()[0].toString();
|
||||||
|
|
|
@ -14,13 +14,12 @@
|
||||||
#ifndef hifi_LoginDialog_h
|
#ifndef hifi_LoginDialog_h
|
||||||
#define hifi_LoginDialog_h
|
#define hifi_LoginDialog_h
|
||||||
|
|
||||||
|
#include <QtCore/QUuid>
|
||||||
|
|
||||||
#include <OffscreenQmlDialog.h>
|
#include <OffscreenQmlDialog.h>
|
||||||
#include <SettingHandle.h>
|
#include <SettingHandle.h>
|
||||||
|
|
||||||
#include "ui/overlays/Web3DOverlay.h"
|
|
||||||
|
|
||||||
class QNetworkReply;
|
class QNetworkReply;
|
||||||
class Web3DOverlay;
|
|
||||||
|
|
||||||
class LoginDialog : public OffscreenQmlDialog {
|
class LoginDialog : public OffscreenQmlDialog {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@ -45,7 +44,7 @@ signals:
|
||||||
|
|
||||||
void handleCreateCompleted();
|
void handleCreateCompleted();
|
||||||
void handleCreateFailed(QString error);
|
void handleCreateFailed(QString error);
|
||||||
|
|
||||||
void handleSignupCompleted();
|
void handleSignupCompleted();
|
||||||
void handleSignupFailed(QString errorString);
|
void handleSignupFailed(QString errorString);
|
||||||
|
|
||||||
|
@ -58,7 +57,7 @@ public slots:
|
||||||
|
|
||||||
void createCompleted(QNetworkReply* reply);
|
void createCompleted(QNetworkReply* reply);
|
||||||
void createFailed(QNetworkReply* reply);
|
void createFailed(QNetworkReply* reply);
|
||||||
|
|
||||||
void signupCompleted(QNetworkReply* reply);
|
void signupCompleted(QNetworkReply* reply);
|
||||||
void signupFailed(QNetworkReply* reply);
|
void signupFailed(QNetworkReply* reply);
|
||||||
|
|
||||||
|
@ -71,7 +70,7 @@ protected slots:
|
||||||
Q_INVOKABLE void loginThroughSteam();
|
Q_INVOKABLE void loginThroughSteam();
|
||||||
Q_INVOKABLE void linkSteam();
|
Q_INVOKABLE void linkSteam();
|
||||||
Q_INVOKABLE void createAccountFromSteam(QString username = QString());
|
Q_INVOKABLE void createAccountFromSteam(QString username = QString());
|
||||||
|
|
||||||
Q_INVOKABLE void signup(const QString& email, const QString& username, const QString& password);
|
Q_INVOKABLE void signup(const QString& email, const QString& username, const QString& password);
|
||||||
|
|
||||||
Q_INVOKABLE void openUrl(const QString& url) const;
|
Q_INVOKABLE void openUrl(const QString& url) const;
|
||||||
|
@ -79,15 +78,10 @@ protected slots:
|
||||||
Q_INVOKABLE bool getLoginDialogPoppedUp() const;
|
Q_INVOKABLE bool getLoginDialogPoppedUp() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// for HMD mode on pop up.
|
|
||||||
static void createLoginDialogOverlay();
|
|
||||||
|
|
||||||
bool getIsLogIn() const { return _isLogIn; }
|
bool getIsLogIn() const { return _isLogIn; }
|
||||||
void setIsLogIn(const bool isLogIn) { _isLogIn = isLogIn; }
|
void setIsLogIn(const bool isLogIn) { _isLogIn = isLogIn; }
|
||||||
|
|
||||||
bool _isLogIn { false };
|
bool _isLogIn{ false };
|
||||||
|
|
||||||
Web3DOverlay _loginDialogOverlay;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_LoginDialog_h
|
#endif // hifi_LoginDialog_h
|
||||||
|
|
|
@ -229,8 +229,7 @@ void Web3DOverlay::setupQmlSurface(bool isTablet) {
|
||||||
_webSurface->getSurfaceContext()->setContextProperty("MyAvatar", DependencyManager::get<AvatarManager>()->getMyAvatar().get());
|
_webSurface->getSurfaceContext()->setContextProperty("MyAvatar", DependencyManager::get<AvatarManager>()->getMyAvatar().get());
|
||||||
_webSurface->getSurfaceContext()->setContextProperty("Entities", DependencyManager::get<EntityScriptingInterface>().data());
|
_webSurface->getSurfaceContext()->setContextProperty("Entities", DependencyManager::get<EntityScriptingInterface>().data());
|
||||||
_webSurface->getSurfaceContext()->setContextProperty("Snapshot", DependencyManager::get<Snapshot>().data());
|
_webSurface->getSurfaceContext()->setContextProperty("Snapshot", DependencyManager::get<Snapshot>().data());
|
||||||
//_webSurface->getSurfaceContext()->setContextProperty("Settings", SettingsScriptingInterface::getInstance());
|
_webSurface->getSurfaceContext()->setContextProperty("Settings", SettingsScriptingInterface::getInstance());
|
||||||
//_webSurface->getSurfaceContext()->setContextProperty("Window", DependencyManager::get<WindowScriptingInterface>().data());
|
|
||||||
|
|
||||||
if (isTablet) {
|
if (isTablet) {
|
||||||
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
||||||
|
@ -262,7 +261,6 @@ void Web3DOverlay::setupQmlSurface(bool isTablet) {
|
||||||
_webSurface->getSurfaceContext()->setContextProperty("InputConfiguration", DependencyManager::get<InputConfiguration>().data());
|
_webSurface->getSurfaceContext()->setContextProperty("InputConfiguration", DependencyManager::get<InputConfiguration>().data());
|
||||||
_webSurface->getSurfaceContext()->setContextProperty("SoundCache", DependencyManager::get<SoundCacheScriptingInterface>().data());
|
_webSurface->getSurfaceContext()->setContextProperty("SoundCache", DependencyManager::get<SoundCacheScriptingInterface>().data());
|
||||||
_webSurface->getSurfaceContext()->setContextProperty("MenuInterface", MenuScriptingInterface::getInstance());
|
_webSurface->getSurfaceContext()->setContextProperty("MenuInterface", MenuScriptingInterface::getInstance());
|
||||||
_webSurface->getSurfaceContext()->setContextProperty("Settings", SettingsScriptingInterface::getInstance());
|
|
||||||
_webSurface->getSurfaceContext()->setContextProperty("AvatarBookmarks", DependencyManager::get<AvatarBookmarks>().data());
|
_webSurface->getSurfaceContext()->setContextProperty("AvatarBookmarks", DependencyManager::get<AvatarBookmarks>().data());
|
||||||
_webSurface->getSurfaceContext()->setContextProperty("Render", AbstractViewStateInterface::instance()->getRenderEngine()->getConfiguration().get());
|
_webSurface->getSurfaceContext()->setContextProperty("Render", AbstractViewStateInterface::instance()->getRenderEngine()->getConfiguration().get());
|
||||||
_webSurface->getSurfaceContext()->setContextProperty("Workload", qApp->getGameWorkload()._engine->getConfiguration().get());
|
_webSurface->getSurfaceContext()->setContextProperty("Workload", qApp->getGameWorkload()._engine->getConfiguration().get());
|
||||||
|
|
Loading…
Reference in a new issue