comparison gamelib/custom_widgets.py @ 803:bcc9277a23e6 pyntnclick

Refactor widget positioning API. Remove unused widgets
author Stefano Rivera <stefano@rivera.za.net>
date Sun, 27 Jan 2013 14:52:16 +0200
parents efa58c92b304
children
comparison
equal deleted inserted replaced
802:5ec7905b2365 803:bcc9277a23e6
6 6
7 class JimLabel(WrappedTextLabel): 7 class JimLabel(WrappedTextLabel):
8 """Custom widget for JIM's speech""" 8 """Custom widget for JIM's speech"""
9 9
10 def __init__(self, gd, mesg): 10 def __init__(self, gd, mesg):
11 rect = pygame.Rect((0, 0), (1, 1)) 11 pos = (0, 0)
12 super(JimLabel, self).__init__(rect, gd, 12 size = None
13 super(JimLabel, self).__init__(pos, gd, size=size,
13 text=mesg, fontname='Monospace.ttf', fontsize=20, 14 text=mesg, fontname='Monospace.ttf', fontsize=20,
14 bg_color=pygame.Color(255, 175, 127, 191), 15 bg_color=pygame.Color(255, 175, 127, 191),
15 color=pygame.Color(0, 0, 0), 16 color=pygame.Color(0, 0, 0),
16 border_color=pygame.Color(127, 15, 0)) 17 border_color=pygame.Color(127, 15, 0))
17 18