super(TextBoxWidget, self).__init__(*args, **kwargs)
def lines(self, image_map):
super(TextBoxWidget, self).__init__(*args, **kwargs)
def lines(self, image_map):
width = max(width, line_rect.width + self.padding * 2)
height += line_rect.height
width = max(width, line_rect.width + self.padding * 2)
height += line_rect.height
self.surface = pygame.surface.Surface((width, height),
pygame.locals.SRCALPHA)
self.surface.fill(self.bg_colour)
self.surface = pygame.surface.Surface((width, height),
pygame.locals.SRCALPHA)
self.surface.fill(self.bg_colour)
x, y = self.padding, self.padding
for line_surface in rendered_lines:
x, y = self.padding, self.padding
for line_surface in rendered_lines:
self.surface.blit(line_surface, (x, y))
y += line_surface.get_rect().height
for pos, img in image_map.items():
self.surface.blit(line_surface, (x, y))
y += line_surface.get_rect().height
for pos, img in image_map.items():