I used this code to adjust the window size based on the user’s screen resolution. However, when i did this, my displayRegion is slightly smaller than it was originally, and my buttons (gui) shifted slightly to the left. How can I correct this so it does not occur whatever the size of the window might be?
Thanks for replying.
Yes, I had seen that thread, but my GUI is made up of .egg files, and I don’t want them parented to 2d because they lose 3d quality. Is there something else I can do?
This tells Panda that you want to always use the same fixed aspect ratio, regardless of the shape of your window. This disables Panda’s automatic aspect-ratio correction, and means that the graphics within your window will stretch and squash to fit the window, as you change its size.
You could, of course, use any value of aspect-ratio you like. The value 1.3333 is 4/3, which is appropriate for a typical 4:3 aspect window. If you go widescreen like 16:9, you could put in 1.7777 instead.