10/17/2023 0 Comments Snes usb joystick controllerJOYBUTTONDOWN : print ( "Joystick button pressed." ) elif event. done = True # Flag that we are done so we exit this loop. textPrint = TextPrint () # - Main Program Loop - while not done : # EVENT PROCESSING STEP # Possible joystick actions: JOYAXISMOTION, JOYBALLMOTION, JOYBUTTONDOWN, # JOYBUTTONUP, JOYHATMOTION for event in pygame. done = False # Used to manage how fast the screen updates. set_caption ( "My Game" ) # Loop until the user clicks the close button. init () # Set the width and height of the screen (width, height). line_height = 15 def indent ( self ): self. render ( textString, True, BLACK ) screen. Font ( None, 20 ) def tprint ( self, screen, textString ): textBitmap = self. class TextPrint ( object ): def _init_ ( self ): self. # It has nothing to do with the joysticks, just outputting the # information. Color ( 'white' ) # This is a simple class that will help us print to the screen.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |