mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-16 07:58:05 +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
|
||||
|
||||
# Resource binary file
|
||||
interface/compiledResources
|
||||
interface/compiledResources
|
||||
|
||||
# GPUCache
|
||||
interface/resources/GPUCache/*
|
|
@ -90,11 +90,11 @@ Rectangle {
|
|||
id: introText2;
|
||||
text: "My Purchases";
|
||||
// Text size
|
||||
size: 28;
|
||||
size: 22;
|
||||
// Anchors
|
||||
anchors.top: introText1.bottom;
|
||||
anchors.left: parent.left;
|
||||
anchors.leftMargin: 12;
|
||||
anchors.leftMargin: 24;
|
||||
anchors.right: parent.right;
|
||||
height: paintedHeight;
|
||||
// Style
|
||||
|
|
|
@ -39,7 +39,10 @@ Item {
|
|||
property int itemEdition;
|
||||
property int numberSold;
|
||||
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 originalStatusColor;
|
||||
|
@ -73,10 +76,10 @@ Item {
|
|||
color: hifi.colors.white;
|
||||
// Size
|
||||
anchors.left: parent.left;
|
||||
anchors.leftMargin: 8;
|
||||
anchors.leftMargin: 16;
|
||||
anchors.right: parent.right;
|
||||
anchors.rightMargin: 8;
|
||||
anchors.top: parent.top;
|
||||
anchors.rightMargin: 16;
|
||||
anchors.verticalCenter: parent.verticalCenter;
|
||||
height: root.height - 10;
|
||||
|
||||
Image {
|
||||
|
@ -311,7 +314,7 @@ Item {
|
|||
id: rezzedNotifContainer;
|
||||
z: 998;
|
||||
visible: false;
|
||||
color: hifi.colors.blueHighlight;
|
||||
color: "#1FC6A6";
|
||||
anchors.fill: buttonContainer;
|
||||
MouseArea {
|
||||
anchors.fill: parent;
|
||||
|
@ -321,7 +324,7 @@ Item {
|
|||
|
||||
RalewayBold {
|
||||
anchors.fill: parent;
|
||||
text: "REZZED";
|
||||
text: (root.buttonTextClicked)[itemTypesArray.indexOf(root.itemType)];
|
||||
size: 18;
|
||||
color: hifi.colors.white;
|
||||
verticalAlignment: Text.AlignVCenter;
|
||||
|
@ -337,25 +340,28 @@ Item {
|
|||
|
||||
Button {
|
||||
id: buttonContainer;
|
||||
property int color: hifi.buttons.red;
|
||||
property int color: hifi.buttons.blue;
|
||||
property int colorScheme: hifi.colorSchemes.light;
|
||||
|
||||
anchors.top: parent.top;
|
||||
anchors.topMargin: 4;
|
||||
anchors.bottom: parent.bottom;
|
||||
anchors.bottomMargin: 4;
|
||||
anchors.right: parent.right;
|
||||
anchors.rightMargin: 4;
|
||||
width: height;
|
||||
enabled: (root.canRezCertifiedItems || root.isWearable) && root.purchaseStatus !== "invalidated";
|
||||
enabled: (root.canRezCertifiedItems || root.itemType === "wearable") && root.purchaseStatus !== "invalidated";
|
||||
|
||||
onClicked: {
|
||||
sendToPurchases({method: 'purchases_rezClicked', itemHref: root.itemHref, isWearable: root.isWearable});
|
||||
sendToPurchases({method: 'purchases_rezClicked', itemHref: root.itemHref, itemType: root.itemType});
|
||||
rezzedNotifContainer.visible = true;
|
||||
rezzedNotifContainerTimer.start();
|
||||
UserActivityLogger.commerceEntityRezzed(root.itemId, "purchases", root.isWearable ? "rez" : "wear");
|
||||
UserActivityLogger.commerceEntityRezzed(root.itemId, "purchases", root.itemType === "wearable" ? "rez" : "wear");
|
||||
}
|
||||
|
||||
style: ButtonStyle {
|
||||
|
||||
background: Rectangle {
|
||||
radius: 4;
|
||||
gradient: Gradient {
|
||||
GradientStop {
|
||||
position: 0.2
|
||||
|
@ -413,10 +419,10 @@ Item {
|
|||
font.capitalization: Font.AllUppercase
|
||||
color: enabled ? hifi.buttons.textColor[control.color]
|
||||
: hifi.buttons.disabledTextColor[control.colorScheme]
|
||||
size: 16;
|
||||
size: 15;
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: root.isWearable ? "Wear It" : "Rez It"
|
||||
text: (root.buttonTextNormal)[itemTypesArray.indexOf(root.itemType)]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -425,11 +431,11 @@ Item {
|
|||
|
||||
DropShadow {
|
||||
anchors.fill: mainContainer;
|
||||
horizontalOffset: 3;
|
||||
verticalOffset: 3;
|
||||
radius: 8.0;
|
||||
samples: 17;
|
||||
color: "#80000000";
|
||||
horizontalOffset: 0;
|
||||
verticalOffset: 4;
|
||||
radius: 4.0;
|
||||
samples: 9
|
||||
color: Qt.rgba(0, 0, 0, 0.25);
|
||||
source: mainContainer;
|
||||
}
|
||||
|
||||
|
|
|
@ -308,11 +308,11 @@ Rectangle {
|
|||
anchors.bottom: parent.bottom;
|
||||
anchors.bottomMargin: 10;
|
||||
anchors.left: parent.left;
|
||||
anchors.leftMargin: 4;
|
||||
anchors.leftMargin: 16;
|
||||
width: paintedWidth;
|
||||
text: isShowingMyItems ? "My Items" : "My Purchases";
|
||||
color: hifi.colors.baseGray;
|
||||
size: 28;
|
||||
size: 22;
|
||||
}
|
||||
|
||||
HifiControlsUit.TextField {
|
||||
|
@ -323,8 +323,8 @@ Rectangle {
|
|||
hasRoundedBorder: true;
|
||||
anchors.left: myText.right;
|
||||
anchors.leftMargin: 16;
|
||||
anchors.top: parent.top;
|
||||
anchors.bottom: parent.bottom;
|
||||
height: 39;
|
||||
anchors.verticalCenter: parent.verticalCenter;
|
||||
anchors.right: parent.right;
|
||||
placeholderText: "filter items";
|
||||
|
||||
|
@ -454,16 +454,24 @@ Rectangle {
|
|||
numberSold: model.number_sold;
|
||||
limitedRun: model.limited_run;
|
||||
displayedItemCount: model.displayedItemCount;
|
||||
isWearable: model.categories.indexOf("Wearables") > -1;
|
||||
anchors.topMargin: 12;
|
||||
anchors.bottomMargin: 12;
|
||||
itemType: {
|
||||
if (model.download_url.indexOf(".fst") > -1) {
|
||||
"avatar";
|
||||
} else if (model.categories.indexOf("Wearables") > -1) {
|
||||
"wearable";
|
||||
} else {
|
||||
"entity";
|
||||
}
|
||||
}
|
||||
anchors.topMargin: 10;
|
||||
anchors.bottomMargin: 10;
|
||||
|
||||
Connections {
|
||||
onSendToPurchases: {
|
||||
if (msg.method === 'purchases_itemInfoClicked') {
|
||||
sendToScript({method: 'purchases_itemInfoClicked', itemId: itemId});
|
||||
} 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') {
|
||||
inspectionCertificate.visible = 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.
|
||||
tablet.gotoHomeScreen();
|
||||
} 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;
|
||||
}
|
||||
|
||||
function rezEntity(itemHref, isWearable) {
|
||||
function rezEntity(itemHref, itemType) {
|
||||
var isWearable = itemType === "wearable";
|
||||
var success = Clipboard.importEntities(itemHref);
|
||||
var wearableLocalPosition = null;
|
||||
var wearableLocalRotation = null;
|
||||
|
@ -543,7 +544,7 @@ var selectionDisplay = null; // for gridTool.js to ignore
|
|||
break;
|
||||
case 'checkout_rezClicked':
|
||||
case 'purchases_rezClicked':
|
||||
rezEntity(message.itemHref, message.isWearable);
|
||||
rezEntity(message.itemHref, message.itemType);
|
||||
break;
|
||||
case 'header_marketplaceImageClicked':
|
||||
case 'purchases_backClicked':
|
||||
|
|
Loading…
Reference in a new issue