Skip to content

Add window center properties #2056

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

Merged
merged 2 commits into from
Apr 9, 2024

Conversation

DigiDuncan
Copy link
Collaborator

Adds center, center_x, and center_y to Window.

Why?

You use Window.height / 2 or Window.width / 2 so often. Basically positioning anything requires you to do this math. This property is tried and tested in Charm, and it gets used 31 times.

@Cleptomania Cleptomania merged commit 71de1f8 into pythonarcade:development Apr 9, 2024
7 of 8 checks passed
@DigiDuncan DigiDuncan deleted the window_center branch July 3, 2024 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants