comparison pyntnclick/state.py @ 803:bcc9277a23e6 pyntnclick

Refactor widget positioning API. Remove unused widgets
author Stefano Rivera <stefano@rivera.za.net>
date Sun, 27 Jan 2013 14:52:16 +0200
parents bdaffaa8b6bf
children d99400fcd624
comparison
equal deleted inserted replaced
802:5ec7905b2365 803:bcc9277a23e6
319 self.current_thing.get_description()) 319 self.current_thing.get_description())
320 if text is None: 320 if text is None:
321 return None 321 return None
322 label = LabelWidget((0, 10), self.gd, text) 322 label = LabelWidget((0, 10), self.gd, text)
323 label.do_prepare() 323 label.do_prepare()
324 # TODO: Centre more cleanly
324 label.rect.left += (dest_rect.width - label.rect.width) / 2 325 label.rect.left += (dest_rect.width - label.rect.width) / 2
325 return label 326 return label
326 327
327 def draw_description(self, surface): 328 def draw_description(self, surface):
328 description = self._get_description(surface.get_rect()) 329 description = self._get_description(surface.get_rect())