From 5c5df6e068b2957987cb51b34d6930769424f8ca Mon Sep 17 00:00:00 2001 From: Viljami Ilola <+@hix.fi> Date: Fri, 29 Mar 2024 00:30:39 +0200 Subject: stats as object --- src/sliceitoff/display/display.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/sliceitoff/display/display.py') diff --git a/src/sliceitoff/display/display.py b/src/sliceitoff/display/display.py index 2febdc2..bdb2514 100644 --- a/src/sliceitoff/display/display.py +++ b/src/sliceitoff/display/display.py @@ -1,9 +1,8 @@ import os import pygame -from stats import Stats - from .scaling import Scaling +from .colors import CGA_COLORS DEBUG = os.getenv("DEBUG") @@ -17,7 +16,7 @@ class Display(): pygame.FULLSCREEN | pygame.SCALED, vsync = 1 ) Scaling.update_scaling(self.screen.get_size()) - self.screen.fill(Stats.bordercolor) + #self.screen.fill(0) if DEBUG: print( "DISPLAY: \n" @@ -27,12 +26,11 @@ class Display(): def update(self, groups = None): """ Updates the screen: clear, blit gropus and flip """ - self.screen.fill(Stats.bgcolor, rect=Scaling.active) - #(g.draw(self.screen) for g in groups if g) + self.screen.fill(CGA_COLORS[4], rect=Scaling.active) for group in groups: group.draw(self.screen) - self.screen.fill(Stats.bordercolor, rect=Scaling.borders[0]) - self.screen.fill(Stats.bordercolor, rect=Scaling.borders[1]) + self.screen.fill(0, rect=Scaling.borders[0]) + self.screen.fill(0, rect=Scaling.borders[1]) pygame.display.flip() def __del__(self): -- cgit v1.2.3