mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-14 14:36:55 +02:00
Merge branch 'tablet-ui-edit-js' of github.com:sethalves/hifi into menuFix
This commit is contained in:
commit
80551cf0dd
6 changed files with 23 additions and 14 deletions
|
@ -831,6 +831,9 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
|||
connect(this, &QCoreApplication::aboutToQuit, addressManager.data(), &AddressManager::storeCurrentAddress);
|
||||
|
||||
connect(this, &Application::activeDisplayPluginChanged, this, &Application::updateThreadPoolCount);
|
||||
connect(this, &Application::activeDisplayPluginChanged, this, [](){
|
||||
qApp->setProperty(hifi::properties::HMD, qApp->isHMDMode());
|
||||
});
|
||||
|
||||
// Save avatar location immediately after a teleport.
|
||||
connect(myAvatar.get(), &MyAvatar::positionGoneTo,
|
||||
|
|
|
@ -131,7 +131,7 @@ glm::quat HMDScriptingInterface::getOrientation() const {
|
|||
return glm::quat();
|
||||
}
|
||||
|
||||
bool HMDScriptingInterface::isMounted() const{
|
||||
bool HMDScriptingInterface::isMounted() const {
|
||||
auto displayPlugin = qApp->getActiveDisplayPlugin();
|
||||
return (displayPlugin->isHmd() && displayPlugin->isDisplayVisible());
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include <AccountManager.h>
|
||||
#include <NetworkAccessManager.h>
|
||||
#include <GLMHelpers.h>
|
||||
#include <shared/GlobalAppProperties.h>
|
||||
|
||||
#include "OffscreenGLCanvas.h"
|
||||
#include "GLHelpers.h"
|
||||
|
@ -911,20 +912,23 @@ void OffscreenQmlSurface::setKeyboardRaised(QObject* object, bool raised, bool n
|
|||
return;
|
||||
}
|
||||
|
||||
QQuickItem* item = dynamic_cast<QQuickItem*>(object);
|
||||
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 HMD is being worn, allow keyboard to open. allow it to close, HMD or not.
|
||||
if (!raised || qApp->property(hifi::properties::HMD).toBool()) {
|
||||
QQuickItem* item = dynamic_cast<QQuickItem*>(object);
|
||||
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()) {
|
||||
// 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("keyboardRaised").isValid()) {
|
||||
// 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));
|
||||
}
|
||||
item->setProperty("keyboardRaised", QVariant(raised));
|
||||
return;
|
||||
}
|
||||
item->setProperty("keyboardRaised", QVariant(raised));
|
||||
return;
|
||||
item = dynamic_cast<QQuickItem*>(item->parentItem());
|
||||
}
|
||||
item = dynamic_cast<QQuickItem*>(item->parentItem());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ namespace hifi { namespace properties {
|
|||
const char* OCULUS_STORE = "com.highfidelity.oculusStore";
|
||||
const char* TEST = "com.highfidelity.test";
|
||||
const char* TRACING = "com.highfidelity.tracing";
|
||||
const char* HMD = "com.highfidelity.hmd";
|
||||
|
||||
namespace gl {
|
||||
const char* BACKEND = "com.highfidelity.gl.backend";
|
||||
|
|
|
@ -18,6 +18,7 @@ namespace hifi { namespace properties {
|
|||
extern const char* OCULUS_STORE;
|
||||
extern const char* TEST;
|
||||
extern const char* TRACING;
|
||||
extern const char* HMD;
|
||||
|
||||
namespace gl {
|
||||
extern const char* BACKEND;
|
||||
|
|
|
@ -1806,7 +1806,7 @@ SelectionDisplay = (function() {
|
|||
|
||||
if (selectionManager.selections.length == 1) {
|
||||
var properties = Entities.getEntityProperties(selectionManager.selections[0]);
|
||||
if (properties.type == "Light" && properties.isSpotlight === true) {
|
||||
if (properties.type == "Light" && properties.isSpotlight) {
|
||||
stretchHandlesVisible = false;
|
||||
extendedStretchHandlesVisible = false;
|
||||
|
||||
|
@ -1901,7 +1901,7 @@ SelectionDisplay = (function() {
|
|||
Overlays.editOverlay(grabberPointLightN, {
|
||||
visible: false
|
||||
});
|
||||
} else if (properties.type == "Light" && properties.isSpotlight === false) {
|
||||
} else if (properties.type == "Light" && !properties.isSpotlight) {
|
||||
stretchHandlesVisible = false;
|
||||
extendedStretchHandlesVisible = false;
|
||||
Overlays.editOverlay(grabberPointLightT, {
|
||||
|
|
Loading…
Reference in a new issue