mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 12:33:37 +02:00
Fix Avatar apps warnings. Added notification for HMD.active property
This commit is contained in:
parent
4e7a777fda
commit
c05e3e7d09
5 changed files with 22 additions and 20 deletions
interface
libraries/display-plugins/src/display-plugins
|
@ -10,7 +10,7 @@ import "avatarapp"
|
|||
Rectangle {
|
||||
id: root
|
||||
width: 480
|
||||
height: 706
|
||||
height: 706
|
||||
|
||||
property bool keyboardEnabled: true
|
||||
property bool keyboardRaised: false
|
||||
|
@ -415,7 +415,7 @@ Rectangle {
|
|||
width: 21.2
|
||||
height: 19.3
|
||||
source: isAvatarInFavorites ? '../../images/FavoriteIconActive.svg' : '../../images/FavoriteIconInActive.svg'
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
}
|
||||
|
||||
// TextStyle5
|
||||
|
@ -424,7 +424,7 @@ Rectangle {
|
|||
Layout.fillWidth: true
|
||||
text: isAvatarInFavorites ? avatarName : "Add to Favorites"
|
||||
elide: Qt.ElideRight
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -153,7 +153,7 @@ Rectangle {
|
|||
visible = false;
|
||||
adjustWearablesClosed(status, avatarName);
|
||||
}
|
||||
|
||||
|
||||
|
||||
HifiConstants { id: hifi }
|
||||
|
||||
|
@ -226,7 +226,7 @@ Rectangle {
|
|||
lineHeightMode: Text.FixedHeight
|
||||
lineHeight: 18;
|
||||
text: "Wearable"
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
}
|
||||
|
||||
spacing: 10
|
||||
|
@ -237,7 +237,7 @@ Rectangle {
|
|||
lineHeight: 18;
|
||||
text: "<a href='#'>Get more</a>"
|
||||
linkColor: hifi.colors.blueHighlight
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
onLinkActivated: {
|
||||
popup.showGetWearables(function() {
|
||||
emitSendToScript({'method' : 'navigate', 'url' : 'hifi://AvatarIsland/11.5848,-8.10862,-2.80195'})
|
||||
|
|
|
@ -103,11 +103,11 @@ Rectangle {
|
|||
size: 17;
|
||||
text: "Avatar Scale"
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.fillWidth: true
|
||||
|
||||
spacing: 0
|
||||
|
@ -117,7 +117,7 @@ Rectangle {
|
|||
text: 'T'
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
}
|
||||
|
||||
HifiControlsUit.Slider {
|
||||
|
@ -135,7 +135,7 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.fillWidth: true
|
||||
|
||||
// TextStyle9
|
||||
|
@ -164,7 +164,7 @@ Rectangle {
|
|||
text: 'T'
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -327,8 +327,7 @@ Rectangle {
|
|||
InputTextStyle4 {
|
||||
id: avatarAnimationUrlInputText
|
||||
font.pixelSize: 17
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
Layout.fillWidth: true
|
||||
placeholderText: 'user\\file\\dir'
|
||||
|
||||
onFocusChanged: {
|
||||
|
@ -357,8 +356,7 @@ Rectangle {
|
|||
InputTextStyle4 {
|
||||
id: avatarCollisionSoundUrlInputText
|
||||
font.pixelSize: 17
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
Layout.fillWidth: true
|
||||
placeholderText: 'https://hifi-public.s3.amazonaws.com/sounds/Collisions-'
|
||||
|
||||
onFocusChanged: {
|
||||
|
|
|
@ -1779,7 +1779,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
|||
updateHeartbeat();
|
||||
QTimer* settingsTimer = new QTimer();
|
||||
moveToNewNamedThread(settingsTimer, "Settings Thread", [this, settingsTimer]{
|
||||
// This needs to run on the settings thread, so we need to pass the `settingsTimer` as the
|
||||
// This needs to run on the settings thread, so we need to pass the `settingsTimer` as the
|
||||
// receiver object, otherwise it will run on the application thread and trigger a warning
|
||||
// about trying to kill the timer on the main thread.
|
||||
connect(qApp, &Application::beforeAboutToQuit, settingsTimer, [this, settingsTimer]{
|
||||
|
@ -2662,7 +2662,7 @@ Application::~Application() {
|
|||
|
||||
// shutdown graphics engine
|
||||
_graphicsEngine.shutdown();
|
||||
|
||||
|
||||
_gameWorkload.shutdown();
|
||||
|
||||
DependencyManager::destroy<Preferences>();
|
||||
|
@ -2838,6 +2838,8 @@ void Application::initializeDisplayPlugins() {
|
|||
auto hmdDisplayPlugin = dynamic_cast<HmdDisplayPlugin*>(displayPlugin.get());
|
||||
QObject::connect(hmdDisplayPlugin, &HmdDisplayPlugin::hmdMountedChanged,
|
||||
DependencyManager::get<HMDScriptingInterface>().data(), &HMDScriptingInterface::mountedChanged);
|
||||
QObject::connect(hmdDisplayPlugin, &HmdDisplayPlugin::hmdMountedChanged,
|
||||
DependencyManager::get<HMDScriptingInterface>().data(), &HMDScriptingInterface::activeChanged);
|
||||
QObject::connect(hmdDisplayPlugin, &HmdDisplayPlugin::hmdVisibleChanged, this, &Application::hmdVisibleChanged);
|
||||
}
|
||||
}
|
||||
|
@ -8572,7 +8574,7 @@ QUuid Application::getTabletFrameID() const {
|
|||
}
|
||||
|
||||
QVector<QUuid> Application::getTabletIDs() const {
|
||||
// Most important overlays first.
|
||||
// Most important overlays first.
|
||||
QVector<QUuid> result;
|
||||
auto HMD = DependencyManager::get<HMDScriptingInterface>();
|
||||
result << HMD->getCurrentTabletScreenID();
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
// These properties have JSDoc documentation in HMDScriptingInterface.h.
|
||||
class AbstractHMDScriptingInterface : public QObject {
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(bool active READ isHMDMode)
|
||||
Q_PROPERTY(bool active READ isHMDMode NOTIFY activeChanged)
|
||||
Q_PROPERTY(float ipd READ getIPD)
|
||||
Q_PROPERTY(float eyeHeight READ getEyeHeight)
|
||||
Q_PROPERTY(float playerHeight READ getPlayerHeight)
|
||||
|
@ -43,7 +43,7 @@ signals:
|
|||
/**jsdoc
|
||||
* Triggered when Interface's display mode changes and when the user puts on or takes off their HMD.
|
||||
* @function HMD.displayModeChanged
|
||||
* @param {boolean} isHMDMode - <code>true</code> if the display mode is HMD, otherwise <code>false</code>. This is the
|
||||
* @param {boolean} isHMDMode - <code>true</code> if the display mode is HMD, otherwise <code>false</code>. This is the
|
||||
* same value as provided by <code>HMD.active</code>.
|
||||
* @returns {Signal}
|
||||
* @example <caption>Report when the display mode changes.</caption>
|
||||
|
@ -67,6 +67,8 @@ signals:
|
|||
*/
|
||||
void mountedChanged();
|
||||
|
||||
void activeChanged();
|
||||
|
||||
private:
|
||||
float _IPDScale{ 1.0 };
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue