Page 1 of 1

DO NOT overlap the top buttons bar for dialogs in center position

Posted: Sun Oct 01, 2023 6:19 am
by saaadel
TL;DR
UI improvements, changing the location of dialogs to the center of the screen: DO NOT overlap the top buttons bar.

What ?
Now, when a new dialog opens in the center of the window, the current location is calculated like this:

Ypos := ( {Window Height} - {Quickbar Height} - {New Dialog Height} ) / 2

Sometimes, when a new dialog is tall enough, it causes the buttons on the top bar to overlap when opened in the center of the screen. Many mods add their activation buttons to the top bar, so the current logic of selecting the dialog position in the center of the screen becomes inconvenient for those who play with mods (which is most of those who play factorio for a long time).

I'd like to propose a new logic. Since the panel with buttons at the top always goes in one row of buttons, let's take into account its height:

Ypos := ( {Window Height} - {Quickbar Height} - {Top Buttons Bar Height} - {New Dialog Height} ) / 2

Why ?
Because of this, the new dialog frame will avoid overlapping the top button bar in most cases.
For example, there are many mods that somehow interact with an open player's or chest inventory dialog, add buttons to the top bar, and expect the player to press them when the inventory dialog is OPEN. These dialogs open just in the center of the screen.

Re: DO NOT overlap the top buttons bar for dialogs in center position

Posted: Wed Oct 11, 2023 4:00 pm
by jamiechi1
It would be nice if we could move and size the windows to how we wanted them, and the game remembered this.
And it would be helpfull if the shortcuts on the bottom were never covered up. I quite often need to see them when the Inventory is opened.