Allow mods to properly center a frame

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
Therenas
Fast Inserter
Fast Inserter
Posts: 138
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

Allow mods to properly center a frame

Post by Therenas » 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

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.

Post Reply

Return to “Modding interface requests”

Who is online

Users browsing this forum: No registered users