From 72978c5d96b0a8af7b8965196fef2ccfcafcdf9e Mon Sep 17 00:00:00 2001 From: Zander Otavka Date: Thu, 21 Jul 2016 15:44:42 -0700 Subject: [PATCH] Rename examples -> marketplace Includes the title of the marketplace web window. --- scripts/defaultScripts.js | 2 +- .../system/{examples.js => marketplace.js} | 37 +++++++++---------- 2 files changed, 19 insertions(+), 20 deletions(-) rename scripts/system/{examples.js => marketplace.js} (56%) diff --git a/scripts/defaultScripts.js b/scripts/defaultScripts.js index 6880de99b5..817d63582d 100644 --- a/scripts/defaultScripts.js +++ b/scripts/defaultScripts.js @@ -15,7 +15,7 @@ Script.load("system/users.js"); Script.load("system/mute.js"); Script.load("system/goto.js"); Script.load("system/hmd.js"); -Script.load("system/examples.js"); +Script.load("system/marketplace.js"); Script.load("system/edit.js"); Script.load("system/ignore.js"); Script.load("system/selectAudioDevice.js"); diff --git a/scripts/system/examples.js b/scripts/system/marketplace.js similarity index 56% rename from scripts/system/examples.js rename to scripts/system/marketplace.js index 6fdb2a2874..6526fb3460 100644 --- a/scripts/system/examples.js +++ b/scripts/system/marketplace.js @@ -1,6 +1,5 @@ // -// examples.js -// examples +// marketplace.js // // Created by Eric Levin on 8 Jan 2016 // Copyright 2016 High Fidelity, Inc. @@ -11,9 +10,9 @@ var toolIconUrl = Script.resolvePath("assets/images/tools/"); -var EXAMPLES_URL = "https://metaverse.highfidelity.com/examples"; -var examplesWindow = new OverlayWebWindow({ - title: 'Examples', +var MARKETPLACE_URL = "https://metaverse.highfidelity.com/marketplace"; +var marketplaceWindow = new OverlayWebWindow({ + title: "Marketplace", source: "about:blank", width: 900, height: 700, @@ -26,24 +25,24 @@ var TOOLBAR_MARGIN_Y = 0; function showExamples(marketplaceID) { - var url = EXAMPLES_URL; + var url = MARKETPLACE_URL; if (marketplaceID) { url = url + "/items/" + marketplaceID; } - print("setting examples URL to " + url); - examplesWindow.setURL(url); - examplesWindow.setVisible(true); + print("setting marketplace URL to " + url); + marketplaceWindow.setURL(url); + marketplaceWindow.setVisible(true); UserActivityLogger.openedMarketplace(); } function hideExamples() { - examplesWindow.setVisible(false); - examplesWindow.setURL("about:blank"); + marketplaceWindow.setVisible(false); + marketplaceWindow.setURL("about:blank"); } function toggleExamples() { - if (examplesWindow.visible) { + if (marketplaceWindow.visible) { hideExamples(); } else { showExamples(); @@ -54,7 +53,7 @@ var toolBar = Toolbars.getToolbar("com.highfidelity.interface.toolbar.system"); var browseExamplesButton = toolBar.addButton({ imageURL: toolIconUrl + "market.svg", - objectName: "examples", + objectName: "marketplace", buttonState: 1, defaultState: 1, hoverState: 3, @@ -62,18 +61,18 @@ var browseExamplesButton = toolBar.addButton({ }); function onExamplesWindowVisibilityChanged() { - browseExamplesButton.writeProperty('buttonState', examplesWindow.visible ? 0 : 1); - browseExamplesButton.writeProperty('defaultState', examplesWindow.visible ? 0 : 1); - browseExamplesButton.writeProperty('hoverState', examplesWindow.visible ? 2 : 3); + browseExamplesButton.writeProperty('buttonState', marketplaceWindow.visible ? 0 : 1); + browseExamplesButton.writeProperty('defaultState', marketplaceWindow.visible ? 0 : 1); + browseExamplesButton.writeProperty('hoverState', marketplaceWindow.visible ? 2 : 3); } function onClick() { toggleExamples(); } browseExamplesButton.clicked.connect(onClick); -examplesWindow.visibleChanged.connect(onExamplesWindowVisibilityChanged); +marketplaceWindow.visibleChanged.connect(onExamplesWindowVisibilityChanged); Script.scriptEnding.connect(function () { - toolBar.removeButton("examples"); + toolBar.removeButton("marketplace"); browseExamplesButton.clicked.disconnect(onClick); - examplesWindow.visibleChanged.disconnect(onExamplesWindowVisibilityChanged); + marketplaceWindow.visibleChanged.disconnect(onExamplesWindowVisibilityChanged); });