# HG changeset patch # User Jeremy Thurgood # Date 1282939033 -7200 # Node ID d78ce15bccc854801c0da8cc08780bd90a68e970 # Parent 8f7936e5d615b1e54258ffee9e36b145bf8ff092 Crew quarters background and toolbar on the rect tool. diff -r 8f7936e5d615 -r d78ce15bccc8 gamelib/scenes/crew_quarters.py --- a/gamelib/scenes/crew_quarters.py Fri Aug 27 21:47:21 2010 +0200 +++ b/gamelib/scenes/crew_quarters.py Fri Aug 27 21:57:13 2010 +0200 @@ -9,7 +9,7 @@ class CrewQuarters(Scene): FOLDER = "crew_quarters" - BACKGROUND = None # TODO + BACKGROUND = "crew_quarters.png" INITIAL_DATA = { 'accessible': True, diff -r 8f7936e5d615 -r d78ce15bccc8 tools/rect_drawer.py --- a/tools/rect_drawer.py Fri Aug 27 21:47:21 2010 +0200 +++ b/tools/rect_drawer.py Fri Aug 27 21:57:13 2010 +0200 @@ -89,6 +89,7 @@ self.draw_rects = True self.draw_things = True self.draw_images = True + self.draw_toolbar = True def toggle_things(self): self.draw_things = not self.draw_things @@ -99,6 +100,9 @@ def toggle_rects(self): self.draw_rects = not self.draw_rects + def toggle_toolbar(self): + self.draw_toolbar = not self.draw_toolbar + def draw_mode(self): self.mode = 'draw' @@ -140,6 +144,12 @@ cropped_rect = self.current_image.rect.clip(surface.get_rect()) sub = surface.subsurface(cropped_rect) self.current_image.draw(sub) + if self.draw_toolbar: + toolbar_rect = pygame.rect.Rect(0, 550, 800, 50) + tb_surf = surface.subsurface(0, 550, 800, 50).convert_alpha() + tb_surf.fill(Color(127, 0, 0, 127)) + surface.blit(tb_surf) + frame_rect(surface, (127, 0, 0), toolbar_rect, 5) def _make_dict(self): d = {} @@ -293,6 +303,8 @@ app.add(toggle_images) toggle_rects = make_button("Toggle Rects", image.toggle_rects, 440) app.add(toggle_rects) + toggle_toolbar = make_button("Toggle Toolbar", image.toggle_toolbar, 480) + app.add(toggle_toolbar) quit_but = make_button("Quit", app.quit, 560) app.add(quit_but) app.run()