Mercurial > rinkhals
comparison gamelib/mainmenu.py @ 307:bf1df0902883
three game modes: fortnight, quarter, fox extinction
author | Adrianna Pińska <adrianna.pinska@gmail.com> |
---|---|
date | Sat, 05 Sep 2009 18:01:37 +0000 |
parents | e2b5262c2b11 |
children | 245ee075f2ae |
comparison
equal
deleted
inserted
replaced
306:c8267f62fbe8 | 307:bf1df0902883 |
---|---|
30 pygame.display.toggle_fullscreen() | 30 pygame.display.toggle_fullscreen() |
31 | 31 |
32 def quit_pressed(): | 32 def quit_pressed(): |
33 pygame.event.post(engine.QUIT) | 33 pygame.event.post(engine.QUIT) |
34 | 34 |
35 def start_pressed(): | 35 def fortnight_pressed(): |
36 constants.TURN_LIMIT = 14 | |
37 pygame.event.post(engine.START_DAY) | |
38 | |
39 def quarter_pressed(): | |
40 constants.TURN_LIMIT = 90 | |
41 pygame.event.post(engine.START_DAY) | |
42 | |
43 def unlimited_pressed(): | |
44 constants.TURN_LIMIT = 0 | |
36 pygame.event.post(engine.START_DAY) | 45 pygame.event.post(engine.START_DAY) |
37 | 46 |
38 def help_pressed(): | 47 def help_pressed(): |
39 pygame.event.post(engine.GO_HELP_SCREEN) | 48 pygame.event.post(engine.GO_HELP_SCREEN) |
40 | 49 |
41 start_button = gui.Button("Start") | 50 fortnight_button = gui.Button("Fortnight") |
42 start_button.connect(gui.CLICK, start_pressed) | 51 fortnight_button.connect(gui.CLICK, fortnight_pressed) |
52 | |
53 quarter_button = gui.Button("Quarter") | |
54 quarter_button.connect(gui.CLICK, quarter_pressed) | |
55 | |
56 unlim_button = gui.Button("Unlimited") | |
57 unlim_button.connect(gui.CLICK, unlimited_pressed) | |
43 | 58 |
44 quit_button = gui.Button("Quit") | 59 quit_button = gui.Button("Quit") |
45 quit_button.connect(gui.CLICK, quit_pressed) | 60 quit_button.connect(gui.CLICK, quit_pressed) |
46 | 61 |
47 help_button = gui.Button("Instructions") | 62 help_button = gui.Button("Instructions") |
57 "align": 0, | 72 "align": 0, |
58 "style": style, | 73 "style": style, |
59 } | 74 } |
60 | 75 |
61 self.tr() | 76 self.tr() |
62 self.td(start_button, **td_kwargs) | 77 self.td(fortnight_button, **td_kwargs) |
78 | |
79 self.tr() | |
80 self.td(quarter_button, **td_kwargs) | |
81 | |
82 self.tr() | |
83 self.td(unlim_button, **td_kwargs) | |
63 | 84 |
64 self.tr() | 85 self.tr() |
65 self.td(help_button, **td_kwargs) | 86 self.td(help_button, **td_kwargs) |
66 | 87 |
67 self.tr() | 88 self.tr() |