Mercurial > pyntnclick
changeset 641:dae56fc7b902 pyntnclick
Remove a hacked resorce from TextWidget
author | Stefano Rivera <stefano@rivera.za.net> |
---|---|
date | Sun, 12 Feb 2012 01:41:02 +0200 |
parents | e8daeb766939 |
children | 143c67501c79 |
files | pyntnclick/widgets/text.py |
diffstat | 1 files changed, 1 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/pyntnclick/widgets/text.py Sun Feb 12 01:34:39 2012 +0200 +++ b/pyntnclick/widgets/text.py Sun Feb 12 01:41:02 2012 +0200 @@ -3,10 +3,6 @@ from pyntnclick.widgets.base import Widget, Button -# XXX: Needs a way to get at resource: -from pyntnclick.resources import Resources -get_font = Resources("Resources").get_font - class TextWidget(Widget): fontcache = {} @@ -29,7 +25,7 @@ self.prepare() def prepare(self): - self.font = get_font(self.fontname, self.fontsize) + self.font = self.resource.get_font(self.fontname, self.fontsize) if not isinstance(self.color, pygame.Color): self.color = pygame.Color(self.color) self.surface = self.font.render(self.text, True, self.color)