From 8e0ac763eb8e43c37ebc517d75889c5a8d5bb84d Mon Sep 17 00:00:00 2001 From: Triplelexx Date: Tue, 10 Feb 2015 22:41:43 +0000 Subject: [PATCH 01/11] Changed color of audio bar background Worklist mentions: Additionally, change the color of the bar to #4CC1B8 / 76,193,184 --- interface/src/ui/ApplicationOverlay.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/src/ui/ApplicationOverlay.cpp b/interface/src/ui/ApplicationOverlay.cpp index 18b9943e29..f558b5a2ad 100644 --- a/interface/src/ui/ApplicationOverlay.cpp +++ b/interface/src/ui/ApplicationOverlay.cpp @@ -847,7 +847,7 @@ void ApplicationOverlay::renderAudioMeter() { // Draw audio meter background Quad DependencyManager::get()->renderQuad(AUDIO_METER_X, audioMeterY, AUDIO_METER_WIDTH, AUDIO_METER_HEIGHT, - glm::vec4(0, 0, 0, 1)); + glm::vec4(0.298f, 0.757f, 0.722f, 1)); if (audioLevel > AUDIO_RED_START) { glm::vec4 quadColor; From e473661568f859ace26281d6f59f8f3cd4a449f7 Mon Sep 17 00:00:00 2001 From: Triplelexx Date: Tue, 10 Feb 2015 23:55:56 +0000 Subject: [PATCH 02/11] Fix meter showing out of bounds add conditional check for exception when audioLevel is NAN. --- interface/src/ui/ApplicationOverlay.cpp | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/interface/src/ui/ApplicationOverlay.cpp b/interface/src/ui/ApplicationOverlay.cpp index f558b5a2ad..3930b43fbd 100644 --- a/interface/src/ui/ApplicationOverlay.cpp +++ b/interface/src/ui/ApplicationOverlay.cpp @@ -883,17 +883,20 @@ void ApplicationOverlay::renderAudioMeter() { audioLevel = AUDIO_GREEN_START; } // Draw Blue Quad - glm::vec4 quadColor; - if (!isClipping) { - quadColor = AUDIO_METER_BLUE; - } else { - quadColor = glm::vec4(1, 1, 1, 1); - } - // Draw Blue (low level) quad - DependencyManager::get()->renderQuad(AUDIO_METER_X + AUDIO_METER_INSET, - audioMeterY + AUDIO_METER_INSET, - audioLevel, AUDIO_METER_HEIGHT - AUDIO_METER_INSET, quadColor, - _audioBlueQuad); + if (audioLevel > 0) { + glm::vec4 quadColor; + if (!isClipping) { + quadColor = AUDIO_METER_BLUE; + } + else { + quadColor = glm::vec4(1, 1, 1, 1); + } + // Draw Blue (low level) quad + DependencyManager::get()->renderQuad(AUDIO_METER_X + AUDIO_METER_INSET, + audioMeterY + AUDIO_METER_INSET, + audioLevel, AUDIO_METER_HEIGHT - AUDIO_METER_INSET, quadColor, + _audioBlueQuad); + } } void ApplicationOverlay::renderStatsAndLogs() { From d59ee7c561f3816ec6eca39ed578b5f5d23dcec7 Mon Sep 17 00:00:00 2001 From: Triplelexx Date: Tue, 10 Feb 2015 23:57:09 +0000 Subject: [PATCH 03/11] Removed meter inset changes to bar color make the inset very visible --- interface/src/ui/ApplicationOverlay.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/src/ui/ApplicationOverlay.cpp b/interface/src/ui/ApplicationOverlay.cpp index 3930b43fbd..ecd524e496 100644 --- a/interface/src/ui/ApplicationOverlay.cpp +++ b/interface/src/ui/ApplicationOverlay.cpp @@ -788,7 +788,7 @@ void ApplicationOverlay::renderAudioMeter() { // Audio VU Meter and Mute Icon const int MUTE_ICON_SIZE = 24; - const int AUDIO_METER_INSET = 2; + const int AUDIO_METER_INSET = 0; const int MUTE_ICON_PADDING = 10; const int AUDIO_METER_WIDTH = MIRROR_VIEW_WIDTH - MUTE_ICON_SIZE - AUDIO_METER_INSET - MUTE_ICON_PADDING; const int AUDIO_METER_SCALE_WIDTH = AUDIO_METER_WIDTH - 2 * AUDIO_METER_INSET; From 93366e068f34be5e9c7bc9f336d91e036de36282 Mon Sep 17 00:00:00 2001 From: Triplelexx Date: Wed, 11 Feb 2015 00:16:40 +0000 Subject: [PATCH 04/11] Remove all references to AUDIO_METER_INSET further cleaning --- interface/src/ui/ApplicationOverlay.cpp | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/interface/src/ui/ApplicationOverlay.cpp b/interface/src/ui/ApplicationOverlay.cpp index ecd524e496..45fd4c7de4 100644 --- a/interface/src/ui/ApplicationOverlay.cpp +++ b/interface/src/ui/ApplicationOverlay.cpp @@ -788,13 +788,12 @@ void ApplicationOverlay::renderAudioMeter() { // Audio VU Meter and Mute Icon const int MUTE_ICON_SIZE = 24; - const int AUDIO_METER_INSET = 0; const int MUTE_ICON_PADDING = 10; - const int AUDIO_METER_WIDTH = MIRROR_VIEW_WIDTH - MUTE_ICON_SIZE - AUDIO_METER_INSET - MUTE_ICON_PADDING; - const int AUDIO_METER_SCALE_WIDTH = AUDIO_METER_WIDTH - 2 * AUDIO_METER_INSET; + const int AUDIO_METER_WIDTH = MIRROR_VIEW_WIDTH - MUTE_ICON_SIZE - MUTE_ICON_PADDING; + const int AUDIO_METER_SCALE_WIDTH = AUDIO_METER_WIDTH - 2 ; const int AUDIO_METER_HEIGHT = 8; const int AUDIO_METER_GAP = 5; - const int AUDIO_METER_X = MIRROR_VIEW_LEFT_PADDING + MUTE_ICON_SIZE + AUDIO_METER_INSET + AUDIO_METER_GAP; + const int AUDIO_METER_X = MIRROR_VIEW_LEFT_PADDING + MUTE_ICON_SIZE + AUDIO_METER_GAP; int audioMeterY; bool smallMirrorVisible = Menu::getInstance()->isOptionChecked(MenuOption::Mirror) && !OculusManager::isConnected(); @@ -857,10 +856,10 @@ void ApplicationOverlay::renderAudioMeter() { quadColor = glm::vec4(1, 1, 1, 1); } // Draw Red Quad - DependencyManager::get()->renderQuad(AUDIO_METER_X + AUDIO_METER_INSET + AUDIO_RED_START, - audioMeterY + AUDIO_METER_INSET, + DependencyManager::get()->renderQuad(AUDIO_METER_X +AUDIO_RED_START, + audioMeterY, audioLevel - AUDIO_RED_START, - AUDIO_METER_HEIGHT - AUDIO_METER_INSET, quadColor, + AUDIO_METER_HEIGHT, quadColor, _audioRedQuad); audioLevel = AUDIO_RED_START; @@ -874,10 +873,10 @@ void ApplicationOverlay::renderAudioMeter() { quadColor = glm::vec4(1, 1, 1, 1); } // Draw Green Quad - DependencyManager::get()->renderQuad(AUDIO_METER_X + AUDIO_METER_INSET + AUDIO_GREEN_START, - audioMeterY + AUDIO_METER_INSET, + DependencyManager::get()->renderQuad(AUDIO_METER_X + AUDIO_GREEN_START, + audioMeterY, audioLevel - AUDIO_GREEN_START, - AUDIO_METER_HEIGHT - AUDIO_METER_INSET, quadColor, + AUDIO_METER_HEIGHT, quadColor, _audioGreenQuad); audioLevel = AUDIO_GREEN_START; @@ -892,9 +891,9 @@ void ApplicationOverlay::renderAudioMeter() { quadColor = glm::vec4(1, 1, 1, 1); } // Draw Blue (low level) quad - DependencyManager::get()->renderQuad(AUDIO_METER_X + AUDIO_METER_INSET, - audioMeterY + AUDIO_METER_INSET, - audioLevel, AUDIO_METER_HEIGHT - AUDIO_METER_INSET, quadColor, + DependencyManager::get()->renderQuad(AUDIO_METER_X, + audioMeterY, + audioLevel, AUDIO_METER_HEIGHT, quadColor, _audioBlueQuad); } } From 84d7ae6b3a8566b234f8a55fb5b569ffce09f31e Mon Sep 17 00:00:00 2001 From: Triplelexx Date: Wed, 11 Feb 2015 00:18:08 +0000 Subject: [PATCH 05/11] Change conditional limit to >= edge case --- interface/src/ui/ApplicationOverlay.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/src/ui/ApplicationOverlay.cpp b/interface/src/ui/ApplicationOverlay.cpp index 45fd4c7de4..407a9cb676 100644 --- a/interface/src/ui/ApplicationOverlay.cpp +++ b/interface/src/ui/ApplicationOverlay.cpp @@ -882,7 +882,7 @@ void ApplicationOverlay::renderAudioMeter() { audioLevel = AUDIO_GREEN_START; } // Draw Blue Quad - if (audioLevel > 0) { + if (audioLevel >= 0) { glm::vec4 quadColor; if (!isClipping) { quadColor = AUDIO_METER_BLUE; From 837f8d71a41a28080dec5da57a103d5798835a28 Mon Sep 17 00:00:00 2001 From: Triplelexx Date: Wed, 11 Feb 2015 03:17:28 +0000 Subject: [PATCH 06/11] Coding standard fixes Coding standard fixes Indentation and space missing --- interface/src/ui/ApplicationOverlay.cpp | 26 ++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/interface/src/ui/ApplicationOverlay.cpp b/interface/src/ui/ApplicationOverlay.cpp index 407a9cb676..9f1ba8080f 100644 --- a/interface/src/ui/ApplicationOverlay.cpp +++ b/interface/src/ui/ApplicationOverlay.cpp @@ -856,7 +856,7 @@ void ApplicationOverlay::renderAudioMeter() { quadColor = glm::vec4(1, 1, 1, 1); } // Draw Red Quad - DependencyManager::get()->renderQuad(AUDIO_METER_X +AUDIO_RED_START, + DependencyManager::get()->renderQuad(AUDIO_METER_X + AUDIO_RED_START, audioMeterY, audioLevel - AUDIO_RED_START, AUDIO_METER_HEIGHT, quadColor, @@ -883,18 +883,18 @@ void ApplicationOverlay::renderAudioMeter() { } // Draw Blue Quad if (audioLevel >= 0) { - glm::vec4 quadColor; - if (!isClipping) { - quadColor = AUDIO_METER_BLUE; - } - else { - quadColor = glm::vec4(1, 1, 1, 1); - } - // Draw Blue (low level) quad - DependencyManager::get()->renderQuad(AUDIO_METER_X, - audioMeterY, - audioLevel, AUDIO_METER_HEIGHT, quadColor, - _audioBlueQuad); + glm::vec4 quadColor; + if (!isClipping) { + quadColor = AUDIO_METER_BLUE; + } + else { + quadColor = glm::vec4(1, 1, 1, 1); + } + // Draw Blue (low level) quad + DependencyManager::get()->renderQuad(AUDIO_METER_X, + audioMeterY, + audioLevel, AUDIO_METER_HEIGHT, quadColor, + _audioBlueQuad); } } From 260f960ccc22465e66e2792caa9fc07b4d966a19 Mon Sep 17 00:00:00 2001 From: Triplelexx Date: Wed, 11 Feb 2015 03:49:28 +0000 Subject: [PATCH 07/11] Indentation correction Indention was still incorrect I believe. :cry: --- interface/src/ui/ApplicationOverlay.cpp | 28 ++++++++++++------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/interface/src/ui/ApplicationOverlay.cpp b/interface/src/ui/ApplicationOverlay.cpp index 9f1ba8080f..5f4493a08d 100644 --- a/interface/src/ui/ApplicationOverlay.cpp +++ b/interface/src/ui/ApplicationOverlay.cpp @@ -882,20 +882,20 @@ void ApplicationOverlay::renderAudioMeter() { audioLevel = AUDIO_GREEN_START; } // Draw Blue Quad - if (audioLevel >= 0) { - glm::vec4 quadColor; - if (!isClipping) { - quadColor = AUDIO_METER_BLUE; - } - else { - quadColor = glm::vec4(1, 1, 1, 1); - } - // Draw Blue (low level) quad - DependencyManager::get()->renderQuad(AUDIO_METER_X, - audioMeterY, - audioLevel, AUDIO_METER_HEIGHT, quadColor, - _audioBlueQuad); - } + if (audioLevel >= 0) { + glm::vec4 quadColor; + if (!isClipping) { + quadColor = AUDIO_METER_BLUE; + } + else { + quadColor = glm::vec4(1, 1, 1, 1); + } + // Draw Blue (low level) quad + DependencyManager::get()->renderQuad(AUDIO_METER_X, + audioMeterY, + audioLevel, AUDIO_METER_HEIGHT, quadColor, + _audioBlueQuad); + } } void ApplicationOverlay::renderStatsAndLogs() { From e2f942c02637ecf9cab12b1514e94d7c8717c72f Mon Sep 17 00:00:00 2001 From: Triplelexx Date: Wed, 11 Feb 2015 06:11:38 +0000 Subject: [PATCH 08/11] Coding standard fixes Corrected else format, removed additional comment to fit other declarations and break block. --- interface/src/ui/ApplicationOverlay.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/interface/src/ui/ApplicationOverlay.cpp b/interface/src/ui/ApplicationOverlay.cpp index 5f4493a08d..f9437221e5 100644 --- a/interface/src/ui/ApplicationOverlay.cpp +++ b/interface/src/ui/ApplicationOverlay.cpp @@ -881,13 +881,12 @@ void ApplicationOverlay::renderAudioMeter() { audioLevel = AUDIO_GREEN_START; } - // Draw Blue Quad + if (audioLevel >= 0) { glm::vec4 quadColor; if (!isClipping) { quadColor = AUDIO_METER_BLUE; - } - else { + } else { quadColor = glm::vec4(1, 1, 1, 1); } // Draw Blue (low level) quad From a3d09e6adcd4affc503df58f2d5c759036462136 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Thu, 12 Feb 2015 13:18:02 -0800 Subject: [PATCH 09/11] Fix edit grid not showing up --- examples/editEntities.js | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/editEntities.js b/examples/editEntities.js index f25a873992..a9b5bfeb16 100644 --- a/examples/editEntities.js +++ b/examples/editEntities.js @@ -190,6 +190,7 @@ var toolBar = (function () { cameraManager.enable(); entityListTool.setVisible(true); gridTool.setVisible(true); + grid.setEnabled(true); propertiesTool.setVisible(true); Window.setFocus(); } From 813673b720e958b7aeae65efe735281f3b69e10c Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Thu, 12 Feb 2015 13:18:17 -0800 Subject: [PATCH 10/11] Fix grid tool not showing minor grid width --- examples/html/gridControls.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/html/gridControls.html b/examples/html/gridControls.html index 7e354c5bec..941a4b5c2a 100644 --- a/examples/html/gridControls.html +++ b/examples/html/gridControls.html @@ -30,8 +30,8 @@ elPosY.value = origin.y.toFixed(2); } - if (data.minorGridSpacing !== undefined) { - elMinorSpacing.value = data.minorGridSpacing; + if (data.minorGridWidth !== undefined) { + elMinorSpacing.value = data.minorGridWidth; } if (data.majorGridEvery !== undefined) { @@ -57,7 +57,7 @@ origin: { y: elPosY.value, }, - minorGridSpacing: elMinorSpacing.value, + minorGridWidth: elMinorSpacing.value, majorGridEvery: elMajorSpacing.value, gridColor: gridColor, colorIndex: gridColorIndex, From 13fc0b1fcda4fa3a10b5bad5d3c7690e3d202f69 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 13 Feb 2015 09:36:16 -0800 Subject: [PATCH 11/11] fix AudioInjector debug line to be more clear --- libraries/audio/src/AudioInjector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/audio/src/AudioInjector.cpp b/libraries/audio/src/AudioInjector.cpp index 1e66ad77cf..9981e0fba7 100644 --- a/libraries/audio/src/AudioInjector.cpp +++ b/libraries/audio/src/AudioInjector.cpp @@ -58,7 +58,7 @@ void AudioInjector::setIsFinished(bool isFinished) { if (_shouldDeleteAfterFinish) { // we've been asked to delete after finishing, trigger a queued deleteLater here - qDebug() << "triggering the delete since we are finished"; + qDebug() << "AudioInjector triggering delete from setIsFinished"; QMetaObject::invokeMethod(this, "deleteLater", Qt::QueuedConnection); } }