Mercurial > boomslang
comparison pyntnclick/state.py @ 651:122204fb6eb1 pyntnclick
Defer drawing description to StateWidget
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Sun, 12 Feb 2012 12:47:30 +0200 |
parents | 1faced4e343a |
children | c77d6aa29bee |
comparison
equal
deleted
inserted
replaced
650:7cc0da0a4633 | 651:122204fb6eb1 |
---|---|
321 #label.border_color = (0, 0, 0) | 321 #label.border_color = (0, 0, 0) |
322 #label.bg_color = Color(210, 210, 210, 255) | 322 #label.bg_color = Color(210, 210, 210, 255) |
323 #label.fg_color = (0, 0, 0) | 323 #label.fg_color = (0, 0, 0) |
324 return label | 324 return label |
325 | 325 |
326 def draw_description(self, surface, screen): | 326 def draw_description(self, surface): |
327 description = self._get_description() | 327 description = self._get_description() |
328 if description is not None: | 328 if description is not None: |
329 description.draw(surface) | 329 description.draw(surface) |
330 #x, y, w, h = description.rect | 330 #x, y, w, h = description.rect |
331 #sub = screen.get_root().surface.subsurface( | 331 #sub = screen.get_root().surface.subsurface( |
349 thing.draw(surface) | 349 thing.draw(surface) |
350 | 350 |
351 def draw(self, surface, screen): | 351 def draw(self, surface, screen): |
352 self.draw_background(surface) | 352 self.draw_background(surface) |
353 self.draw_things(surface) | 353 self.draw_things(surface) |
354 self.draw_description(surface, screen) | |
355 | 354 |
356 def interact(self, item, pos): | 355 def interact(self, item, pos): |
357 """Interact with a particular position. | 356 """Interact with a particular position. |
358 | 357 |
359 Item may be an item in the list of items or None for the hand. | 358 Item may be an item in the list of items or None for the hand. |