diff options
Diffstat (limited to 'helpers/key.py')
-rw-r--r-- | helpers/key.py | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/helpers/key.py b/helpers/key.py index e643dc2..612758f 100644 --- a/helpers/key.py +++ b/helpers/key.py | |||
@@ -6,15 +6,6 @@ import sys | |||
6 | import pygame | 6 | import pygame |
7 | 7 | ||
8 | class Key: | 8 | class Key: |
9 | row_positions = { | ||
10 | 'first': 0, | ||
11 | 'second': 50, | ||
12 | 'third': 100, | ||
13 | 'fourth': 150, | ||
14 | 'fifth': 200, | ||
15 | 'sixth': 250, | ||
16 | } | ||
17 | |||
18 | default_outer_color = (120, 120, 120) | 9 | default_outer_color = (120, 120, 120) |
19 | lighter_outer_color = (200, 200, 200) | 10 | lighter_outer_color = (200, 200, 200) |
20 | default_inner_color = (255, 255, 255) | 11 | default_inner_color = (255, 255, 255) |
@@ -27,11 +18,7 @@ class Key: | |||
27 | self.key_name = key_name | 18 | self.key_name = key_name |
28 | self.key_sym = key_sym | 19 | self.key_sym = key_sym |
29 | 20 | ||
30 | if isinstance(top, str): | 21 | self.top = top |
31 | self.top = self.row_positions[top] | ||
32 | else: | ||
33 | self.top = top | ||
34 | |||
35 | self.left = left | 22 | self.left = left |
36 | self.width = width | 23 | self.width = width |
37 | self.height = height | 24 | self.height = height |
@@ -41,6 +28,7 @@ class Key: | |||
41 | 28 | ||
42 | self.rect = (self.left, self.top, self.right, self.bottom) | 29 | self.rect = (self.left, self.top, self.right, self.bottom) |
43 | self.position = (self.left, self.top) | 30 | self.position = (self.left, self.top) |
31 | self.disabled = disabled | ||
44 | 32 | ||
45 | if disabled: | 33 | if disabled: |
46 | self.outer_color = self.lighter_outer_color | 34 | self.outer_color = self.lighter_outer_color |