From 1b7b35fe9138322995a0aa483e3a570db5d628c6 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Wed, 18 Oct 2017 15:44:06 -0700 Subject: [PATCH] What does Rez mean? --- .../qml/hifi/commerce/checkout/Checkout.qml | 42 +++++++++++++++++- .../FirstUseTutorial.qml | 8 +++- .../images/Purchase-First-Run-1.jpg | Bin .../images/Purchase-First-Run-2.jpg | Bin .../qml/hifi/commerce/purchases/Purchases.qml | 2 +- 5 files changed, 49 insertions(+), 3 deletions(-) rename interface/resources/qml/hifi/commerce/{purchases => common}/FirstUseTutorial.qml (97%) rename interface/resources/qml/hifi/commerce/{purchases => common}/images/Purchase-First-Run-1.jpg (100%) rename interface/resources/qml/hifi/commerce/{purchases => common}/images/Purchase-First-Run-2.jpg (100%) diff --git a/interface/resources/qml/hifi/commerce/checkout/Checkout.qml b/interface/resources/qml/hifi/commerce/checkout/Checkout.qml index 8d94e284ed..c381988380 100644 --- a/interface/resources/qml/hifi/commerce/checkout/Checkout.qml +++ b/interface/resources/qml/hifi/commerce/checkout/Checkout.qml @@ -239,6 +239,24 @@ Rectangle { } } } + } + + HifiCommerceCommon.FirstUseTutorial { + id: firstUseTutorial; + z: 999; + visible: root.activeView === "firstUseTutorial"; + anchors.fill: parent; + + Connections { + onSendSignalToParent: { + switch (message.method) { + case 'tutorial_skipClicked': + case 'tutorial_finished': + root.activeView = "checkoutSuccess"; + break; + } + } + } } // @@ -611,6 +629,28 @@ Rectangle { lightboxPopup.visible = true; } } + RalewaySemiBold { + id: explainRezText; + //visible: !root.isWearable; + text: 'What does "Rez" mean?' + // Text size + size: 16; + // Anchors + anchors.top: noPermissionText.visible ? noPermissionText.bottom : rezNowButton.bottom; + anchors.topMargin: 6; + height: paintedHeight; + anchors.left: parent.left; + anchors.right: parent.right; + // Style + color: hifi.colors.redAccent; + wrapMode: Text.WordWrap; + // Alignment + horizontalAlignment: Text.AlignHCenter; + verticalAlignment: Text.AlignVCenter; + onLinkActivated: { + root.activeView = "firstUseTutorial"; + } + } RalewaySemiBold { id: myPurchasesLink; @@ -618,7 +658,7 @@ Rectangle { // Text size size: 20; // Anchors - anchors.top: noPermissionText.visible ? noPermissionText.bottom : rezNowButton.bottom; + anchors.top: explainRezText.visible ? explainRezText.bottom : (noPermissionText.visible ? noPermissionText.bottom : rezNowButton.bottom); anchors.topMargin: 40; height: paintedHeight; anchors.left: parent.left; diff --git a/interface/resources/qml/hifi/commerce/purchases/FirstUseTutorial.qml b/interface/resources/qml/hifi/commerce/common/FirstUseTutorial.qml similarity index 97% rename from interface/resources/qml/hifi/commerce/purchases/FirstUseTutorial.qml rename to interface/resources/qml/hifi/commerce/common/FirstUseTutorial.qml index 2e8ad6db65..0d3f67ef7a 100644 --- a/interface/resources/qml/hifi/commerce/purchases/FirstUseTutorial.qml +++ b/interface/resources/qml/hifi/commerce/common/FirstUseTutorial.qml @@ -25,7 +25,13 @@ Rectangle { HifiConstants { id: hifi; } id: root; - property int activeView: 1; + property int activeView: 1; + + onVisibleChanged: { + if (visible) { + root.activeView = 1; + } + } Image { anchors.fill: parent; diff --git a/interface/resources/qml/hifi/commerce/purchases/images/Purchase-First-Run-1.jpg b/interface/resources/qml/hifi/commerce/common/images/Purchase-First-Run-1.jpg similarity index 100% rename from interface/resources/qml/hifi/commerce/purchases/images/Purchase-First-Run-1.jpg rename to interface/resources/qml/hifi/commerce/common/images/Purchase-First-Run-1.jpg diff --git a/interface/resources/qml/hifi/commerce/purchases/images/Purchase-First-Run-2.jpg b/interface/resources/qml/hifi/commerce/common/images/Purchase-First-Run-2.jpg similarity index 100% rename from interface/resources/qml/hifi/commerce/purchases/images/Purchase-First-Run-2.jpg rename to interface/resources/qml/hifi/commerce/common/images/Purchase-First-Run-2.jpg diff --git a/interface/resources/qml/hifi/commerce/purchases/Purchases.qml b/interface/resources/qml/hifi/commerce/purchases/Purchases.qml index b5697f687d..d75fd6604b 100644 --- a/interface/resources/qml/hifi/commerce/purchases/Purchases.qml +++ b/interface/resources/qml/hifi/commerce/purchases/Purchases.qml @@ -241,7 +241,7 @@ Rectangle { } } - FirstUseTutorial { + HifiCommerceCommon.FirstUseTutorial { id: firstUseTutorial; z: 999; visible: root.activeView === "firstUseTutorial";