From 3e7f035b9526b0daaba740ee915c5f02332c867c Mon Sep 17 00:00:00 2001 From: Alan Aguiar Date: Tue, 21 Jan 2014 01:22:16 +0000 Subject: simplify label and multilabel init --- (limited to 'src/api/MultiLabel.py') diff --git a/src/api/MultiLabel.py b/src/api/MultiLabel.py index 3dee9de..3180e89 100644 --- a/src/api/MultiLabel.py +++ b/src/api/MultiLabel.py @@ -3,8 +3,6 @@ import pygame from api.Label import CLabel -font_path = 'assets/fonts/' - class CMultiLabel(CLabel): """ accepts a string separate with \n, creates a multi-line label to display text @@ -15,8 +13,8 @@ class CMultiLabel(CLabel): least 30 pixels per line (with the default font) """ - def __init__(self, fontName = "DejaVuSans.ttf", transparent=False): - CLabel.__init__(self, fontName, transparent) + def __init__(self): + CLabel.__init__(self) self.vSize = 35 def set_vertical(self, aVer=35): @@ -42,4 +40,6 @@ class CMultiLabel(CLabel): xPos = (self.image.get_width() - fontSurface.get_width())/2 yPos = lineNum * self.vSize + fix self.image.blit(fontSurface, (xPos, yPos)) - self.update() + self.rect = self.image.get_rect() + self.rect.center = self.center + -- cgit v0.9.1