diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/TestActivity.py | 6 | ||||
-rwxr-xr-x | test/TestGame.py | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/test/TestActivity.py b/test/TestActivity.py index 693789a..ccc0e35 100644 --- a/test/TestActivity.py +++ b/test/TestActivity.py @@ -25,12 +25,12 @@ class TestActivity(sugar.activity.activity.Activity): self.build_toolbar() # Build the Pygame canvas. - self._canvas = sugargame.canvas.PygameCanvas(self) + self._pygamecanvas = sugargame.canvas.PygameCanvas(self) # Note that set_canvas implicitly calls read_file when resuming from the Journal. - self.set_canvas(self._canvas) + self.set_canvas(self._pygamecanvas) # Start the game running. - self._canvas.run_pygame(self.game.run) + self._pygamecanvas.run_pygame(self.game.run) def build_toolbar(self): stop_play = sugar.graphics.toolbutton.ToolButton('media-playback-stop') diff --git a/test/TestGame.py b/test/TestGame.py index 2c96803..d9dbc2e 100755 --- a/test/TestGame.py +++ b/test/TestGame.py @@ -41,7 +41,9 @@ class TestGame: for event in pygame.event.get(): if event.type == pygame.QUIT: return - + elif event.type == pygame.VIDEORESIZE: + pygame.display.set_mode(event.size, pygame.RESIZABLE) + # Move the ball if not self.paused: self.x += self.vx |