From 23b7e0e5daf024e87d967ede3dfe6777a07e7469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sun, 19 Jun 2016 22:44:54 +0200 Subject: Fix threading problems with ipython --- helpers/key.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'helpers/key.py') diff --git a/helpers/key.py b/helpers/key.py index 9a6cb3b..e9e485d 100644 --- a/helpers/key.py +++ b/helpers/key.py @@ -72,7 +72,7 @@ class Key: ) def set_description(self, description): - self.description = description + self.description = [str(desc) for desc in description] def set_color(self, color): self.custom_color = tuple(color) @@ -97,7 +97,7 @@ class Key: self.surface.blit(text, (5,5)) is_first_line = True - offset = 11 + text_police.get_linesize() + offset = 11 + text_police.get_linesize() - 4 first_line_offset = 18 for description in self.description: text = text_police.render(description, True, (0,0,0)) @@ -105,8 +105,8 @@ class Key: self.surface.blit(text, (first_line_offset, 9)) is_first_line = False else: - self.surface.blit(text, (5, offset)) - offset += text_police.get_linesize() + self.surface.blit(text, (3, offset)) + offset += text_police.get_linesize() - 4 background_surface.blit(self.surface, self.position) self.draw_lock.release() -- cgit v1.2.3