Add TextButton and SurfActor actors.
[koperkapel.git] / koperkapel / actors / buttons.py
1 """ Buttons. """
2
3 from pgzero.ptext import getsurf
4 from .surf import SurfActor
5
6
7 class TextButton(SurfActor):
8     def __init__(self, text, **kwargs):
9         super(TextButton, self).__init__(getsurf(text, **kwargs))
10
11     def text(self, *args, **kw):
12         self.surf = getsurf(*args, **kw)