comparison gamelib/gamescreen.py @ 28:0f25f7b9b37a

Add loading of initial state.
author Simon Cross <hodgestar+bzr@gmail.com>
date Sun, 22 Aug 2010 18:48:32 +0200
parents 5c7bbbdf9296
children 6322d92dc8f0
comparison
equal deleted inserted replaced
27:5c7bbbdf9296 28:0f25f7b9b37a
1 # menu.py 1 # menu.py
2 # Copyright Boomslang team, 2010 (see COPYING File) 2 # Copyright Boomslang team, 2010 (see COPYING File)
3 # Main menu for the game 3 # Main menu for the game
4
5 from state import initial_state
4 6
5 from pygame.color import Color 7 from pygame.color import Color
6 from albow.screen import Screen 8 from albow.screen import Screen
7 from albow.controls import Button, Label 9 from albow.controls import Button, Label
8 from albow.layout import Column 10 from albow.layout import Column
55 ], align='l', spacing=20) 57 ], align='l', spacing=20)
56 self.add_centered(menu) 58 self.add_centered(menu)
57 self.inventory = InventoryView() 59 self.inventory = InventoryView()
58 self.inventory.bottomleft = self.bottomleft 60 self.inventory.bottomleft = self.bottomleft
59 self.add(self.inventory) 61 self.add(self.inventory)
62 # TODO: Randomly plonk the state here for now
63 self.state = initial_state()
60 64
61 def main_menu(self): 65 def main_menu(self):
62 print 'Returning to menu' 66 print 'Returning to menu'
63 self.shell.show_screen(self.shell.menu_screen) 67 self.shell.show_screen(self.shell.menu_screen)
64 68