Skip to content

Commit

Permalink
click to go from credits to title
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrk committed May 12, 2012
1 parent e524bdd commit 4ac6330
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions run_game.py
Expand Up @@ -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):
Expand All @@ -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):
Expand Down

0 comments on commit 4ac6330

Please sign in to comment.