X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=helpers%2Fkey.py;h=e9e485d11d52d45a61c0d73060aa66895f611a7a;hb=23b7e0e5daf024e87d967ede3dfe6777a07e7469;hp=9a6cb3b29f2a1b0270a1081490eab4efdc90f844;hpb=b86db9f1679c855c2d39a0b116f846d271271a2c;p=perso%2FImmae%2FProjets%2FPython%2FMusicSampler.git 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()