comparison eosd @ 531:a7dc55ad9380

Display important messages in popups, instead of the terminal.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Thu, 19 Dec 2013 00:44:18 +0100
parents 64d9117b9209
children 346cbf266856
comparison
equal deleted inserted replaced
530:64d9117b9209 531:a7dc55ad9380
62 opengl = True 62 opengl = True
63 elif args.backend == 'sdl': 63 elif args.backend == 'sdl':
64 from pytouhou.ui.sdl.gamerenderer import GameRenderer 64 from pytouhou.ui.sdl.gamerenderer import GameRenderer
65 opengl = False 65 opengl = False
66 66
67 from pytouhou.lib.sdl import SDL 67 from pytouhou.lib.sdl import SDL, show_simple_message_box
68 from pytouhou.ui.window import Window 68 from pytouhou.ui.window import Window
69 from pytouhou.resource.loader import Loader 69 from pytouhou.resource.loader import Loader
70 from pytouhou.ui.gamerunner import GameRunner 70 from pytouhou.ui.gamerunner import GameRunner
71 from pytouhou.game.player import GameOver 71 from pytouhou.game.player import GameOver
72 from pytouhou.formats.t6rp import T6RP, Level 72 from pytouhou.formats.t6rp import T6RP, Level
115 resource_loader = Loader(path) 115 resource_loader = Loader(path)
116 116
117 try: 117 try:
118 resource_loader.scan_archives(data) 118 resource_loader.scan_archives(data)
119 except IOError: 119 except IOError:
120 sys.stderr.write('Some data files were not found, did you forget the -p option?\n') 120 show_simple_message_box(u'Some data files were not found, did you forget the -p option?')
121 exit(1) 121 sys.exit(1)
122 122
123 if stage_num is None: 123 if stage_num is None:
124 story = True 124 story = True
125 stage_num = 1 125 stage_num = 1
126 continues = 3 126 continues = 3
234 except NextStage: 234 except NextStage:
235 if not story or stage_num == (7 if boss_rush else 6 if rank > 0 else 5): 235 if not story or stage_num == (7 if boss_rush else 6 if rank > 0 else 5):
236 break 236 break
237 stage_num += 1 237 stage_num += 1
238 except GameOver: 238 except GameOver:
239 print('Game over') 239 show_simple_message_box(u'Game over!')
240 break 240 break
241 finally: 241 finally:
242 if save_filename: 242 if save_filename:
243 last_key = -1 243 last_key = -1
244 for time, key in enumerate(save_keystates): 244 for time, key in enumerate(save_keystates):