mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 02:36:54 +02:00
it's a start
This commit is contained in:
parent
7bcfd0cf8d
commit
abdd50fb45
7 changed files with 50 additions and 32 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -85,4 +85,7 @@ npm-debug.log
|
||||||
android/app/src/main/assets
|
android/app/src/main/assets
|
||||||
|
|
||||||
# Resource binary file
|
# Resource binary file
|
||||||
interface/compiledResources
|
interface/compiledResources
|
||||||
|
|
||||||
|
# GPUCache
|
||||||
|
interface/resources/GPUCache/*
|
|
@ -90,11 +90,11 @@ Rectangle {
|
||||||
id: introText2;
|
id: introText2;
|
||||||
text: "My Purchases";
|
text: "My Purchases";
|
||||||
// Text size
|
// Text size
|
||||||
size: 28;
|
size: 22;
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.top: introText1.bottom;
|
anchors.top: introText1.bottom;
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
anchors.leftMargin: 12;
|
anchors.leftMargin: 24;
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
height: paintedHeight;
|
height: paintedHeight;
|
||||||
// Style
|
// Style
|
||||||
|
|
|
@ -39,7 +39,10 @@ Item {
|
||||||
property int itemEdition;
|
property int itemEdition;
|
||||||
property int numberSold;
|
property int numberSold;
|
||||||
property int limitedRun;
|
property int limitedRun;
|
||||||
property bool isWearable;
|
property string itemType;
|
||||||
|
property var itemTypesArray: ["entity", "wearable", "contentSet", "app", "avatar"];
|
||||||
|
property var buttonTextNormal: ["REZ", "WEAR", "SWAP", "INSTALL", "WEAR"];
|
||||||
|
property var buttonTextClicked: ["REZZED", "WORN", "SWAPPED", "INSTALLED", "WORN"]
|
||||||
|
|
||||||
property string originalStatusText;
|
property string originalStatusText;
|
||||||
property string originalStatusColor;
|
property string originalStatusColor;
|
||||||
|
@ -73,10 +76,10 @@ Item {
|
||||||
color: hifi.colors.white;
|
color: hifi.colors.white;
|
||||||
// Size
|
// Size
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
anchors.leftMargin: 8;
|
anchors.leftMargin: 16;
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
anchors.rightMargin: 8;
|
anchors.rightMargin: 16;
|
||||||
anchors.top: parent.top;
|
anchors.verticalCenter: parent.verticalCenter;
|
||||||
height: root.height - 10;
|
height: root.height - 10;
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
|
@ -311,7 +314,7 @@ Item {
|
||||||
id: rezzedNotifContainer;
|
id: rezzedNotifContainer;
|
||||||
z: 998;
|
z: 998;
|
||||||
visible: false;
|
visible: false;
|
||||||
color: hifi.colors.blueHighlight;
|
color: "#1FC6A6";
|
||||||
anchors.fill: buttonContainer;
|
anchors.fill: buttonContainer;
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
|
@ -321,7 +324,7 @@ Item {
|
||||||
|
|
||||||
RalewayBold {
|
RalewayBold {
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
text: "REZZED";
|
text: (root.buttonTextClicked)[itemTypesArray.indexOf(root.itemType)];
|
||||||
size: 18;
|
size: 18;
|
||||||
color: hifi.colors.white;
|
color: hifi.colors.white;
|
||||||
verticalAlignment: Text.AlignVCenter;
|
verticalAlignment: Text.AlignVCenter;
|
||||||
|
@ -337,25 +340,28 @@ Item {
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
id: buttonContainer;
|
id: buttonContainer;
|
||||||
property int color: hifi.buttons.red;
|
property int color: hifi.buttons.blue;
|
||||||
property int colorScheme: hifi.colorSchemes.light;
|
property int colorScheme: hifi.colorSchemes.light;
|
||||||
|
|
||||||
anchors.top: parent.top;
|
anchors.top: parent.top;
|
||||||
|
anchors.topMargin: 4;
|
||||||
anchors.bottom: parent.bottom;
|
anchors.bottom: parent.bottom;
|
||||||
|
anchors.bottomMargin: 4;
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
|
anchors.rightMargin: 4;
|
||||||
width: height;
|
width: height;
|
||||||
enabled: (root.canRezCertifiedItems || root.isWearable) && root.purchaseStatus !== "invalidated";
|
enabled: (root.canRezCertifiedItems || root.itemType === "wearable") && root.purchaseStatus !== "invalidated";
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
sendToPurchases({method: 'purchases_rezClicked', itemHref: root.itemHref, isWearable: root.isWearable});
|
sendToPurchases({method: 'purchases_rezClicked', itemHref: root.itemHref, itemType: root.itemType});
|
||||||
rezzedNotifContainer.visible = true;
|
rezzedNotifContainer.visible = true;
|
||||||
rezzedNotifContainerTimer.start();
|
rezzedNotifContainerTimer.start();
|
||||||
UserActivityLogger.commerceEntityRezzed(root.itemId, "purchases", root.isWearable ? "rez" : "wear");
|
UserActivityLogger.commerceEntityRezzed(root.itemId, "purchases", root.itemType === "wearable" ? "rez" : "wear");
|
||||||
}
|
}
|
||||||
|
|
||||||
style: ButtonStyle {
|
style: ButtonStyle {
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
|
radius: 4;
|
||||||
gradient: Gradient {
|
gradient: Gradient {
|
||||||
GradientStop {
|
GradientStop {
|
||||||
position: 0.2
|
position: 0.2
|
||||||
|
@ -413,10 +419,10 @@ Item {
|
||||||
font.capitalization: Font.AllUppercase
|
font.capitalization: Font.AllUppercase
|
||||||
color: enabled ? hifi.buttons.textColor[control.color]
|
color: enabled ? hifi.buttons.textColor[control.color]
|
||||||
: hifi.buttons.disabledTextColor[control.colorScheme]
|
: hifi.buttons.disabledTextColor[control.colorScheme]
|
||||||
size: 16;
|
size: 15;
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
text: root.isWearable ? "Wear It" : "Rez It"
|
text: (root.buttonTextNormal)[itemTypesArray.indexOf(root.itemType)]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -425,11 +431,11 @@ Item {
|
||||||
|
|
||||||
DropShadow {
|
DropShadow {
|
||||||
anchors.fill: mainContainer;
|
anchors.fill: mainContainer;
|
||||||
horizontalOffset: 3;
|
horizontalOffset: 0;
|
||||||
verticalOffset: 3;
|
verticalOffset: 4;
|
||||||
radius: 8.0;
|
radius: 4.0;
|
||||||
samples: 17;
|
samples: 9
|
||||||
color: "#80000000";
|
color: Qt.rgba(0, 0, 0, 0.25);
|
||||||
source: mainContainer;
|
source: mainContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -308,11 +308,11 @@ Rectangle {
|
||||||
anchors.bottom: parent.bottom;
|
anchors.bottom: parent.bottom;
|
||||||
anchors.bottomMargin: 10;
|
anchors.bottomMargin: 10;
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
anchors.leftMargin: 4;
|
anchors.leftMargin: 16;
|
||||||
width: paintedWidth;
|
width: paintedWidth;
|
||||||
text: isShowingMyItems ? "My Items" : "My Purchases";
|
text: isShowingMyItems ? "My Items" : "My Purchases";
|
||||||
color: hifi.colors.baseGray;
|
color: hifi.colors.baseGray;
|
||||||
size: 28;
|
size: 22;
|
||||||
}
|
}
|
||||||
|
|
||||||
HifiControlsUit.TextField {
|
HifiControlsUit.TextField {
|
||||||
|
@ -323,8 +323,8 @@ Rectangle {
|
||||||
hasRoundedBorder: true;
|
hasRoundedBorder: true;
|
||||||
anchors.left: myText.right;
|
anchors.left: myText.right;
|
||||||
anchors.leftMargin: 16;
|
anchors.leftMargin: 16;
|
||||||
anchors.top: parent.top;
|
height: 39;
|
||||||
anchors.bottom: parent.bottom;
|
anchors.verticalCenter: parent.verticalCenter;
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
placeholderText: "filter items";
|
placeholderText: "filter items";
|
||||||
|
|
||||||
|
@ -454,16 +454,24 @@ 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;
|
itemType: {
|
||||||
anchors.topMargin: 12;
|
if (model.download_url.indexOf(".fst") > -1) {
|
||||||
anchors.bottomMargin: 12;
|
"avatar";
|
||||||
|
} else if (model.categories.indexOf("Wearables") > -1) {
|
||||||
|
"wearable";
|
||||||
|
} else {
|
||||||
|
"entity";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
anchors.topMargin: 10;
|
||||||
|
anchors.bottomMargin: 10;
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
onSendToPurchases: {
|
onSendToPurchases: {
|
||||||
if (msg.method === 'purchases_itemInfoClicked') {
|
if (msg.method === 'purchases_itemInfoClicked') {
|
||||||
sendToScript({method: 'purchases_itemInfoClicked', itemId: itemId});
|
sendToScript({method: 'purchases_itemInfoClicked', itemId: itemId});
|
||||||
} else if (msg.method === "purchases_rezClicked") {
|
} else if (msg.method === "purchases_rezClicked") {
|
||||||
sendToScript({method: 'purchases_rezClicked', itemHref: itemHref, isWearable: isWearable});
|
sendToScript({method: 'purchases_rezClicked', itemHref: itemHref, itemType: itemType});
|
||||||
} else if (msg.method === 'purchases_itemCertificateClicked') {
|
} else if (msg.method === 'purchases_itemCertificateClicked') {
|
||||||
inspectionCertificate.visible = true;
|
inspectionCertificate.visible = true;
|
||||||
inspectionCertificate.isLightbox = true;
|
inspectionCertificate.isLightbox = true;
|
||||||
|
|
Binary file not shown.
|
@ -39,7 +39,7 @@
|
||||||
// for toolbar-mode: go back to home screen, this will close the window.
|
// for toolbar-mode: go back to home screen, this will close the window.
|
||||||
tablet.gotoHomeScreen();
|
tablet.gotoHomeScreen();
|
||||||
} else {
|
} else {
|
||||||
tablet.loadQMLSource(WALLET_QML_SOURCE);
|
tablet.loadQMLSource(MARKETPLACE_PURCHASES_QML_PATH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -231,7 +231,8 @@ var selectionDisplay = null; // for gridTool.js to ignore
|
||||||
return position;
|
return position;
|
||||||
}
|
}
|
||||||
|
|
||||||
function rezEntity(itemHref, isWearable) {
|
function rezEntity(itemHref, itemType) {
|
||||||
|
var isWearable = itemType === "wearable";
|
||||||
var success = Clipboard.importEntities(itemHref);
|
var success = Clipboard.importEntities(itemHref);
|
||||||
var wearableLocalPosition = null;
|
var wearableLocalPosition = null;
|
||||||
var wearableLocalRotation = null;
|
var wearableLocalRotation = null;
|
||||||
|
@ -543,7 +544,7 @@ var selectionDisplay = null; // for gridTool.js to ignore
|
||||||
break;
|
break;
|
||||||
case 'checkout_rezClicked':
|
case 'checkout_rezClicked':
|
||||||
case 'purchases_rezClicked':
|
case 'purchases_rezClicked':
|
||||||
rezEntity(message.itemHref, message.isWearable);
|
rezEntity(message.itemHref, message.itemType);
|
||||||
break;
|
break;
|
||||||
case 'header_marketplaceImageClicked':
|
case 'header_marketplaceImageClicked':
|
||||||
case 'purchases_backClicked':
|
case 'purchases_backClicked':
|
||||||
|
|
Loading…
Reference in a new issue