From f11091cab470086d9f1309d0c5a747e654aaefa5 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Tue, 16 Jun 2020 12:25:28 +1200 Subject: [PATCH 1/2] Add Help > Tutorial menu item that goest to serverless tutorial --- interface/src/Application.cpp | 5 +++++ interface/src/Application.h | 1 + interface/src/Menu.cpp | 2 ++ 3 files changed, 8 insertions(+) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 85c2d4abe0..dd8ad75c06 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3858,6 +3858,11 @@ void Application::showHelp() { //InfoView::show(INFO_HELP_PATH, false, queryString.toString()); } +void Application::gotoTutorial() { + const QString TUTORIAL_ADDRESS = "file:///~/serverless/tutorial.json"; + DependencyManager::get()->handleLookupString(TUTORIAL_ADDRESS); +} + void Application::resizeEvent(QResizeEvent* event) { resizeGL(); } diff --git a/interface/src/Application.h b/interface/src/Application.h index 198f5ef7cf..e85fccf1f6 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -427,6 +427,7 @@ public slots: #endif static void showHelp(); + static void gotoTutorial(); void cycleCamera(); void cameraModeChanged(); diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index a3ef39f1e9..5ca2be510b 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -816,6 +816,8 @@ Menu::Menu() { addActionToQMenuAndActionHash(helpMenu, "Controls Reference", 0, qApp, SLOT(showHelp())); + addActionToQMenuAndActionHash(helpMenu, "Tutorial", 0, qApp, SLOT(gotoTutorial())); + helpMenu->addSeparator(); // Help > Release Notes From 9367ea9e7f64186ee33341c55bd4486f48cac524 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Tue, 16 Jun 2020 12:25:59 +1200 Subject: [PATCH 2/2] "file:///" is valid address in AddressManager.handleLookupString() JSDoc --- libraries/networking/src/AddressManager.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libraries/networking/src/AddressManager.h b/libraries/networking/src/AddressManager.h index 8bdb777f96..148c4f8580 100644 --- a/libraries/networking/src/AddressManager.h +++ b/libraries/networking/src/AddressManager.h @@ -249,8 +249,9 @@ public slots: * Takes you to a specified metaverse address. * @function location.handleLookupString * @param {string} address - The address to go to: a "hifi://" address, an IP address (e.g., - * "127.0.0.1" or "localhost"), a domain name, a named path on a domain (starts with - * "/"), a position or position and orientation, or a user (starts with "@"). + * "127.0.0.1" or "localhost"), a file:/// address, a domain name, a named path + * on a domain (starts with "/"), a position or position and orientation, or a user (starts with + * "@"). * @param {boolean} [fromSuggestions=false] - Set to true if the address is obtained from the "Goto" dialog. * Helps ensure that user's location history is correctly maintained. */