PALETTE.BLACK))
self.box_width = kwargs.pop('box_width', 0)
+ self.full_width = kwargs.pop('full_width', True)
+
super(TextBoxWidget, self).__init__(*args, **kwargs)
def lines(self, image_map):
width = max(width, line_rect.width + self.padding * 2)
height += line_rect.height
+ if self.full_width:
+ width = max(width, self.box_width)
+
self.surface = pygame.surface.Surface((width, height),
pygame.locals.SRCALPHA)
self.surface.fill(self.bg_colour)