Changeset 1d1c77e in python-game
- Timestamp:
- Mar 6, 2017, 2:47:30 AM (8 years ago)
- Branches:
- master
- Children:
- e79c833
- Parents:
- b632a7c
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
README.md
rb632a7c r1d1c77e 2 2 sudo apt-get install python3-tk 3 3 4 On mac, install pygame like this: 5 6 brew install python3 7 8 # Not sure if this is actually needed 9 brew install sdl sdl_image sdl_mixer sdl_ttf smpeg portmidi 10 11 pip3 install pygame 12 pip3 install pyobjc -
game.py
rb632a7c r1d1c77e 19 19 w = root.winfo_screenwidth() 20 20 h = root.winfo_screenheight() 21 elif system == 'Darwin': 22 print("Mac detected") 23 24 from AppKit import NSScreen 25 res = NSScreen.mainScreen().frame().size 26 w = int(res.width) 27 h = int(res.height) 21 28 else: 22 29 print("Unknown OS: " + system)
Note:
See TracChangeset
for help on using the changeset viewer.