From bc24fa7de05d7686986f2153d33362f6941dc9c4 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 30 Oct 2014 11:39:37 -0700 Subject: [PATCH 1/2] lobby easter egg for status --- examples/lobby.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/examples/lobby.js b/examples/lobby.js index b15dbc48cf..4642d13387 100644 --- a/examples/lobby.js +++ b/examples/lobby.js @@ -37,6 +37,8 @@ var panelsCenterShift = Vec3.subtract(panelsCenter, orbCenter); var ORB_SHIFT = { x: 0, y: -1.4, z: -0.8}; +var HELMET_ATTACHMENT_URL = "https://hifi-public.s3.amazonaws.com/models/attachments/IronManMaskOnly.fbx" + function reticlePosition() { var screenSize = Controller.getViewportDimensions(); var reticleRay = Camera.computePickRay(screenSize.x / 2, screenSize.y / 2); @@ -82,7 +84,10 @@ function drawLobby() { color: { red: 0, green: 255, blue: 0 }, alpha: 1.0, solid: true - }); + }); + + // add an attachment on this avatar so other people see them in the lobby + MyAvatar.attach(HELMET_ATTACHMENT_URL, "Neck", {x: 0, y: 0, z: 0}, Quat.fromPitchYawRollDegrees(0, 0, 0), 1.15); } } @@ -112,11 +117,15 @@ function cleanupLobby() { Overlays.deleteOverlay(panelWall); Overlays.deleteOverlay(orbShell); Overlays.deleteOverlay(reticle); + panelWall = false; orbShell = false; reticle = false; + locations = {}; toggleEnvironmentRendering(true); + + MyAvatar.detachOne(HELMET_ATTACHMENT_URL); } function actionStartEvent(event) { From 4f2fef04289ba9201a262e2e696bc1867ff526ea Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Thu, 30 Oct 2014 12:02:30 -0700 Subject: [PATCH 2/2] Add edit entities help window --- .../html/edit-entities-commands.html | 2036 +++++++++++++++++ interface/src/Application.cpp | 2 +- interface/src/Application.h | 3 + interface/src/Menu.cpp | 7 +- interface/src/Menu.h | 2 + interface/src/ui/InfoView.cpp | 12 +- interface/src/ui/InfoView.h | 6 +- 7 files changed, 2057 insertions(+), 11 deletions(-) create mode 100644 interface/resources/html/edit-entities-commands.html diff --git a/interface/resources/html/edit-entities-commands.html b/interface/resources/html/edit-entities-commands.html new file mode 100644 index 0000000000..afa662f089 --- /dev/null +++ b/interface/resources/html/edit-entities-commands.html @@ -0,0 +1,2036 @@ + +
+ + + + + +Edit Entity Help + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 140e51ee3e..f9efe66386 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -590,7 +590,7 @@ void Application::initializeGL() { // update before the first render update(1.f / _fps); - InfoView::showFirstTime(); + InfoView::showFirstTime(INFO_HELP_PATH); } void Application::paintGL() { diff --git a/interface/src/Application.h b/interface/src/Application.h index 8cd321a6b3..3d2fab07bf 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -128,6 +128,9 @@ static const float MIRROR_FIELD_OF_VIEW = 30.0f; static const quint64 TOO_LONG_SINCE_LAST_SEND_DOWNSTREAM_AUDIO_STATS = 1 * USECS_PER_SECOND; +static const QString INFO_HELP_PATH = "html/interface-welcome-allsvg.html"; +static const QString INFO_EDIT_ENTITIES_PATH = "html/edit-entities-commands.html"; + class Application : public QApplication { Q_OBJECT diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index 274afd4bca..3271f6d721 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -359,6 +359,7 @@ Menu::Menu() : addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::Bandwidth, 0, true); addActionToQMenuAndActionHash(viewMenu, MenuOption::BandwidthDetails, 0, this, SLOT(bandwidthDetails())); addActionToQMenuAndActionHash(viewMenu, MenuOption::OctreeStats, 0, this, SLOT(octreeStatsDetails())); + addActionToQMenuAndActionHash(viewMenu, MenuOption::EditEntitiesHelp, 0, this, SLOT(showEditEntitiesHelp())); QMenu* developerMenu = addMenu("Developer"); @@ -1117,7 +1118,11 @@ QAction* Menu::getActionForOption(const QString& menuOption) { } void Menu::aboutApp() { - InfoView::forcedShow(); + InfoView::forcedShow(INFO_HELP_PATH); +} + +void Menu::showEditEntitiesHelp() { + InfoView::forcedShow(INFO_EDIT_ENTITIES_PATH); } void Menu::bumpSettings() { diff --git a/interface/src/Menu.h b/interface/src/Menu.h index abcbfb51ad..dc894ba57e 100644 --- a/interface/src/Menu.h +++ b/interface/src/Menu.h @@ -208,6 +208,7 @@ public slots: private slots: void aboutApp(); + void showEditEntitiesHelp(); void bumpSettings(); void editPreferences(); void editAttachments(); @@ -398,6 +399,7 @@ namespace MenuOption { const QString DontFadeOnVoxelServerChanges = "Don't Fade In/Out on Voxel Server Changes"; const QString EchoLocalAudio = "Echo Local Audio"; const QString EchoServerAudio = "Echo Server Audio"; + const QString EditEntitiesHelp = "Edit Entities Help..."; const QString Enable3DTVMode = "Enable 3DTV Mode"; const QString EnableGlowEffect = "Enable Glow Effect (Warning: Poor Oculus Performance)"; const QString EnableVRMode = "Enable VR Mode"; diff --git a/interface/src/ui/InfoView.cpp b/interface/src/ui/InfoView.cpp index 06de3fdf2e..f306514e80 100644 --- a/interface/src/ui/InfoView.cpp +++ b/interface/src/ui/InfoView.cpp @@ -20,24 +20,24 @@ #define SETTINGS_VERSION_KEY "info-version" #define MAX_DIALOG_HEIGHT_RATIO 0.9 -InfoView::InfoView(bool forced) : +InfoView::InfoView(bool forced, QString path) : _forced(forced) { setWindowFlags(Qt::WindowStaysOnTopHint | Qt::CustomizeWindowHint | Qt::WindowCloseButtonHint); - QString absPath = QFileInfo(Application::resourcesPath() + "html/interface-welcome-allsvg.html").absoluteFilePath(); + QString absPath = QFileInfo(Application::resourcesPath() + path).absoluteFilePath(); QUrl url = QUrl::fromLocalFile(absPath); load(url); connect(this, SIGNAL(loadFinished(bool)), this, SLOT(loaded(bool))); } -void InfoView::showFirstTime() { - new InfoView(false); +void InfoView::showFirstTime(QString path) { + new InfoView(false, path); } -void InfoView::forcedShow() { - new InfoView(true); +void InfoView::forcedShow(QString path) { + new InfoView(true, path); } bool InfoView::shouldShow() { diff --git a/interface/src/ui/InfoView.h b/interface/src/ui/InfoView.h index 94d18ff6a1..47d5dac9ce 100644 --- a/interface/src/ui/InfoView.h +++ b/interface/src/ui/InfoView.h @@ -17,11 +17,11 @@ class InfoView : public QWebView { Q_OBJECT public: - static void showFirstTime(); - static void forcedShow(); + static void showFirstTime(QString path); + static void forcedShow(QString path); private: - InfoView(bool forced); + InfoView(bool forced, QString path); bool _forced; bool shouldShow();