From 9234813e0835c04dd47f153205a742193d4318a7 Mon Sep 17 00:00:00 2001 From: Alexander Ivash Date: Fri, 10 Aug 2018 14:54:15 +0300 Subject: [PATCH] bring back 'get more' wearables button --- .../qml/hifi/avatarapp/AdjustWearables.qml | 30 +++++++++++++++++-- .../qml/hifi/avatarapp/MessageBoxes.qml | 29 ++++++++++++++++++ 2 files changed, 57 insertions(+), 2 deletions(-) diff --git a/interface/resources/qml/hifi/avatarapp/AdjustWearables.qml b/interface/resources/qml/hifi/avatarapp/AdjustWearables.qml index 5f42bb4556..e99fdfd243 100644 --- a/interface/resources/qml/hifi/avatarapp/AdjustWearables.qml +++ b/interface/resources/qml/hifi/avatarapp/AdjustWearables.qml @@ -1,5 +1,6 @@ import Hifi 1.0 as Hifi import QtQuick 2.5 +import QtQuick.Layouts 1.3 import "../../styles-uit" import "../../controls-uit" as HifiControlsUit import "../../controls" as HifiControls @@ -124,7 +125,10 @@ Rectangle { Column { width: parent.width - Row { + RowLayout { + anchors.left: parent.left + anchors.right: parent.right + RalewayBold { size: 15; lineHeightMode: Text.FixedHeight @@ -139,9 +143,31 @@ Rectangle { size: 15; lineHeightMode: Text.FixedHeight lineHeight: 18; - text: "Add custom" + text: "Get more" linkColor: hifi.colors.blueHighlight anchors.verticalCenter: parent.verticalCenter + onLinkActivated: { + popup.showGetWearables(function() { + emitSendToScript({'method' : 'navigate', 'url' : 'hifi://AvatarIsland/11.5848,-8.10862,-2.80195'}) + }, function(link) { + emitSendToScript({'method' : 'navigate', 'url' : link}) + }); + } + } + + Rectangle { + Layout.fillWidth: true + Layout.fillHeight: true + + RalewayBold { + size: 15; + lineHeightMode: Text.FixedHeight + lineHeight: 18; + text: "Add custom" + linkColor: hifi.colors.blueHighlight + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right + } } } diff --git a/interface/resources/qml/hifi/avatarapp/MessageBoxes.qml b/interface/resources/qml/hifi/avatarapp/MessageBoxes.qml index c9b57abe66..a381da7d0b 100644 --- a/interface/resources/qml/hifi/avatarapp/MessageBoxes.qml +++ b/interface/resources/qml/hifi/avatarapp/MessageBoxes.qml @@ -33,6 +33,35 @@ MessageBox { popup.inputText.forceActiveFocus(); } + property url getWearablesUrl: '../../../images/avatarapp/AvatarIsland.jpg' + + function showGetWearables(callback, linkCallback) { + popup.button2text = 'AvatarIsland' + popup.dialogButtons.yesButton.fontCapitalization = Font.MixedCase; + popup.button1text = 'CANCEL' + popup.titleText = 'Get Wearables' + popup.bodyText = 'Buy wearables from Marketplace.' + '
' + + 'Wear wearables from My Purchases.' + '
' + '
' + + 'Visit “AvatarIsland” to get wearables' + + popup.imageSource = getWearablesUrl; + popup.onButton2Clicked = function() { + popup.close(); + + if(callback) + callback(); + } + + popup.onLinkClicked = function(link) { + popup.close(); + + if(linkCallback) + linkCallback(link); + } + + popup.open(); + } + function showDeleteFavorite(favoriteName, callback) { popup.titleText = 'Delete Favorite: {AvatarName}'.replace('{AvatarName}', favoriteName) popup.bodyText = 'This will delete your favorite. You will retain access to the wearables and avatar that made up the favorite from My Purchases.'