Mercurial > boomslang
changeset 642:143c67501c79 pyntnclick
Make descriptions work (kinda, sorta, maybe if you squint at it just right)
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Sun, 12 Feb 2012 01:41:41 +0200 |
parents | dae56fc7b902 |
children | e81df1abf3b5 |
files | pyntnclick/state.py |
diffstat | 1 files changed, 10 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- 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: