3 from pgzero.ptext import getsurf
4 from .surf import SurfActor
7 class TextButton(SurfActor):
8 def __init__(self, text, action=None, **kwargs):
9 self.text(text, **kwargs)
10 super(TextButton, self).__init__(self._surf)
14 self.text(self._text, owidth=2, ocolor="white", color="black")
19 def text(self, text, **kw):
21 self._text_kwargs = kw
22 self.surf = getsurf(text, **kw)