comparison pyntnclick/main.py @ 758:f4853f817a7a pyntnclick

Refactor scene listing, to avoid having to create a window
author Stefano Rivera <stefano@rivera.za.net>
date Sat, 26 Jan 2013 12:56:21 +0200
parents ef4bda7d623d
children 43b49f1de828
comparison
equal deleted inserted replaced
757:8ac05c038e73 758:f4853f817a7a
128 if opts.scene is not None: 128 if opts.scene is not None:
129 # debug the specified scene 129 # debug the specified scene
130 self._initial_scene = opts.scene 130 self._initial_scene = opts.scene
131 self._debug_rects = opts.rects 131 self._debug_rects = opts.rects
132 if self.constants.debug and opts.list_scenes: 132 if self.constants.debug and opts.list_scenes:
133 # FIXME: Horrible hack to avoid image loading issues for 133 list_scenes(self.SCENE_MODULE, self._scene_list)
134 # now
135 pygame.display.set_mode(self.constants.screen,
136 SWSURFACE)
137 list_scenes(self.initial_state)
138 sys.exit(0) 134 sys.exit(0)
139 if self.constants.debug and opts.rect_drawer: 135 if self.constants.debug and opts.rect_drawer:
140 if opts.scene is None: 136 if opts.scene is None:
141 print 'Need to supply a scene to use the rect drawer' 137 print 'Need to supply a scene to use the rect drawer'
142 sys.exit(1) 138 sys.exit(1)