-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Readd a method to center window (lost during DisplayServer refactoring) #5232
Comments
The removal of this function is probably not intentional, so feel free to open a pull request to readd it 🙂 |
@Calinou
However, should I add a get() for this, to check if the window is already centered? I'd imagine in some hyper specific scenario it might be useful, but I'm not sure. Every other window function has a setter and getter though. To clarify...
|
@ztc0611 Probably should be |
Alright I have |
Yes, go ahead and open a PR and we can ping Linux folk, of which we have plenty, to offer a hand. |
Even if my own attempt at resolving this is not used, I would really appreciate the return of this function. 🙁 |
@ztc0611 Hey, doesn't look like there is anything wrong with your PR. It just needs to be reviewed again to finish things off. Sorry for the delay. |
Describe the project you are working on
Works for every project type.
Describe the problem or limitation you are having in your project
In Godot 3.x, there was OS.center_window(). Godot 4.0 does not have any equivalent function as far as I can find, but obviously still has the ability to center the window as when the project is run initially it is centered.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
This restores the functionality already found in Godot 3.x.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Running this function will place the window in the center of the screen.
If this enhancement will not be used often, can it be worked around with a few lines of script?
It can be, but the function already existed in Godot 3.x.
Is there a reason why this should be core and not an add-on in the asset library?
Functionality existed in Godot 3.x.
The text was updated successfully, but these errors were encountered: