Allow mods to properly center a frame
Posted: Sun Dec 01, 2019 4:59 pm
Currently, when using auto_center or force_auto_center() on frames, it centers it vertically between the top of the screen and the top of your quickbar. This is weird. Now it probably is that way so it doesn't overlap with the quickbar, which is fair, but that is not a good solution for every use. For very large windows that are supposed to take over the screen, it produces wierd results. The window will be glued to the top, like in this example:
![Image](https://forums.factorio.com/images/ext/e7bb265e71d80d42698cb09118b65358.png)
So I'd like a way to tell it to center it in the 'true' center of the screen.
As a side note, you can, as a modder, make it center the frame properly yourself with a bit of math, but only if you know the height and width of your frame, which you don't always (due to automatic stretching and such). So short of this request being implemented (which is unlikely), we can't solve this ourselves.
![Image](https://forums.factorio.com/images/ext/e7bb265e71d80d42698cb09118b65358.png)
So I'd like a way to tell it to center it in the 'true' center of the screen.
As a side note, you can, as a modder, make it center the frame properly yourself with a bit of math, but only if you know the height and width of your frame, which you don't always (due to automatic stretching and such). So short of this request being implemented (which is unlikely), we can't solve this ourselves.