Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pygameextra as pe
- pe.init()
- class GUI(pe.GameContext):
- FPS = 60
- AREA = (500, 500)
- BACKGROUND = pe.colors.aliceblue
- def __init__(self):
- super().__init__()
- self.text = pe.Text("Hello World", colors=[pe.colors.black, None])
- self.text.rect.center = (
- self.width // 2,
- self.height // 2,
- )
- self.running = True
- def quit_check(self):
- super().quit_check()
- self.running = False
- def loop(self):
- self.text.display()
- if __name__ == "__main__":
- gui = GUI()
- while gui.running:
- gui()
- pe.pge_quit()
- # PYGAMEEXTRA_DIR=$(python3 -c 'import os, pygameextra; print(os.path.dirname(pygameextra.__file__))')
- # python3 -m nuitka --mode=app --output-dir=build --script-name=test_mac.py --include-data-dir=${PYGAMEEXTRA_DIR}/assets=pygameextra/assets --deployment
- ## Nuitka: Version '2.7.3' on Python 3.13 (flavor 'Homebrew Python') commercial grade 'not installed'.
- ## MacOS 15 (Mac mini 2020 M1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement