How to add text into a pygame rectangle
问题 I have come as far as drawing a rectangle in pygame however I need to be able to get text like "Hello" into that rectangle. How can I do this? (If you can explain it as well that would be much appreciated. Thank-you) Here is my code: import pygame import sys from pygame.locals import * white = (255,255,255) black = (0,0,0) class Pane(object): def __init__(self): pygame.init() pygame.display.set_caption('Box Test') self.screen = pygame.display.set_mode((600,400), 0, 32) self.screen.fill((white