From 9548295de1d343e831baaa2e1c908f70cef0e33a Mon Sep 17 00:00:00 2001 From: Viljami Ilola <+@hix.fi> Date: Mon, 8 Apr 2024 21:03:40 +0300 Subject: life group. indicator for lost life --- src/sliceitoff/display/scaling.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/sliceitoff/display') diff --git a/src/sliceitoff/display/scaling.py b/src/sliceitoff/display/scaling.py index b4292b4..834c02e 100644 --- a/src/sliceitoff/display/scaling.py +++ b/src/sliceitoff/display/scaling.py @@ -50,7 +50,8 @@ class Scaling(): if size[0] / size[1] <= INTERNAL_WIDTH / INTERNAL_HEIGHT: __class__.factor = size[0] / INTERNAL_WIDTH __class__.left = 0 - __class__.top = (size[1] - INTERNAL_HEIGHT * __class__.factor) // 2 + __class__.top = int ( + (size[1] - INTERNAL_HEIGHT * __class__.factor) // 2) __class__.borders = ( pygame.Rect( 0, @@ -65,7 +66,8 @@ class Scaling(): ) else: __class__.factor = size[1] / INTERNAL_HEIGHT - __class__.left = (size[0] - INTERNAL_WIDTH * __class__.factor) // 2 + __class__.left = int( + (size[0] - INTERNAL_WIDTH * __class__.factor) // 2) __class__.top = 0 __class__.borders = ( pygame.Rect( -- cgit v1.2.3