Python seems to completely ignore one of my objects – the games.Text object. Can’t seem to understand why, syntax seems correct. Here’s the code.
from livewires import games
#Creating and validating the pygame screen.
myscreen = games.Screen ()
#Loading an image into memory to create an image object
wall_image = games.load_image("wall.jpg", transparent = False)
myscreen.set_background(wall_image)
#Printing Arbitary Score
games.Text(screen = myscreen, x = 500, y = 30,
text = "Score: 1756521",
size = 50, color = color.black)
myscreen.mainloop()
Your problem seems to be some combination of misspelling “colour” in a few places (this package is from the UK), forgetting
and failing to notice an error message:
At least I assume that’s your problem, because after those changes it runs just fine for me, displaying the “score” text in the top right.