Pygame Key Press
问题 I'm writing a basic drawing program to practice Pygame, but I have a problem I'm using key press events to change the drawing color but when you let go of the key it goes back to the default color black. I'm sure there is a easy way to fix this I just don't know how! Here is my code: import pygame from pygame.locals import * import sys RED = (255,0,0) GREEN = (0,255,0) BLUE = (0,0,255) WHITE = (255,255,255) class Draw(object): def update(self, screen): color = (0,0,0) key = pygame.key.get