Permalink
Browse files

click to go from credits to title

  • Loading branch information...
1 parent e524bdd commit 4ac63303764135415d9e454d2c7750e5039b5dc1 @andrewrk committed May 12, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 run_game.py
View
@@ -1444,6 +1444,7 @@ def __init__(self, gw, window):
self.window = window
self.img = pyglet.resource.image("data/credits.png")
self.window.set_handler('on_draw', self.on_draw)
+ self.window.set_handler('on_mouse_press', self.on_mouse_press)
pyglet.clock.schedule_interval(self.update, 1/game_fps)
def update(self, dt):
@@ -1455,8 +1456,12 @@ def on_draw(self):
def end(self):
self.window.remove_handler('on_draw', self.on_draw)
+ self.window.remove_handler('on_mouse_press', self.on_mouse_press)
pyglet.clock.unschedule(self.update)
+ def on_mouse_press(self, x, y, button, modifiers):
+ self.gw.title()
+
class Title(object):
def __init__(self, gw, window, server):

0 comments on commit 4ac6330

Please sign in to comment.