Mercurial > pyntnclick
comparison pyntnclick/state.py @ 644:1faced4e343a pyntnclick
LabelWidget
author | Stefano Rivera <stefano@rivera.za.net> |
---|---|
date | Sun, 12 Feb 2012 02:27:27 +0200 |
parents | 143c67501c79 |
children | 122204fb6eb1 |
comparison
equal
deleted
inserted
replaced
643:e81df1abf3b5 | 644:1faced4e343a |
---|---|
1 """Utilities and base classes for dealing with scenes.""" | 1 """Utilities and base classes for dealing with scenes.""" |
2 | 2 |
3 import copy | 3 import copy |
4 | 4 |
5 from widgets.text import TextWidget | 5 from widgets.text import LabelWidget |
6 from pygame.rect import Rect | 6 from pygame.rect import Rect |
7 from pygame.color import Color | 7 from pygame.color import Color |
8 | 8 |
9 | 9 |
10 def frame_rect(surface, color, rect, thick = 1): | 10 def frame_rect(surface, color, rect, thick = 1): |
313 def _get_description(self): | 313 def _get_description(self): |
314 text = (self.game.current_thing and | 314 text = (self.game.current_thing and |
315 self.game.current_thing.get_description()) | 315 self.game.current_thing.get_description()) |
316 if text is None: | 316 if text is None: |
317 return None | 317 return None |
318 label = TextWidget((10, 10), self.gd, text) | 318 label = LabelWidget((10, 10), self.gd, text) |
319 #label.set_margin(5) | 319 #label.set_margin(5) |
320 #label.border_width = 1 | 320 #label.border_width = 1 |
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) |