mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 09:43:25 +02:00
Merge pull request #2838 from talentraspel/19651
Stats area is now always right of mirror display
This commit is contained in:
commit
629a6d4440
1 changed files with 6 additions and 14 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue