Browse Source

Initialize Viewport in CalculatePanelAreas

pull/4615/head
obligaron 4 years ago committed by Anders Jenbo
parent
commit
5337bf1f6a
  1. 6
      Source/control.cpp
  2. 6
      Source/utils/display.cpp

6
Source/control.cpp

@ -436,6 +436,12 @@ void CalculatePanelAreas()
RightPanel.position.x = gnScreenWidth - RightPanel.size.width - LeftPanel.position.x;
}
RightPanel.position.y = LeftPanel.position.y;
gnViewportHeight = gnScreenHeight;
if (gnScreenWidth <= PANEL_WIDTH) {
// Part of the screen is fully obscured by the UI
gnViewportHeight -= PANEL_HEIGHT;
}
}
bool IsChatAvailable()

6
Source/utils/display.cpp

@ -135,12 +135,6 @@ void AdjustToScreenGeometry(Size windowSize)
{
gnScreenWidth = windowSize.width;
gnScreenHeight = windowSize.height;
gnViewportHeight = gnScreenHeight;
if (gnScreenWidth <= PANEL_WIDTH) {
// Part of the screen is fully obscured by the UI
gnViewportHeight -= PANEL_HEIGHT;
}
}
Size GetPreferredWindowSize()

Loading…
Cancel
Save