'How to scroll in Y axis in pygame? [duplicate]
So I've got a multiline text which when I blit on the screen, goes off screen(in Y axis). I don't wanna compromise the font size for it but I'd rather like to be able to scroll in Y axis. How would I go about doing this?
Here's a example of how the text looks right now
def render_multi_line(text, x, y, fsize)
lines = text.splitlines()
for i, l in enumerate(lines):
screen.blit(sys_font.render(l, 0, hecolor), (x, y + fsize*i))
while True:
#[...] check for evennts
#Render multiline text
render_mutli_line("A big multiline text \n that goes \n off screen.....", 50,50, 20)
pygame.display.update()
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
