summaryrefslogtreecommitdiff
path: root/src/sliceitoff/display/scaling.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/sliceitoff/display/scaling.py')
-rw-r--r--src/sliceitoff/display/scaling.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/sliceitoff/display/scaling.py b/src/sliceitoff/display/scaling.py
index 53a9fb1..ddc897f 100644
--- a/src/sliceitoff/display/scaling.py
+++ b/src/sliceitoff/display/scaling.py
@@ -6,6 +6,8 @@ class Scaling():
factor = 0.02
left = 0
top = 0
+ resolution = (0,0)
+ center = (0,0)
borders = (pygame.Rect(0,0,0,0), pygame.Rect(0,0,0,0))
active = pygame.Rect(0,0,0,0)
@@ -38,11 +40,13 @@ class Scaling():
@staticmethod
def update_scaling(size: tuple) -> None:
+ __class__.resolution = size
+ __class__.center = (size[0]/2,size[1]/2)
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__.border = (
+ __class__.borders = (
pygame.Rect(
0,
0,