Mercurial > boomslang
annotate pyntnclick/widgets/imagebutton.py @ 601:0ae62d824d2f pyntnclick
Can haz imagebutton
author | Stefano Rivera <stefano@rivera.za.net> |
---|---|
date | Sat, 11 Feb 2012 20:00:59 +0200 |
parents | |
children | 08647ef4d324 |
rev | line source |
---|---|
601 | 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, rect, image): | |
8 super(ImageButtonWidget, self).__init__(rect) | |
9 self.image = image | |
10 | |
11 def draw(self, surface): | |
12 surface.blit(self.image, self.rect) |