Pygame_zero windows open in the middle of the screen
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 611
- Forks
- 211
- PR merge metrics
- No merged PRs in 30d
Description
by changing the first few lines of runner.py these windows can be comfortably opened in the upper right corner of the user's screen:
```
import pygame
import os
pygame.mixer.pre_init(frequency=22050, size=-16, channels=2)
# Add code before pygame.init() to position window that will be opened.
# This will cause any windows created to be opened at 40, 40
x = 60
y = 80
os.environ['SDL_VIDEO_WINDOW_POS'] = "%d,%d" % (x,y)
pygame.init()
```
Note that 'import os' must be moved (shifted) up several lines in the code to make this work.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open runner.py and inspect the imports and initialization sequence before pygame.init(), then compare it with the example in the issue. Run a Pygame Zero program and verify that its window opens at the requested screen position.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- desktop, game-dev
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100