mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 11:42:55 +02:00
Wear It button for items with category 'Wearables'
This commit is contained in:
parent
08cfa32858
commit
949da17046
4 changed files with 8 additions and 3 deletions
|
@ -40,6 +40,7 @@ Rectangle {
|
||||||
property bool shouldBuyWithControlledFailure: false;
|
property bool shouldBuyWithControlledFailure: false;
|
||||||
property bool debugCheckoutSuccess: false;
|
property bool debugCheckoutSuccess: false;
|
||||||
property bool canRezCertifiedItems: Entities.canRezCertified || Entities.canRezTmpCertified;
|
property bool canRezCertifiedItems: Entities.canRezCertified || Entities.canRezTmpCertified;
|
||||||
|
property bool isWearable;
|
||||||
// Style
|
// Style
|
||||||
color: hifi.colors.white;
|
color: hifi.colors.white;
|
||||||
Hifi.QmlCommerce {
|
Hifi.QmlCommerce {
|
||||||
|
@ -573,7 +574,7 @@ Rectangle {
|
||||||
height: 50;
|
height: 50;
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
text: "Rez It"
|
text: root.isWearable ? "Wear It" : "Rez It"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (urlHandler.canHandleUrl(root.itemHref)) {
|
if (urlHandler.canHandleUrl(root.itemHref)) {
|
||||||
urlHandler.handleUrl(root.itemHref);
|
urlHandler.handleUrl(root.itemHref);
|
||||||
|
@ -832,6 +833,7 @@ Rectangle {
|
||||||
itemName = message.params.itemName;
|
itemName = message.params.itemName;
|
||||||
root.itemPrice = message.params.itemPrice;
|
root.itemPrice = message.params.itemPrice;
|
||||||
itemHref = message.params.itemHref;
|
itemHref = message.params.itemHref;
|
||||||
|
root.isWearable = message.params.categories.indexOf("Wearables") > -1;
|
||||||
setBuyText();
|
setBuyText();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -39,6 +39,7 @@ Item {
|
||||||
property int itemEdition;
|
property int itemEdition;
|
||||||
property int numberSold;
|
property int numberSold;
|
||||||
property int limitedRun;
|
property int limitedRun;
|
||||||
|
property bool isWearable;
|
||||||
|
|
||||||
property string originalStatusText;
|
property string originalStatusText;
|
||||||
property string originalStatusColor;
|
property string originalStatusColor;
|
||||||
|
@ -342,7 +343,7 @@ Item {
|
||||||
anchors.bottom: parent.bottom;
|
anchors.bottom: parent.bottom;
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
width: height;
|
width: height;
|
||||||
enabled: root.canRezCertifiedItems && root.purchaseStatus !== "invalidated";
|
enabled: (root.canRezCertifiedItems || root.isWearable) && root.purchaseStatus !== "invalidated";
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (urlHandler.canHandleUrl(root.itemHref)) {
|
if (urlHandler.canHandleUrl(root.itemHref)) {
|
||||||
|
@ -415,7 +416,7 @@ Item {
|
||||||
size: 16;
|
size: 16;
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
text: "Rez It"
|
text: root.isWearable ? "Wear It" : "Rez It"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -434,6 +434,7 @@ Rectangle {
|
||||||
numberSold: model.number_sold;
|
numberSold: model.number_sold;
|
||||||
limitedRun: model.limited_run;
|
limitedRun: model.limited_run;
|
||||||
displayedItemCount: model.displayedItemCount;
|
displayedItemCount: model.displayedItemCount;
|
||||||
|
isWearable: model.categories.indexOf("Wearables") > -1;
|
||||||
anchors.topMargin: 12;
|
anchors.topMargin: 12;
|
||||||
anchors.bottomMargin: 12;
|
anchors.bottomMargin: 12;
|
||||||
|
|
||||||
|
|
|
@ -74,6 +74,7 @@
|
||||||
itemName: 'Test Flaregun',
|
itemName: 'Test Flaregun',
|
||||||
itemPrice: (debugError ? 10 : 17),
|
itemPrice: (debugError ? 10 : 17),
|
||||||
itemHref: 'http://mpassets.highfidelity.com/0d90d21c-ce7a-4990-ad18-e9d2cf991027-v1/flaregun.json',
|
itemHref: 'http://mpassets.highfidelity.com/0d90d21c-ce7a-4990-ad18-e9d2cf991027-v1/flaregun.json',
|
||||||
|
categories: ["Wearables", "Miscellaneous"]
|
||||||
},
|
},
|
||||||
canRezCertifiedItems: Entities.canRezCertified || Entities.canRezTmpCertified
|
canRezCertifiedItems: Entities.canRezCertified || Entities.canRezTmpCertified
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue