Merge pull request #6762 from ZappoMan/hideMirrorAndAudioInHMD

hide the rear view mirror and the audio in the HMD
This commit is contained in:
Brad Davis 2016-01-04 18:03:33 -05:00
commit 125d103e29
4 changed files with 6 additions and 2 deletions

View file

@ -84,6 +84,7 @@ Hifi.AvatarInputs {
Item {
width: root.mirrorWidth
height: 44
visible: !root.isHMD
x: root.mirrorLeftPad
y: root.mirrorVisible ? root.mirrorTopPad + root.mirrorHeight : 5

View file

@ -86,7 +86,7 @@ void ApplicationOverlay::renderOverlay(RenderArgs* renderArgs) {
// Now render the overlay components together into a single texture
renderDomainConnectionStatusBorder(renderArgs); // renders the connected domain line
renderAudioScope(renderArgs); // audio scope in the very back
renderAudioScope(renderArgs); // audio scope in the very back - NOTE: this is the debug audio scope, not the VU meter
renderRearView(renderArgs); // renders the mirror view selfie
renderQmlUi(renderArgs); // renders a unit quad with the QML UI texture, and the text overlays from scripts
renderOverlays(renderArgs); // renders Scripts Overlay and AudioScope
@ -158,7 +158,7 @@ void ApplicationOverlay::renderRearViewToFbo(RenderArgs* renderArgs) {
}
void ApplicationOverlay::renderRearView(RenderArgs* renderArgs) {
if (Menu::getInstance()->isOptionChecked(MenuOption::Mirror)) {
if (!qApp->isHMDMode() && Menu::getInstance()->isOptionChecked(MenuOption::Mirror)) {
gpu::Batch& batch = *renderArgs->_batch;
auto geometryCache = DependencyManager::get<GeometryCache>();

View file

@ -66,6 +66,7 @@ void AvatarInputs::update() {
&& !Menu::getInstance()->isOptionChecked(MenuOption::FullscreenMirror));
AI_UPDATE(cameraEnabled, !Menu::getInstance()->isOptionChecked(MenuOption::NoFaceTracking));
AI_UPDATE(cameraMuted, Menu::getInstance()->isOptionChecked(MenuOption::MuteFaceTracking));
AI_UPDATE(isHMD, qApp->isHMDMode());
auto audioIO = DependencyManager::get<AudioClient>();
const float AUDIO_METER_AVERAGING = 0.5;

View file

@ -30,6 +30,7 @@ class AvatarInputs : public QQuickItem {
AI_PROPERTY(float, audioLevel, 0)
AI_PROPERTY(bool, mirrorVisible, false)
AI_PROPERTY(bool, mirrorZoomed, true)
AI_PROPERTY(bool, isHMD, false)
public:
static AvatarInputs* getInstance();
@ -44,6 +45,7 @@ signals:
void audioLevelChanged();
void mirrorVisibleChanged();
void mirrorZoomedChanged();
void isHMDChanged();
protected:
Q_INVOKABLE void resetSensors();