Loading scripts/README.md +2 −0 Original line number Diff line number Diff line Loading @@ -4,3 +4,5 @@ - This is also what powers the display code in `poolpay/display`, however, this is the original version of the script - `test_touch.py` - Use `evdev` to get touch events, prints many of them (including coordinates) - `preview_scene.py` - Preview a scene using a fake PyGame display scripts/preview_scene.py 0 → 100644 +35 −0 Original line number Diff line number Diff line #!/usr/bin/env python3 from functools import cached_property import pygame from poolpay.director.Director import Director from poolpay.ui.pygame.play import play class Display: @cached_property def surface(self): surface = pygame.display.set_mode((480, 320)) return surface def refresh(self) -> None: pygame.display.flip() display = Display() director = Director(play, display) # director.nothing_requested() # sleep(10) play.Balance( director, balance_cents=-1000, person_name="Jakob" ).present() input() Loading
scripts/README.md +2 −0 Original line number Diff line number Diff line Loading @@ -4,3 +4,5 @@ - This is also what powers the display code in `poolpay/display`, however, this is the original version of the script - `test_touch.py` - Use `evdev` to get touch events, prints many of them (including coordinates) - `preview_scene.py` - Preview a scene using a fake PyGame display
scripts/preview_scene.py 0 → 100644 +35 −0 Original line number Diff line number Diff line #!/usr/bin/env python3 from functools import cached_property import pygame from poolpay.director.Director import Director from poolpay.ui.pygame.play import play class Display: @cached_property def surface(self): surface = pygame.display.set_mode((480, 320)) return surface def refresh(self) -> None: pygame.display.flip() display = Display() director = Director(play, display) # director.nothing_requested() # sleep(10) play.Balance( director, balance_cents=-1000, person_name="Jakob" ).present() input()