Problem resizing the game window - menu deforms - scroll box pops out (solution)

Well, that would be the issue, you are probably desperate like me because, when resizing the game window, the menus are deformed in undesired ways, especially going out of the display window in some cases.


This happened to me especially in relation to the scroll boxes which, because of where they were located, were not responding to the space limitations and their content was overflowing without the scroll box scrolling out of the scroll box. To solve this I put them inside a ‘Size box’ that had a maximum size. That way I solved the problems with the scroll box, but the problems I mentioned about deforming the game window appeared (for example, if the game window is square, everything inside the ‘Size box’ disappears at the bottom).
The solution is very simple, in the event grap I obtained the X value of the node ‘get viewport size’ with a ‘get avs 2d’ and I divided it by 3.2, then I passed the value through a ‘Clamp (float)’ that, in my case, I established with a minimum of ‘200’ and a maximum of ‘800’ and finally I set it in the node of ‘Set max desired height’ of my ‘Size box’. This way the maximum size that my ‘Size box’ can have will be in relation to the size of the window. I hope this can help others.

More tightly