Skip to content
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

Make window in play resizable #190

Merged
merged 2 commits into from
Dec 9, 2022

Conversation

Markus28
Copy link
Contributor

@Markus28 Markus28 commented Dec 7, 2022

  • Makes window in play resizable
  • Scales content as much as possible while fitting into the window. To preserve the aspect ratio, black bars may be added on top/bottom or left/right (by default the window aspect ratio matches the content aspect ratio, i.e. no black bars)
  • The pixel dimensions may become fractional after resizing, but for some reason that doesn't seem to be a problem for pygame, so I'm leaving it like that
  • Replaces legacy VIDEORESIZE event by new window API
  • set_mode is no longer required, which should fix [Bug Report] The Incredible Shrinking Window! (PyGame surface resizes in infinite loop) #187
  • Tested on Ubuntu

@Markus28 Markus28 marked this pull request as ready for review December 9, 2022 12:13
Copy link
Member

@pseudo-rnd-thoughts pseudo-rnd-thoughts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved by #187 (comment)

@pseudo-rnd-thoughts pseudo-rnd-thoughts merged commit a10bcd8 into Farama-Foundation:main Dec 9, 2022
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.

[Bug Report] The Incredible Shrinking Window! (PyGame surface resizes in infinite loop)
2 participants