From f894c2fd09ed17540c49cb4083573861ded76554 Mon Sep 17 00:00:00 2001 From: Viljami Ilola <+@hix.fi> Date: Thu, 28 Mar 2024 22:28:45 +0200 Subject: Show as sprite group with update --- src/sliceitoff/display/display.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/sliceitoff/display') diff --git a/src/sliceitoff/display/display.py b/src/sliceitoff/display/display.py index 06b222c..c2a3e44 100644 --- a/src/sliceitoff/display/display.py +++ b/src/sliceitoff/display/display.py @@ -28,8 +28,10 @@ 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) for group in groups: - group.draw(self.screen) + if group: + group.draw(self.screen) self.screen.fill(Stats.bordercolor, rect=Scaling.borders[0]) self.screen.fill(Stats.bordercolor, rect=Scaling.borders[1]) pygame.display.flip() -- cgit v1.2.3