mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 13:07:04 +02:00
Haven't purchased anything yet UI
This commit is contained in:
parent
c7ad875485
commit
a9c99854f9
2 changed files with 52 additions and 0 deletions
|
@ -258,7 +258,9 @@ Rectangle {
|
||||||
height: 40;
|
height: 40;
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
|
anchors.leftMargin: 8;
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
|
anchors.rightMargin: 8;
|
||||||
anchors.top: parent.top;
|
anchors.top: parent.top;
|
||||||
anchors.topMargin: 4;
|
anchors.topMargin: 4;
|
||||||
|
|
||||||
|
@ -304,6 +306,7 @@ Rectangle {
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
id: purchasesContentsList;
|
id: purchasesContentsList;
|
||||||
|
visible: purchasesModel.count !== 0;
|
||||||
clip: true;
|
clip: true;
|
||||||
model: filteredPurchasesModel;
|
model: filteredPurchasesModel;
|
||||||
// Anchors
|
// Anchors
|
||||||
|
@ -329,6 +332,52 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: noPurchasesAlertContainer;
|
||||||
|
visible: !purchasesContentsList.visible;
|
||||||
|
anchors.top: filterBarContainer.bottom;
|
||||||
|
anchors.topMargin: 12;
|
||||||
|
anchors.left: parent.left;
|
||||||
|
anchors.bottom: parent.bottom;
|
||||||
|
width: parent.width;
|
||||||
|
|
||||||
|
// Explanitory text
|
||||||
|
RalewayRegular {
|
||||||
|
id: haventPurchasedYet;
|
||||||
|
text: "<b>You haven't purchased anything yet!</b><br><br>Get an item from <b>Marketplace</b> to add it to your <b>Purchases</b>.";
|
||||||
|
// Text size
|
||||||
|
size: 22;
|
||||||
|
// Anchors
|
||||||
|
anchors.top: parent.top;
|
||||||
|
anchors.topMargin: 150;
|
||||||
|
anchors.left: parent.left;
|
||||||
|
anchors.leftMargin: 24;
|
||||||
|
anchors.right: parent.right;
|
||||||
|
anchors.rightMargin: 24;
|
||||||
|
height: paintedHeight;
|
||||||
|
// Style
|
||||||
|
color: hifi.colors.faintGray;
|
||||||
|
wrapMode: Text.WordWrap;
|
||||||
|
// Alignment
|
||||||
|
horizontalAlignment: Text.AlignHCenter;
|
||||||
|
}
|
||||||
|
|
||||||
|
// "Set Up" button
|
||||||
|
HifiControlsUit.Button {
|
||||||
|
color: hifi.buttons.blue;
|
||||||
|
colorScheme: hifi.colorSchemes.dark;
|
||||||
|
anchors.top: haventPurchasedYet.bottom;
|
||||||
|
anchors.topMargin: 20;
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter;
|
||||||
|
width: parent.width * 2 / 3;
|
||||||
|
height: 50;
|
||||||
|
text: "Visit Marketplace";
|
||||||
|
onClicked: {
|
||||||
|
sendToScript({method: 'purchases_goToMarketplaceClicked'});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// PURCHASES CONTENTS END
|
// PURCHASES CONTENTS END
|
||||||
|
|
|
@ -228,6 +228,9 @@
|
||||||
case 'purchases_backClicked':
|
case 'purchases_backClicked':
|
||||||
tablet.gotoWebScreen(message.referrerURL, MARKETPLACES_INJECT_SCRIPT_URL);
|
tablet.gotoWebScreen(message.referrerURL, MARKETPLACES_INJECT_SCRIPT_URL);
|
||||||
break;
|
break;
|
||||||
|
case 'purchases_goToMarketplaceClicked':
|
||||||
|
tablet.gotoWebScreen(MARKETPLACE_URL_INITIAL, MARKETPLACES_INJECT_SCRIPT_URL);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
print('Unrecognized message from Checkout.qml or Purchases.qml: ' + JSON.stringify(message));
|
print('Unrecognized message from Checkout.qml or Purchases.qml: ' + JSON.stringify(message));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue