summaryrefslogtreecommitdiff
path: root/src/sliceitoff/display/scaling.py
diff options
context:
space:
mode:
authorViljami Ilola <+@hix.fi>2024-04-08 21:03:40 +0300
committerViljami Ilola <+@hix.fi>2024-04-08 21:03:40 +0300
commit9548295de1d343e831baaa2e1c908f70cef0e33a (patch)
treee9cb817de24b179beb842ec356e542ce22cde086 /src/sliceitoff/display/scaling.py
parentc99a7138e78352c4e26483dd4dad36b009a72e4f (diff)
life group. indicator for lost life
Diffstat (limited to 'src/sliceitoff/display/scaling.py')
-rw-r--r--src/sliceitoff/display/scaling.py6
1 files changed, 4 insertions, 2 deletions
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(