Fixed bug in text rendering

This commit is contained in:
2025-06-26 16:54:58 +01:00
parent 6adb31f466
commit 097dd7486a

View File

@ -127,7 +127,7 @@ class Game(gameUtils.Game):
# Render the item text
text = self.wheelFont.render(item.text, True, (255, 255, 255))
# Draw the item text onto the text surface, centred to the right
textSurf.blit(text, (textSurf.size[0]-text.get_width()-self.textMargin, self.size[1]//2 - text.get_height()//2))
textSurf.blit(text, (textSurf.size[0]-text.get_width()-self.textMargin, textSurf.size[1]//2 - text.get_height()//2))
# Draw debug lines
#if idx < 1:
# pygame.draw.rect(textSurf, (0, 128, 255), (0, 0, textSurf.size[0], textSurf.size[1]), 1)