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.
This commit is contained in:
Kai Ludwig 2014-05-13 00:37:36 +02:00
parent 3e78d63e34
commit 90d577a48c

View file

@ -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);