diff options
Diffstat (limited to 'src/sliceitoff/display/display.py')
-rw-r--r-- | src/sliceitoff/display/display.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/sliceitoff/display/display.py b/src/sliceitoff/display/display.py index 54b1586..2d6605f 100644 --- a/src/sliceitoff/display/display.py +++ b/src/sliceitoff/display/display.py @@ -1,9 +1,12 @@ +import os import pygame from stats import Stats from .scaling import Scaling +DEBUG = os.getenv("DEBUG") + class Display(): def __init__(self): @@ -14,10 +17,17 @@ class Display(): pygame.FULLSCREEN | pygame.SCALED, vsync = 1 ) Scaling.update_scaling(self.screen.get_size()) + self.screen.fill(Stats.bordercolor) + if DEBUG: + print( + "DISPLAY: \n" + f" {Scaling.active = }\n" + f" {Scaling.border = }\n" + f" {Scaling.factor = }\n") def update(self, groups = None): """ Updates the screen: clear, blit gropus and flip """ - self.screen.fill(Stats.bgcolor) + self.screen.fill(Stats.bgcolor, rect=Scaling.active) for group in groups: group.draw(self.screen) pygame.display.flip() |