mirror of
https://github.com/overte-org/overte.git
synced 2025-07-23 07:04:00 +02:00
Switch and fix overlay clicks
This commit is contained in:
parent
1493a310af
commit
7d26d2d88b
3 changed files with 16 additions and 10 deletions
|
@ -241,6 +241,7 @@ void ContextOverlayInterface::contextOverlays_hoverLeaveEntity(const EntityItemI
|
||||||
}
|
}
|
||||||
|
|
||||||
static const QString MARKETPLACE_BASE_URL = "https://metaverse.highfidelity.com/marketplace/items/";
|
static const QString MARKETPLACE_BASE_URL = "https://metaverse.highfidelity.com/marketplace/items/";
|
||||||
|
static const QString MARKETPLACES_INJECT_SCRIPT_URL = PathUtils::resourcesPath() + "../scripts/system/html/js/marketplacesInject.js";
|
||||||
|
|
||||||
void ContextOverlayInterface::openMarketplace() {
|
void ContextOverlayInterface::openMarketplace() {
|
||||||
// lets open the tablet and go to the current item in
|
// lets open the tablet and go to the current item in
|
||||||
|
@ -250,7 +251,7 @@ void ContextOverlayInterface::openMarketplace() {
|
||||||
auto tablet = dynamic_cast<TabletProxy*>(_tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));
|
auto tablet = dynamic_cast<TabletProxy*>(_tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));
|
||||||
// construct the url to the marketplace item
|
// construct the url to the marketplace item
|
||||||
QString url = MARKETPLACE_BASE_URL + _entityMarketplaceID;
|
QString url = MARKETPLACE_BASE_URL + _entityMarketplaceID;
|
||||||
tablet->gotoWebScreen(url);
|
tablet->gotoWebScreen(url, MARKETPLACES_INJECT_SCRIPT_URL);
|
||||||
_hmdScriptingInterface->openTablet();
|
_hmdScriptingInterface->openTablet();
|
||||||
_isInMarketplaceInspectionMode = true;
|
_isInMarketplaceInspectionMode = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,8 @@
|
||||||
var canWriteAssets = false;
|
var canWriteAssets = false;
|
||||||
var xmlHttpRequest = null;
|
var xmlHttpRequest = null;
|
||||||
var isPreparing = false; // Explicitly track download request status.
|
var isPreparing = false; // Explicitly track download request status.
|
||||||
|
|
||||||
|
var confirmPurchases = true;
|
||||||
|
|
||||||
function injectCommonCode(isDirectoryPage) {
|
function injectCommonCode(isDirectoryPage) {
|
||||||
|
|
||||||
|
@ -97,17 +99,21 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function injectHiFiCode() {
|
function injectHiFiCode() {
|
||||||
$('.item-footer').find('#price-or-edit').find('a').attr('href', '#')
|
if (confirmPurchases) {
|
||||||
$('.item-footer').find('#price-or-edit').find('a').on('click', function () {
|
$('.item-footer').find('#price-or-edit').find('a').attr('href', '#')
|
||||||
buyButtonClicked("TEST ITEM", "Zach Fox", 10);
|
$('.item-footer').find('#price-or-edit').find('a').on('click', function () {
|
||||||
});
|
buyButtonClicked("TEST ITEM", "Zach Fox", 10);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function injectHiFiItemPageCode() {
|
function injectHiFiItemPageCode() {
|
||||||
$('#side-info').find('.btn').attr('href', '#')
|
if (confirmPurchases) {
|
||||||
$('#side-info').find('.btn').on('click', function () {
|
$('#side-info').find('.btn').attr('href', '#')
|
||||||
buyButtonClicked($('#top-center').find('h1').text(), $('#creator').find('.value').text(), 10);
|
$('#side-info').find('.btn').on('click', function () {
|
||||||
});
|
buyButtonClicked($('#top-center').find('h1').text(), $('#creator').find('.value').text(), 10);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateClaraCode() {
|
function updateClaraCode() {
|
||||||
|
|
|
@ -192,7 +192,6 @@
|
||||||
function fromQml(message) {
|
function fromQml(message) {
|
||||||
switch (message.method) {
|
switch (message.method) {
|
||||||
case 'checkout_cancelClicked':
|
case 'checkout_cancelClicked':
|
||||||
print('fromQml: ' + JSON.stringify(message));
|
|
||||||
tablet.popFromStack();
|
tablet.popFromStack();
|
||||||
break;
|
break;
|
||||||
case 'checkout_buyClicked':
|
case 'checkout_buyClicked':
|
||||||
|
|
Loading…
Reference in a new issue