Mercurial > boomslang
comparison gamelib/main.py @ 447:9c285017535d
Added icon and title to window
author | Adrianna Pińska <adrianna.pinska@gmail.com> |
---|---|
date | Sun, 29 Aug 2010 00:33:44 +0200 |
parents | 3dab4984cbd7 |
children | a9925aaf5f61 02cf5537d74e |
comparison
equal
deleted
inserted
replaced
446:a6de33fecb97 | 447:9c285017535d |
---|---|
20 from gamescreen import GameScreen | 20 from gamescreen import GameScreen |
21 from endscreen import EndScreen | 21 from endscreen import EndScreen |
22 from constants import SCREEN, FRAME_RATE, FREQ, BITSIZE, CHANNELS, BUFFER, DEBUG | 22 from constants import SCREEN, FRAME_RATE, FREQ, BITSIZE, CHANNELS, BUFFER, DEBUG |
23 from sound import no_sound, disable_sound | 23 from sound import no_sound, disable_sound |
24 import state | 24 import state |
25 import data | |
25 | 26 |
26 def parse_args(args): | 27 def parse_args(args): |
27 parser = OptionParser() | 28 parser = OptionParser() |
28 parser.add_option("--no-sound", action="store_false", default=True, | 29 parser.add_option("--no-sound", action="store_false", default=True, |
29 dest="sound", help="disable sound") | 30 dest="sound", help="disable sound") |
61 if opts.scene is not None: | 62 if opts.scene is not None: |
62 # debug the specified scene | 63 # debug the specified scene |
63 state.DEBUG_SCENE = opts.scene | 64 state.DEBUG_SCENE = opts.scene |
64 state.DEBUG_RECTS = opts.rects | 65 state.DEBUG_RECTS = opts.rects |
65 display = pygame.display.set_mode(SCREEN, SWSURFACE) | 66 display = pygame.display.set_mode(SCREEN, SWSURFACE) |
67 pygame.display.set_icon(pygame.image.load( | |
68 data.filepath('icons/suspended_sentence24x24.png'))) | |
69 pygame.display.set_caption("Suspended Sentence") | |
66 shell = MainShell(display) | 70 shell = MainShell(display) |
67 try: | 71 try: |
68 shell.run() | 72 shell.run() |
69 except KeyboardInterrupt: | 73 except KeyboardInterrupt: |
70 pass | 74 pass |