I think such feature was a thing at some point before, but the thing is, my levelset is just slightly smaller than my actual resolution - 1600x900 (100% scale) levelset on a 1920x1080 screen. The idea is every time I open the game, it gets slightly dipped outside of the screen because it centers around original game's size (672x560). I think that if the window should be centered around it's own center if it's bigger, but just small enough to fit in the boundaries of windows screen.
Force centering if the window is too big
Moderators: Flumminator, Zomis
- TheOnyxGuy
- Posts: 641
- Joined: Wed Oct 30, 2013 5:32 am
- Location: Russia
- Contact:
Force centering if the window is too big
Previously known as Eizzoux (boooo)
Re: Force centering if the window is too big
Indeed this was handled differently in earlier versions: When changing the window size due to custom artwork with different window viewport size, the window was closed and re-opened again, being centered on the desktop again. This had the potentially negative or unwanted side effect that if you placed the window in some corner by intention, it will move back to the center again when changing its size. So it will now just keep its current (x,y) position after resizing, which is probably (or apparently) unwanted in the case you described.
So maybe I should make the code behave more intelligently, checking if the window will partially be invisible after the resize, but would fit to the screen when changing its position, then just adjust the screen position just enough to have it fully visible again, without having the user to move the window manually.
So maybe I should make the code behave more intelligently, checking if the window will partially be invisible after the resize, but would fit to the screen when changing its position, then just adjust the screen position just enough to have it fully visible again, without having the user to move the window manually.