From 90d577a48c4050e3a85b34ea054b7aa7cb78c727 Mon Sep 17 00:00:00 2001 From: Kai Ludwig Date: Tue, 13 May 2014 00:37:36 +0200 Subject: [PATCH] Stats area is now always right of mirror display, regardless if mirror display is enabled or not as there is always a remaining audio meter. Display, resize and click cases have been adapted by removing the condition for checking display status of mirror. --- interface/src/Application.cpp | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 0b59fc3aa2..8858b6d324 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -686,11 +686,8 @@ void Application::resizeGL(int width, int height) { glLoadIdentity(); // update Stats width - int horizontalOffset = 0; - if (Menu::getInstance()->isOptionChecked(MenuOption::Mirror)) { - // mirror is enabled, let's set horizontal offset to give stats some margin - horizontalOffset += MIRROR_VIEW_WIDTH + MIRROR_VIEW_LEFT_PADDING * 2; - } + // let's set horizontal offset to give stats some margin to mirror + int horizontalOffset = MIRROR_VIEW_WIDTH + MIRROR_VIEW_LEFT_PADDING * 2; Stats::getInstance()->resetWidth(width, horizontalOffset); } @@ -1164,10 +1161,8 @@ void Application::mouseReleaseEvent(QMouseEvent* event) { _mousePressed = false; checkBandwidthMeterClick(); if (Menu::getInstance()->isOptionChecked(MenuOption::Stats)) { - int horizontalOffset = 0; - if (Menu::getInstance()->isOptionChecked(MenuOption::Mirror)) { - horizontalOffset = MIRROR_VIEW_WIDTH; - } + // let's set horizontal offset to give stats some margin to mirror + int horizontalOffset = MIRROR_VIEW_WIDTH; Stats::getInstance()->checkClick(_mouseX, _mouseY, _mouseDragStartedX, _mouseDragStartedY, horizontalOffset); } } @@ -2732,11 +2727,8 @@ void Application::displayOverlay() { glPointSize(1.0f); if (Menu::getInstance()->isOptionChecked(MenuOption::Stats)) { - int horizontalOffset = 0; - if (Menu::getInstance()->isOptionChecked(MenuOption::Mirror)) { - // mirror is enabled, let's set horizontal offset to give stats some margin - horizontalOffset += MIRROR_VIEW_WIDTH + MIRROR_VIEW_LEFT_PADDING * 2; - } + // let's set horizontal offset to give stats some margin to mirror + int horizontalOffset = MIRROR_VIEW_WIDTH + MIRROR_VIEW_LEFT_PADDING * 2; int voxelPacketsToProcess = _voxelProcessor.packetsToProcessCount(); // Onscreen text about position, servers, etc Stats::getInstance()->display(WHITE_TEXT, horizontalOffset, _fps, _packetsPerSecond, _bytesPerSecond, voxelPacketsToProcess);