diff options
Diffstat (limited to 'helpers')
-rw-r--r-- | helpers/__init__.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/helpers/__init__.py b/helpers/__init__.py index c42b378..7dbffdd 100644 --- a/helpers/__init__.py +++ b/helpers/__init__.py | |||
@@ -1,5 +1,6 @@ | |||
1 | # -*- coding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- |
2 | from pygame import * | 2 | from pygame import * |
3 | import sys | ||
3 | 4 | ||
4 | class Action: | 5 | class Action: |
5 | action_types = [ | 6 | action_types = [ |
@@ -106,7 +107,11 @@ class Key: | |||
106 | def draw(self, background_surface): | 107 | def draw(self, background_surface): |
107 | self.surface = self.square().surface() | 108 | self.surface = self.square().surface() |
108 | 109 | ||
109 | police = font.Font("Ubuntu-Regular.ttf", 14) | 110 | if getattr(sys, 'frozen', False): |
111 | police = font.Font(sys._MEIPASS + "/Ubuntu-Regular.ttf", 14) | ||
112 | else: | ||
113 | police = font.Font("Ubuntu-Regular.ttf", 14) | ||
114 | |||
110 | text = police.render(self.key_sym, True, (0,0,0)) | 115 | text = police.render(self.key_sym, True, (0,0,0)) |
111 | self.surface.blit(text, (5,5)) | 116 | self.surface.blit(text, (5,5)) |
112 | background_surface.blit(self.surface, self.position) | 117 | background_surface.blit(self.surface, self.position) |