Relative Content

Tag Archive for javalibgdx

How to reposition a window in LibGDX after it is resized with setWindowedMode() method

On an MS/Windows platform, when the user changes the window size of my app I capture it in the resize() method. I want to preserve the aspect ratio of the window, so if necessary, I’ll alter its size by calling the setWindowedMode() method. However, when I do that LibGDX then automatically repositions the window to the center of the screen. How can I prevent that repositioning from happening? Or, can I reposition it back myself?