mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
testing tablet implementation
This commit is contained in:
parent
8e4837f8c8
commit
43b269b612
3 changed files with 32 additions and 62 deletions
|
@ -17,51 +17,40 @@ import "../windows" as Windows
|
||||||
|
|
||||||
import "../LoginDialog"
|
import "../LoginDialog"
|
||||||
|
|
||||||
Windows.TabletModalWindow {
|
FocusScope {
|
||||||
id: realRoot
|
id: root
|
||||||
objectName: "LoginDialog"
|
objectName: "LoginDialog"
|
||||||
|
visible: true
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
signal sendToScript(var message);
|
signal sendToScript(var message);
|
||||||
property bool isHMD: false
|
property bool isHMD: false
|
||||||
property bool gotoPreviousApp: false;
|
property bool gotoPreviousApp: false;
|
||||||
color: hifi.colors.baseGray
|
|
||||||
title: qsTr("Sign in to High Fidelity")
|
|
||||||
property alias titleWidth: root.titleWidth
|
|
||||||
property alias punctuationMode: root.punctuationMode
|
|
||||||
|
|
||||||
//fake root for shared components expecting root here
|
property bool keyboardEnabled: false
|
||||||
property var root: QtObject {
|
property bool keyboardRaised: false
|
||||||
id: root
|
property bool punctuationMode: false
|
||||||
|
property bool isPassword: false
|
||||||
|
property alias text: loginKeyboard.mirroredText
|
||||||
|
|
||||||
property bool keyboardEnabled: false
|
readonly property bool isTablet: true
|
||||||
property bool keyboardRaised: false
|
|
||||||
property bool punctuationMode: false
|
|
||||||
property bool isPassword: false
|
|
||||||
property alias text: loginKeyboard.mirroredText
|
|
||||||
|
|
||||||
readonly property bool isTablet: true
|
property int titleWidth: 0
|
||||||
|
property string iconText: hifi.glyphs.avatar
|
||||||
|
property int iconSize: 35
|
||||||
|
|
||||||
property alias title: realRoot.title
|
property var pane: QtObject {
|
||||||
property real width: realRoot.width
|
property real width: root.width
|
||||||
property real height: realRoot.height
|
property real height: root.height
|
||||||
|
}
|
||||||
|
|
||||||
property int titleWidth: 0
|
function tryDestroy() {
|
||||||
property string iconText: hifi.glyphs.avatar
|
canceled()
|
||||||
property int iconSize: 35
|
|
||||||
|
|
||||||
property var pane: QtObject {
|
|
||||||
property real width: root.width
|
|
||||||
property real height: root.height
|
|
||||||
}
|
|
||||||
|
|
||||||
function tryDestroy() {
|
|
||||||
canceled()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
width: realRoot.width
|
width: root.width
|
||||||
height: realRoot.height
|
height: root.height
|
||||||
}
|
}
|
||||||
|
|
||||||
property bool keyboardOverride: true
|
property bool keyboardOverride: true
|
||||||
|
@ -75,32 +64,13 @@ Windows.TabletModalWindow {
|
||||||
|
|
||||||
HifiStylesUit.HifiConstants { id: hifi }
|
HifiStylesUit.HifiConstants { id: hifi }
|
||||||
|
|
||||||
Item {
|
readonly property int frameMarginTop: hifi.dimensions.modalDialogMargin.y
|
||||||
id: mfRoot
|
|
||||||
|
|
||||||
readonly property int frameMarginTop: hifi.dimensions.modalDialogMargin.y
|
LoginDialog {
|
||||||
width: root.width
|
id: loginDialog
|
||||||
height: root.height + frameMarginTop + hifi.dimensions.contentMargin.x
|
|
||||||
|
|
||||||
anchors {
|
Loader {
|
||||||
horizontalCenter: parent.horizontalCenter
|
id: bodyLoader
|
||||||
verticalCenter: parent.verticalCenter
|
|
||||||
}
|
|
||||||
|
|
||||||
LoginDialog {
|
|
||||||
id: loginDialog
|
|
||||||
|
|
||||||
anchors {
|
|
||||||
fill: parent
|
|
||||||
topMargin: parent.frameMarginTop
|
|
||||||
horizontalCenter: parent.horizontalCenter
|
|
||||||
}
|
|
||||||
|
|
||||||
Loader {
|
|
||||||
id: bodyLoader
|
|
||||||
anchors.fill: parent
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,9 +80,9 @@ Windows.TabletModalWindow {
|
||||||
numeric: root.punctuationMode
|
numeric: root.punctuationMode
|
||||||
password: root.isPassword
|
password: root.isPassword
|
||||||
anchors {
|
anchors {
|
||||||
left: parent.left
|
left: bodyLoader.left
|
||||||
right: parent.right
|
right: bodyLoader.right
|
||||||
bottom: parent.bottom
|
top: bodyLoader.bottom
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,7 +108,6 @@ Windows.TabletModalWindow {
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
} else switch (event.key) {
|
} else switch (event.key) {
|
||||||
|
|
||||||
case Qt.Key_Enter:
|
case Qt.Key_Enter:
|
||||||
case Qt.Key_Return:
|
case Qt.Key_Return:
|
||||||
event.accepted = true
|
event.accepted = true
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
#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)
|
||||||
|
@ -75,8 +74,8 @@ void LoginDialog::showWithSelection() {
|
||||||
} else {
|
} else {
|
||||||
tablet->initialScreen(TABLET_LOGIN_DIALOG_URL);
|
tablet->initialScreen(TABLET_LOGIN_DIALOG_URL);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!hmd->getShouldShowTablet()) {
|
if (!hmd->getShouldShowTablet()) {
|
||||||
hmd->openTablet();
|
hmd->openTablet();
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
#include <OffscreenQmlDialog.h>
|
#include <OffscreenQmlDialog.h>
|
||||||
#include <SettingHandle.h>
|
#include <SettingHandle.h>
|
||||||
|
|
||||||
|
#include "ui/overlays/Web3DOverlay.h"
|
||||||
|
|
||||||
class QNetworkReply;
|
class QNetworkReply;
|
||||||
class Web3DOverlay;
|
class Web3DOverlay;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue