i executed the following code
def draw():
screen.draw.text("hello", topleft=(10 , 10))
but the output I get is just 5 white blocks instead of hello enter image description here
i executed the following code
def draw():
screen.draw.text("hello", topleft=(10 , 10))
but the output I get is just 5 white blocks instead of hello enter image description here
The minimal Pygame Zero script looks as follows:
import pgzrun
def draw():
screen.clear()
screen.draw.text("hello", topleft = (10, 10))
pgzrun.go()
You have to call pgzrun.go()
after the definition of the draw
function.