Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions text.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def __init__(self, text, height, pos_x, pos_y, text_color):
self.text_color = text_color
self.text = text
self.font = pygame.font.Font(None, height)
self.image = self.font.render(self.text, True, self.text_color, None)
self.image = self.font.render(self.text, True, self.text_color)
self.rect = self.image.get_rect()
self.rect.x = pos_x
self.rect.y = pos_y
Expand All @@ -30,7 +30,7 @@ def update(self):

def __update_rect__(self):
# render text, store old coordinates and set new text rect to old position
self.image = self.font.render(self.text, True, self.text_color, None)
self.image = self.font.render(self.text, True, self.text_color)
old_rect_y = self.rect.y
old_rect_x = self.rect.x
self.rect = self.image.get_rect()
Expand Down