From 42bc7440c424e3ff57cbb56f94b87ac3e954521e Mon Sep 17 00:00:00 2001 From: frank Date: Wed, 25 Jan 2023 16:52:12 -0500 Subject: [PATCH] restore background scrolling --- NS.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/NS.py b/NS.py index e7158a5..12281b0 100644 --- a/NS.py +++ b/NS.py @@ -1040,16 +1040,16 @@ class Logo(Sprite): for x in range(0, dsr.w + self.location.w, self.location.w): if x != 0 or y != 0: self.add_location((x, y)) - self.background = pygame.surface.Surface(self.get_display_surface().get_size()) - self.display_surface = self.background - Sprite.update(self) - self.display_surface = self.get_screen() def update(self): """ - Draw the background, disable parent update (performance hack) """ - self.get_display_surface().blit(self.background, (0, 0)) + self.move(-1, 1) + if self.location.right < 0: + self.move(self.location.w) + if self.location.top > 0: + self.move(dy=-self.location.h) + Sprite.update(self) class Title(Animation):