# HG changeset patch # User Stefano Rivera # Date 1316288748 -7200 # Node ID 5be1b283f5f0e376ff0a1b2128262df3a99e5c17 # Parent ca1fd4c8170d77ae0f03ce0773b1d7284b974dd8 Whooops, no overlay diff -r ca1fd4c8170d -r 5be1b283f5f0 mamba/widgets/overlay.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mamba/widgets/overlay.py Sat Sep 17 21:45:48 2011 +0200 @@ -0,0 +1,14 @@ +from mamba.widgets.base import Button + + +class OverlayButton(Button): + """A non-visiable clickable area, that causes an overlay to be display""" + + def __init__(self, rect, image): + self.image = image + super(OverlayButton, self).__init__(rect) + self.focussable = True + + def draw(self, surface): + if self.focussed: + surface.blit(self.image, surface.get_rect())