1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-12-07 13:04:37 +00:00

Limit size of inventory menu in controller mode

This commit is contained in:
Andrew Lanzone 2025-06-06 00:34:42 -07:00
parent b2a5ded929
commit b1989ffdf7

View file

@ -1032,10 +1032,11 @@ namespace MWGui
if (MWBase::Environment::get().getWindowManager()->getMode() == MWGui::GM_Inventory)
{
// Fill the screen, or limit to a certain size on large screens.
// Fill the screen, or limit to a certain size on large screens. Size chosen to
// match the size of the stats window.
MyGUI::IntSize viewSize = MyGUI::RenderManager::getInstance().getViewSize();
int width = std::min(viewSize.width, 2200);
int height = std::min(viewSize.height - 48 - 48, 1200);
int width = std::min(viewSize.width, 1600);
int height = std::min(viewSize.height - 48 - 48, 750);
int x = (viewSize.width - width) / 2;
int y = (viewSize.height - height) / 2;