From a23b6647b0ca2cd9f2ccbbe12360c3fa0f96a554 Mon Sep 17 00:00:00 2001 From: Viljami Ilola <+@hix.fi> Date: Sat, 16 Mar 2024 12:35:07 +0200 Subject: scaling as class --- src/sliceitoff/images/images.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/sliceitoff/images/images.py') diff --git a/src/sliceitoff/images/images.py b/src/sliceitoff/images/images.py index 102ca0f..b2d93a2 100644 --- a/src/sliceitoff/images/images.py +++ b/src/sliceitoff/images/images.py @@ -1,11 +1,13 @@ import os import pygame +from display import Scaling + DEBUG = os.getenv("DEBUG") images = {} -def load_images(scale): +def load_images(): if not images: with open("assets/images.lst") as image_list_file: for line in image_list_file: @@ -16,4 +18,4 @@ def load_images(scale): image = pygame.image.load(filename) images[name] = pygame.transform.smoothscale_by( pygame.Surface.convert_alpha(image), - scale) + Scaling.factor) -- cgit v1.2.3