diff options
Diffstat (limited to 'src/api/MultiLabel.py')
-rw-r--r-- | src/api/MultiLabel.py | 10 |
1 files changed, 5 insertions, 5 deletions
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
+
|