mirror of
https://github.com/overte-org/overte.git
synced 2025-07-28 23:20:30 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi into stop-rebinding
This commit is contained in:
commit
c2fe688740
6 changed files with 96 additions and 74 deletions
1
BUILD.md
1
BUILD.md
|
@ -106,3 +106,4 @@ The following build options can be used when running CMake
|
||||||
#### Devices
|
#### Devices
|
||||||
|
|
||||||
You can support external input/output devices such as Leap Motion, MIDI, and more by adding each individual SDK in the visible building path. Refer to the readme file available in each device folder in [interface/external/](interface/external) for the detailed explanation of the requirements to use the device.
|
You can support external input/output devices such as Leap Motion, MIDI, and more by adding each individual SDK in the visible building path. Refer to the readme file available in each device folder in [interface/external/](interface/external) for the detailed explanation of the requirements to use the device.
|
||||||
|
|
|
@ -13,15 +13,14 @@ import QtQuick 2.4
|
||||||
import controlsUit 1.0 as HifiControlsUit
|
import controlsUit 1.0 as HifiControlsUit
|
||||||
import stylesUit 1.0 as HifiStylesUit
|
import stylesUit 1.0 as HifiStylesUit
|
||||||
|
|
||||||
import "LoginDialog"
|
|
||||||
|
|
||||||
FocusScope {
|
FocusScope {
|
||||||
id: root
|
id: root
|
||||||
HifiStylesUit.HifiConstants { id: hifi }
|
|
||||||
objectName: "LoginDialog"
|
objectName: "LoginDialog"
|
||||||
property bool shown: true
|
property bool shown: true
|
||||||
visible: shown
|
visible: shown
|
||||||
|
|
||||||
|
HifiStylesUit.HifiConstants { id: hifi }
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
readonly property bool isTablet: false
|
readonly property bool isTablet: false
|
||||||
|
@ -33,12 +32,17 @@ FocusScope {
|
||||||
property bool keyboardRaised: false
|
property bool keyboardRaised: false
|
||||||
property bool punctuationMode: false
|
property bool punctuationMode: false
|
||||||
property bool isPassword: false
|
property bool isPassword: false
|
||||||
property string title: ""
|
|
||||||
property string text: ""
|
|
||||||
property int titleWidth: 0
|
|
||||||
property alias bannerWidth: banner.width
|
property alias bannerWidth: banner.width
|
||||||
property alias bannerHeight: banner.height
|
property alias bannerHeight: banner.height
|
||||||
|
|
||||||
|
property string title: ""
|
||||||
|
property string text: ""
|
||||||
|
|
||||||
|
property int titleWidth: 0
|
||||||
|
|
||||||
|
property bool isHMD: HMD.active
|
||||||
|
|
||||||
function tryDestroy() {
|
function tryDestroy() {
|
||||||
root.destroy()
|
root.destroy()
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,43 +23,36 @@ FocusScope {
|
||||||
objectName: "LoginDialog"
|
objectName: "LoginDialog"
|
||||||
visible: true
|
visible: true
|
||||||
|
|
||||||
|
HifiStylesUit.HifiConstants { id: hifi }
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
width: parent.width
|
|
||||||
height: parent.height
|
|
||||||
|
|
||||||
property var tabletProxy: Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
readonly property bool isTablet: true
|
||||||
|
readonly property bool isOverlay: false
|
||||||
property bool isHMD: HMD.active
|
|
||||||
property bool gotoPreviousApp: false;
|
|
||||||
|
|
||||||
|
property string iconText: hifi.glyphs.avatar
|
||||||
|
property int iconSize: 35
|
||||||
property bool keyboardEnabled: false
|
property bool keyboardEnabled: false
|
||||||
property bool keyboardRaised: false
|
property bool keyboardRaised: false
|
||||||
property bool punctuationMode: false
|
property bool punctuationMode: false
|
||||||
property bool isPassword: false
|
property bool isPassword: false
|
||||||
|
|
||||||
readonly property bool isTablet: true
|
|
||||||
readonly property bool isOverlay: false
|
|
||||||
property alias text: loginKeyboard.mirroredText
|
|
||||||
|
|
||||||
property int titleWidth: 0
|
|
||||||
property alias bannerWidth: banner.width
|
property alias bannerWidth: banner.width
|
||||||
property alias bannerHeight: banner.height
|
property alias bannerHeight: banner.height
|
||||||
property string iconText: hifi.glyphs.avatar
|
|
||||||
property int iconSize: 35
|
|
||||||
|
|
||||||
property var pane: QtObject {
|
property int titleWidth: 0
|
||||||
property real width: root.width
|
|
||||||
property real height: root.height
|
|
||||||
}
|
|
||||||
|
|
||||||
function tryDestroy() {
|
property bool isHMD: HMD.active
|
||||||
tabletProxy.gotoHomeScreen();
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
// TABLET SPECIFIC PROPERTIES START //
|
||||||
width: root.width
|
property alias text: loginKeyboard.mirroredText
|
||||||
height: root.height
|
|
||||||
}
|
width: parent.width
|
||||||
|
height: parent.height
|
||||||
|
|
||||||
|
property var tabletProxy: Tablet.getTablet("com.highfidelity.interface.tablet.system")
|
||||||
|
|
||||||
|
property bool gotoPreviousApp: false
|
||||||
|
|
||||||
property bool keyboardOverride: true
|
property bool keyboardOverride: true
|
||||||
|
|
||||||
|
@ -70,7 +63,20 @@ FocusScope {
|
||||||
property alias loginDialog: loginDialog
|
property alias loginDialog: loginDialog
|
||||||
property alias hifi: hifi
|
property alias hifi: hifi
|
||||||
|
|
||||||
HifiStylesUit.HifiConstants { id: hifi }
|
property var pane: QtObject {
|
||||||
|
property real width: root.width
|
||||||
|
property real height: root.height
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
width: root.width
|
||||||
|
height: root.height
|
||||||
|
}
|
||||||
|
// TABLET SPECIFIC PROPERTIES END //
|
||||||
|
|
||||||
|
function tryDestroy() {
|
||||||
|
tabletProxy.gotoHomeScreen();
|
||||||
|
}
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
id: keyboardTimer
|
id: keyboardTimer
|
||||||
|
@ -102,6 +108,15 @@ FocusScope {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
z: -6
|
||||||
|
id: opaqueRect
|
||||||
|
height: parent.height
|
||||||
|
width: parent.width
|
||||||
|
opacity: 0.65
|
||||||
|
color: "black"
|
||||||
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
z: -5
|
z: -5
|
||||||
id: bannerContainer
|
id: bannerContainer
|
||||||
|
@ -119,15 +134,6 @@ FocusScope {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
z: -6
|
|
||||||
id: opaqueRect
|
|
||||||
height: parent.height
|
|
||||||
width: parent.width
|
|
||||||
opacity: 0.65
|
|
||||||
color: "black"
|
|
||||||
}
|
|
||||||
|
|
||||||
HifiControlsUit.Keyboard {
|
HifiControlsUit.Keyboard {
|
||||||
id: loginKeyboard
|
id: loginKeyboard
|
||||||
raised: root.keyboardEnabled && root.keyboardRaised
|
raised: root.keyboardEnabled && root.keyboardRaised
|
||||||
|
|
|
@ -48,7 +48,8 @@ Rectangle {
|
||||||
onSkeletonModelURLChanged: {
|
onSkeletonModelURLChanged: {
|
||||||
root.updatePreviewUrl();
|
root.updatePreviewUrl();
|
||||||
|
|
||||||
if (MyAvatar.skeletonModelURL.indexOf("defaultAvatar" > -1) && topBarInventoryModel.count > 0) {
|
if ((MyAvatar.skeletonModelURL.indexOf("defaultAvatar") > -1 || MyAvatar.skeletonModelURL.indexOf("fst") === -1) &&
|
||||||
|
topBarInventoryModel.count > 0) {
|
||||||
Settings.setValue("simplifiedUI/alreadyAutoSelectedAvatar", true);
|
Settings.setValue("simplifiedUI/alreadyAutoSelectedAvatar", true);
|
||||||
MyAvatar.skeletonModelURL = topBarInventoryModel.get(0).download_url;
|
MyAvatar.skeletonModelURL = topBarInventoryModel.get(0).download_url;
|
||||||
}
|
}
|
||||||
|
@ -100,7 +101,8 @@ Rectangle {
|
||||||
inventoryFullyReceived = true;
|
inventoryFullyReceived = true;
|
||||||
|
|
||||||
// If we have an avatar in our inventory AND we haven't already auto-selected an avatar...
|
// If we have an avatar in our inventory AND we haven't already auto-selected an avatar...
|
||||||
if (!Settings.getValue("simplifiedUI/alreadyAutoSelectedAvatar", false) && topBarInventoryModel.count > 0) {
|
if ((!Settings.getValue("simplifiedUI/alreadyAutoSelectedAvatar", false) ||
|
||||||
|
MyAvatar.skeletonModelURL.indexOf("defaultAvatar") > -1 || MyAvatar.skeletonModelURL.indexOf("fst") === -1) && topBarInventoryModel.count > 0) {
|
||||||
Settings.setValue("simplifiedUI/alreadyAutoSelectedAvatar", true);
|
Settings.setValue("simplifiedUI/alreadyAutoSelectedAvatar", true);
|
||||||
MyAvatar.skeletonModelURL = topBarInventoryModel.get(0).download_url;
|
MyAvatar.skeletonModelURL = topBarInventoryModel.get(0).download_url;
|
||||||
}
|
}
|
||||||
|
|
|
@ -262,7 +262,7 @@ class Stats : public QQuickItem {
|
||||||
STATS_PROPERTY(int, processing, 0)
|
STATS_PROPERTY(int, processing, 0)
|
||||||
STATS_PROPERTY(int, processingPending, 0)
|
STATS_PROPERTY(int, processingPending, 0)
|
||||||
STATS_PROPERTY(int, triangles, 0)
|
STATS_PROPERTY(int, triangles, 0)
|
||||||
STATS_PROPERTY(uint32_t, drawcalls, 0)
|
STATS_PROPERTY(quint32 , drawcalls, 0)
|
||||||
STATS_PROPERTY(int, materialSwitches, 0)
|
STATS_PROPERTY(int, materialSwitches, 0)
|
||||||
STATS_PROPERTY(int, itemConsidered, 0)
|
STATS_PROPERTY(int, itemConsidered, 0)
|
||||||
STATS_PROPERTY(int, itemOutOfView, 0)
|
STATS_PROPERTY(int, itemOutOfView, 0)
|
||||||
|
|
|
@ -686,43 +686,52 @@ void OffscreenQmlSurface::setKeyboardRaised(QObject* object, bool raised, bool n
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(Q_OS_ANDROID)
|
bool android = false;
|
||||||
// if HMD is being worn, allow keyboard to open. allow it to close, HMD or not.
|
#if defined(Q_OS_ANDROID)
|
||||||
if (!raised || qApp->property(hifi::properties::HMD).toBool()) {
|
android = true;
|
||||||
QQuickItem* item = dynamic_cast<QQuickItem*>(object);
|
#endif
|
||||||
if (!item) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// for future probably makes sense to consider one of the following:
|
bool hmd = qApp->property(hifi::properties::HMD).toBool();
|
||||||
// 1. make keyboard a singleton, which will be dynamically re-parented before showing
|
|
||||||
// 2. track currently visible keyboard somewhere, allow to subscribe for this signal
|
|
||||||
// any of above should also eliminate need in duplicated properties and code below
|
|
||||||
|
|
||||||
while (item) {
|
if (!android || hmd) {
|
||||||
// Numeric value may be set in parameter from HTML UI; for QML UI, detect numeric fields here.
|
// if HMD is being worn, allow keyboard to open. allow it to close, HMD or not.
|
||||||
numeric = numeric || QString(item->metaObject()->className()).left(7) == "SpinBox";
|
if (!raised || hmd) {
|
||||||
|
QQuickItem* item = dynamic_cast<QQuickItem*>(object);
|
||||||
if (item->property("keyboardRaised").isValid()) {
|
if (!item) {
|
||||||
// FIXME - HMD only: Possibly set value of "keyboardEnabled" per isHMDMode() for use in WebView.qml.
|
|
||||||
if (item->property("punctuationMode").isValid()) {
|
|
||||||
item->setProperty("punctuationMode", QVariant(numeric));
|
|
||||||
}
|
|
||||||
if (item->property("passwordField").isValid()) {
|
|
||||||
item->setProperty("passwordField", QVariant(passwordField));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (raised) {
|
|
||||||
item->setProperty("keyboardRaised", QVariant(!raised));
|
|
||||||
}
|
|
||||||
|
|
||||||
item->setProperty("keyboardRaised", QVariant(raised));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
item = dynamic_cast<QQuickItem*>(item->parentItem());
|
|
||||||
|
// for future probably makes sense to consider one of the following:
|
||||||
|
// 1. make keyboard a singleton, which will be dynamically re-parented before showing
|
||||||
|
// 2. track currently visible keyboard somewhere, allow to subscribe for this signal
|
||||||
|
// any of above should also eliminate need in duplicated properties and code below
|
||||||
|
|
||||||
|
while (item) {
|
||||||
|
// Numeric value may be set in parameter from HTML UI; for QML UI, detect numeric fields here.
|
||||||
|
numeric = numeric || QString(item->metaObject()->className()).left(7) == "SpinBox";
|
||||||
|
|
||||||
|
if (item->property("keyboardRaised").isValid()) {
|
||||||
|
|
||||||
|
if (item->property("punctuationMode").isValid()) {
|
||||||
|
item->setProperty("punctuationMode", QVariant(numeric));
|
||||||
|
}
|
||||||
|
if (item->property("passwordField").isValid()) {
|
||||||
|
item->setProperty("passwordField", QVariant(passwordField));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hmd && item->property("keyboardEnabled").isValid()) {
|
||||||
|
item->setProperty("keyboardEnabled", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
item->setProperty("keyboardRaised", QVariant(raised));
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
item = dynamic_cast<QQuickItem*>(item->parentItem());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OffscreenQmlSurface::emitScriptEvent(const QVariant& message) {
|
void OffscreenQmlSurface::emitScriptEvent(const QVariant& message) {
|
||||||
|
|
Loading…
Reference in a new issue