restore background scrolling

This commit is contained in:
ohsqueezy 2023-01-25 16:52:12 -05:00
parent 5faee7703c
commit 42bc7440c4
1 changed files with 6 additions and 6 deletions

12
NS.py
View File

@ -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):