Mercurial > pyntnclick
view pyntnclick/widgets/overlay.py @ 782:6a3440c8be8d pyntnclick
The title needs to be lazily translated. It's evaluated before we set up gettext
author | Stefano Rivera <stefano@rivera.za.net> |
---|---|
date | Sat, 26 Jan 2013 19:13:07 +0200 |
parents | fdc63049b08c |
children |
line wrap: on
line source
from pyntnclick.widgets.base import Button class OverlayButton(Button): """A non-visiable clickable area, that causes an overlay to be displayed. Doesn't really understand this focus thing.""" def __init__(self, rect, gd, image): self.image = image super(OverlayButton, self).__init__(rect, gd) def draw(self, surface): if not self.disabled: surface.blit(self.image, surface.get_rect())