I am currently working on a weather application using the PyGame framework and it needs to have side scrolling text at the bottom, but I wouldn't know how to do it. I have looked for tutorials online and I have found things similar but not quite what I would like.
This is my code around the end, where all of the text is initalized.
desc_text = desc.render(description, True, (255, 255, 255))
desc_rect = desc_text.get_rect()
desc_rect.center = (238, 740)
screen = pygame.display.set_mode((960, 720), pygame.FULLSCREEN, vsync=1)
while running:
try:
for event in pygame.event.get():
if event.type == KEYDOWN:
if event.key == K_ESCAPE:
running = False
elif event.type == QUIT:
running = False
screen.fill((0, 0, 125))
screen.blit(header_text, header_rect)
screen.blit(temperature_text, temperature_rect)
screen.blit(wind_text, wind_rect)
screen.blit(desc_text, desc_rect)
pygame.display.update()
except KeyboardInterrupt:
print("Quitting...")
running = False
I want it to be like a marquee, scrolling left to right endlessly.