# HG changeset patch # User Neil Muller # Date 1329003701 -7200 # Node ID 143c67501c795232c2f58be36e56f2c9832dba56 # Parent dae56fc7b90225bb56f84d9822d78b9950989bd5 Make descriptions work (kinda, sorta, maybe if you squint at it just right) diff -r dae56fc7b902 -r 143c67501c79 pyntnclick/state.py --- a/pyntnclick/state.py Sun Feb 12 01:41:02 2012 +0200 +++ b/pyntnclick/state.py Sun Feb 12 01:41:41 2012 +0200 @@ -316,20 +316,21 @@ if text is None: return None label = TextWidget((10, 10), self.gd, text) - label.set_margin(5) - label.border_width = 1 - label.border_color = (0, 0, 0) - label.bg_color = Color(210, 210, 210, 255) - label.fg_color = (0, 0, 0) + #label.set_margin(5) + #label.border_width = 1 + #label.border_color = (0, 0, 0) + #label.bg_color = Color(210, 210, 210, 255) + #label.fg_color = (0, 0, 0) return label def draw_description(self, surface, screen): description = self._get_description() if description is not None: - w, h = description.size - sub = screen.get_root().surface.subsurface( - Rect(400 - w / 2, 5, w, h)) - description.draw_all(sub) + description.draw(surface) + #x, y, w, h = description.rect + #sub = screen.get_root().surface.subsurface( + # Rect(400 - w / 2, 5, w, h)) + #description.draw_all(sub) def _cache_background(self): if self.BACKGROUND and not self._background: