diff --git a/interface/resources/qml/hifi/avatarapp/MessageBoxes.qml b/interface/resources/qml/hifi/avatarapp/MessageBoxes.qml
index 62ceee1b63..ccc28174a1 100644
--- a/interface/resources/qml/hifi/avatarapp/MessageBoxes.qml
+++ b/interface/resources/qml/hifi/avatarapp/MessageBoxes.qml
@@ -112,8 +112,7 @@ MessageBox {
popup.button1text = 'CANCEL'
popup.titleText = 'Get Avatars'
- popup.bodyText = 'Get avatars from Marketplace.' + '
' +
- 'Wear avatars in Inventory.'
+ popup.bodyText = 'Get avatars from the Community Bazaar. (Coming soon!)'
popup.onLinkClicked = function(link) {
popup.close();
diff --git a/interface/resources/serverless/tutorial.json b/interface/resources/serverless/tutorial.json
index e333d8246e..17e7ea26e7 100644
--- a/interface/resources/serverless/tutorial.json
+++ b/interface/resources/serverless/tutorial.json
@@ -4,6 +4,56 @@
"/": "/0.155245,-0.941538,23.9289/0,0.791589,0,0.611053"
},
"Entities": [
+ {
+ "id": "{0a199807-4a83-4286-b09c-f21124627c3e}",
+ "type": "Box",
+ "name": "Config Wizard Loader",
+ "lastEdited": 1613737207915514,
+ "visible": false,
+ "position": {
+ "x": -1.2722,
+ "y": 0.4266,
+ "z": 24.2307
+ },
+ "dimensions": {
+ "x": 0.20000000298023224,
+ "y": 0.20000000298023224,
+ "z": 0.20000000298023224
+ },
+ "rotation": {
+ "x": 0,
+ "y": -0.7660443782806396,
+ "z": 0,
+ "w": -0.6427876949310303
+ },
+ "created": 1613736996738696,
+ "lastEditedBy": "{ff9b500e-e450-4127-b41f-1c42be16f71b}",
+ "queryAACube": {
+ "x": -0.17320507764816284,
+ "y": -0.17320507764816284,
+ "z": -0.17320507764816284,
+ "scale": 0.3464101552963257
+ },
+ "grab": {
+ "grabbable": false
+ },
+ "damping": 0,
+ "angularDamping": 0,
+ "collisionless": true,
+ "ignoreForCollisions": true,
+ "script": "https://cdn-1.vircadia.com/us-e-1/DomainContent/Tutorial/Apps/configWizard/dist/wizardLoader.js",
+ "color": {
+ "red": 0,
+ "green": 180,
+ "blue": 239
+ },
+ "shape": "Cube",
+ "clientOnly": false,
+ "avatarEntity": false,
+ "localEntity": false,
+ "faceCamera": false,
+ "isFacingAvatar": false
+ },
{
"id": "{eb485a2d-2040-42f6-a960-51c88e2434b9}",
"type": "Box",
diff --git a/scripts/defaultScripts.js b/scripts/defaultScripts.js
index b27008e255..82b228008f 100644
--- a/scripts/defaultScripts.js
+++ b/scripts/defaultScripts.js
@@ -36,6 +36,7 @@ var DEFAULT_SCRIPTS_COMBINED = [
"system/inspect.js",
"system/keyboardShortcuts/keyboardShortcuts.js",
"system/checkForUpdates.js",
+ "system/onEscape.js",
"system/onFirstRun.js",
"system/appreciate/appreciate_app.js"
];
diff --git a/scripts/system/away.js b/scripts/system/away.js
index ef79791e44..7268dc3233 100644
--- a/scripts/system/away.js
+++ b/scripts/system/away.js
@@ -3,10 +3,9 @@
//
// away.js
//
-// examples
-//
// Created by Howard Stearns 11/3/15
// Copyright 2015 High Fidelity, Inc.
+// Copyright 2021 Vircadia contributors.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
@@ -255,17 +254,6 @@ function setActiveProperties() {
Script.clearInterval(avatarMovedInterval);
}
-function maybeGoActive(event) {
- if (event.isAutoRepeat) { // isAutoRepeat is true when held down (or when Windows feels like it)
- return;
- }
- if (!isAway && (event.text === 'ESC')) {
- goAway();
- } else {
- goActive();
- }
-}
-
var wasHmdActive = HMD.active;
var wasMouseCaptured = Reticle.mouseCaptured;
@@ -329,12 +317,24 @@ var CHANNEL_AWAY_ENABLE = "Hifi-Away-Enable";
var handleMessage = function(channel, message, sender) {
if (channel === CHANNEL_AWAY_ENABLE && sender === MyAvatar.sessionUUID) {
print("away.js | Got message on Hifi-Away-Enable: ", message);
- setEnabled(message === 'enable');
+ if (message === 'enable') {
+ setEnabled(true);
+ } else if (message === 'toggle') {
+ toggleAway();
+ }
}
};
Messages.subscribe(CHANNEL_AWAY_ENABLE);
Messages.messageReceived.connect(handleMessage);
+function toggleAway() {
+ if (!isAway) {
+ goAway();
+ } else {
+ goActive();
+ }
+}
+
var maybeIntervalTimer = Script.setInterval(function() {
maybeMoveOverlay();
maybeGoAway();
@@ -343,7 +343,6 @@ var maybeIntervalTimer = Script.setInterval(function() {
Controller.mousePressEvent.connect(goActive);
-Controller.keyPressEvent.connect(maybeGoActive);
// Note peek() so as to not interfere with other mappings.
eventMapping.from(Controller.Standard.LeftPrimaryThumb).peek().to(goActive);
eventMapping.from(Controller.Standard.RightPrimaryThumb).peek().to(goActive);
@@ -371,7 +370,6 @@ Script.scriptEnding.connect(function () {
HMD.awayStateWhenFocusLostInVRChanged.disconnect(awayStateWhenFocusLostInVRChanged);
Controller.disableMapping(eventMappingName);
Controller.mousePressEvent.disconnect(goActive);
- Controller.keyPressEvent.disconnect(maybeGoActive);
Messages.messageReceived.disconnect(handleMessage);
Messages.unsubscribe(CHANNEL_AWAY_ENABLE);
});
diff --git a/scripts/system/onEscape.js b/scripts/system/onEscape.js
new file mode 100644
index 0000000000..323b8b0612
--- /dev/null
+++ b/scripts/system/onEscape.js
@@ -0,0 +1,34 @@
+'use strict';
+
+//
+// onEscape.js
+//
+// Created by Kalila L. on Feb 3 2021.
+// Copyright 2021 Vircadia contributors.
+//
+// This script manages actions when the user triggers an "escape" key or action.
+//
+// Distributed under the Apache License, Version 2.0.
+// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
+//
+
+(function() { // BEGIN LOCAL_SCOPE
+
+ function maybeEscapeKeyPressed (event) {
+ if (event.isAutoRepeat) { // isAutoRepeat is true when held down (or when Windows feels like it)
+ return;
+ }
+
+ if (event.text === 'ESC') {
+ var CHANNEL_AWAY_ENABLE = 'Hifi-Away-Enable';
+ Messages.sendMessage(CHANNEL_AWAY_ENABLE, 'toggle', true);
+ }
+ }
+
+ Controller.keyPressEvent.connect(maybeEscapeKeyPressed);
+
+ Script.scriptEnding.connect(function () {
+ Controller.keyPressEvent.disconnect(maybeEscapeKeyPressed);
+ });
+
+}());
diff --git a/scripts/system/onFirstRun.js b/scripts/system/onFirstRun.js
index 65c1d06ec5..e7052c0e3a 100644
--- a/scripts/system/onFirstRun.js
+++ b/scripts/system/onFirstRun.js
@@ -13,6 +13,7 @@
//
(function() { // BEGIN LOCAL_SCOPE
+ // Check to see if we should run this script or bail...
var SETTING_TO_CHECK = 'firstRun';
var DEFAULT_DISPLAY_NAME = '';
@@ -20,6 +21,8 @@
return;
}
+ // If this is our first run, then proceed...
+
if (MyAvatar.displayName === '') {
var selectedDisplayName = Window.prompt('Enter a display name.', MyAvatar.displayName);