diff options
author | Viljami Ilola <+@hix.fi> | 2024-03-30 16:46:29 +0200 |
---|---|---|
committer | Viljami Ilola <+@hix.fi> | 2024-03-30 16:46:29 +0200 |
commit | af17f92e0beda893fb91ff757b76f2499e500666 (patch) | |
tree | 180ddcc4fac223e057d76db71f6ae4ddbe67721a /src/sliceitoff/text | |
parent | 1def24341ce4f3ab1c1de4a9dde27bf0b5fab179 (diff) |
lint
Diffstat (limited to 'src/sliceitoff/text')
-rw-r--r-- | src/sliceitoff/text/fonts.py | 1 | ||||
-rw-r--r-- | src/sliceitoff/text/text.py | 5 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/sliceitoff/text/fonts.py b/src/sliceitoff/text/fonts.py index af9aefb..5743e2a 100644 --- a/src/sliceitoff/text/fonts.py +++ b/src/sliceitoff/text/fonts.py @@ -10,6 +10,7 @@ class Fonts: @staticmethod def load_fonts(base_path): + """ loads fonts from list """ filename_fontlist = os.path.join(base_path, "assets", "fonts.lst") with open(filename_fontlist, "r", encoding="utf-8") as fontlist_file: for line in fontlist_file: diff --git a/src/sliceitoff/text/text.py b/src/sliceitoff/text/text.py index 69a30bc..c1fd7b8 100644 --- a/src/sliceitoff/text/text.py +++ b/src/sliceitoff/text/text.py @@ -29,7 +29,7 @@ def get_letter_surface(font_key, ch): CGA_COLORS[color], special_flags = pygame.BLEND_RGBA_MULT) return scaled_fonts[font_key][ch] - + class LetterSprite(pygame.sprite.Sprite): """ Make sprite out of letter surface at given position """ @@ -42,7 +42,7 @@ class LetterSprite(pygame.sprite.Sprite): Scaling.factor * (1_000 - randrange(2_000)), Scaling.factor * (1_000 - randrange(2_000))) - def update(self, dt = 0, explode = 0, **kwargs): + def update(self, dt = 0, explode = 0): """ All the movements for letters """ if explode and dt: self.rect = pygame.Rect( @@ -94,4 +94,3 @@ class TextPage(pygame.sprite.Group): (pos[0]+col*grid[0], pos[1]+row*grid[1]) ) self.add(LetterSprite(font_key, ch, sprite_pos)) col += 1 -
\ No newline at end of file |