comparison gamelib/main.py @ 20:177e3a7825e8

Add constants file
author Neil Muller <neil@dip.sun.ac.za>
date Sun, 22 Aug 2010 17:07:46 +0200
parents 55f1969e41c9
children 9d5de13e2ac3
comparison
equal deleted inserted replaced
19:87f8a46b88af 20:177e3a7825e8
9 import pygame 9 import pygame
10 from pygame.locals import SWSURFACE, SRCALPHA 10 from pygame.locals import SWSURFACE, SRCALPHA
11 from albow.dialogs import alert 11 from albow.dialogs import alert
12 from albow.shell import Shell 12 from albow.shell import Shell
13 from menu import MenuScreen 13 from menu import MenuScreen
14 from constants import SCREEN
14 15
15 class MainShell(Shell): 16 class MainShell(Shell):
16 def __init__(self, display): 17 def __init__(self, display):
17 Shell.__init__(self, display) 18 Shell.__init__(self, display)
18 self.menu_screen = MenuScreen(self) 19 self.menu_screen = MenuScreen(self)
19 self.show_screen(self.menu_screen) 20 self.show_screen(self.menu_screen)
20 21
21 def main(): 22 def main():
22 pygame.init() 23 pygame.init()
23 display = pygame.display.set_mode((800, 600)) 24 display = pygame.display.set_mode(SCREEN)
24 shell = MainShell(display) 25 shell = MainShell(display)
25 shell.run() 26 shell.run()
26 27