mirror of
https://github.com/OpenMW/openmw.git
synced 2025-11-30 13:34:33 +00:00
Remove hardcoded map size
This commit is contained in:
parent
d49a6a119b
commit
2e5836a748
1 changed files with 5 additions and 2 deletions
|
|
@ -1447,8 +1447,11 @@ namespace MWGui
|
||||||
// Fill the screen, or limit to a certain size on large screens. Size chosen to
|
// Fill the screen, or limit to a certain size on large screens. Size chosen to
|
||||||
// show the entire local map without scrolling.
|
// show the entire local map without scrolling.
|
||||||
MyGUI::IntSize viewSize = MyGUI::RenderManager::getInstance().getViewSize();
|
MyGUI::IntSize viewSize = MyGUI::RenderManager::getInstance().getViewSize();
|
||||||
int width = std::min(viewSize.width, 1552);
|
MyGUI::IntSize canvasSize = mLocalMap->getCanvasSize();
|
||||||
int height = std::min(winMgr->getControllerMenuHeight(), 1572);
|
MyGUI::IntSize borderSize = mMainWidget->getSize() - mMainWidget->getClientWidget()->getSize();
|
||||||
|
|
||||||
|
int width = std::min(viewSize.width, canvasSize.width + borderSize.width);
|
||||||
|
int height = std::min(winMgr->getControllerMenuHeight(), canvasSize.height + borderSize.height);
|
||||||
int x = (viewSize.width - width) / 2;
|
int x = (viewSize.width - width) / 2;
|
||||||
int y = (viewSize.height - height) / 2;
|
int y = (viewSize.height - height) / 2;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue