Mercurial > pyntnclick
diff pyntnclick/widgets/base.py @ 824:9f542ef6e498 pyntnclick
Reorganise code
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Tue, 29 Jan 2013 11:41:03 +0200 |
parents | 3a875256f795 |
children | 547021cd0afa |
line wrap: on
line diff
--- a/pyntnclick/widgets/base.py Mon Jan 28 18:32:03 2013 +0200 +++ b/pyntnclick/widgets/base.py Tue Jan 29 11:41:03 2013 +0200 @@ -6,6 +6,7 @@ BLEND_RGBA_MIN) from pyntnclick.engine import UserEvent +from pyntnclick.utils import convert_color class Widget(object): @@ -218,15 +219,6 @@ super(Box, self).draw(surface) -def convert_color(color): - """Give me a pygame Color, dammit""" - if isinstance(color, pygame.Color): - return color - if isinstance(color, basestring): - return pygame.Color(color) - return pygame.Color(*color) - - class ModalWrapper(Container): "A wrapper around a widget that removes itself when a mouse click occurs"