comparison pyntnclick/widgets/imagebutton.py @ 854:79b5c1be9a5e default tip

Remove pyntnclick, it's its own library, now
author Stefano Rivera <stefano@rivera.za.net>
date Sat, 21 Jun 2014 22:06:09 +0200
parents f95830b58336
children
comparison
equal deleted inserted replaced
852:f95830b58336 854:79b5c1be9a5e
1 from pyntnclick.widgets.base import Button
2
3
4 class ImageButtonWidget(Button):
5 """An image that is also a button. Whatever next?"""
6
7 def __init__(self, pos, gd, image, size=None):
8 super(ImageButtonWidget, self).__init__(pos, gd, size)
9 if not size:
10 self.rect.size = image.get_rect().size
11 self.image = image
12
13 def draw(self, surface):
14 if self.visible:
15 surface.blit(self.image, self.rect)