Mercurial > boomslang
comparison pyntnclick/widgets/base.py @ 652:b8cc0be3a819 pyntnclick
Items!
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Sun, 12 Feb 2012 12:55:03 +0200 |
parents | fdc63049b08c |
children | fe7023750b20 |
comparison
equal
deleted
inserted
replaced
651:122204fb6eb1 | 652:b8cc0be3a819 |
---|---|
54 def enable(self): | 54 def enable(self): |
55 if self.disabled: | 55 if self.disabled: |
56 self.disabled = False | 56 self.disabled = False |
57 if hasattr(self, 'prepare'): | 57 if hasattr(self, 'prepare'): |
58 self.prepare() | 58 self.prepare() |
59 | |
60 def global_to_local(self, pos): | |
61 x, y = pos | |
62 return (x - self.rect.left, y - self.rect.top) | |
59 | 63 |
60 | 64 |
61 class Button(Widget): | 65 class Button(Widget): |
62 | 66 |
63 def event(self, ev): | 67 def event(self, ev): |