![]() ![]() The event queue contains pygame object for representing events event objects. Note: Joysticks will not send any events until the device has been initialized. Usually, this should be called once per game loop. With the system, you will need to call () internally process pygame event handlers to keepĮverything current. ![]() System window manager and other parts of the platform. This method, remember that pygame requires some form of communication with the Pygame.mouse pygame module to work with the mouse, pygame.key pygame module to work with the keyboard, and pygame.joystick Pygame module for interacting with joysticks, gamepads, and trackballs. To get the state of various input devices, you can forego the event queue andĪccess the input devices directly with their appropriate modules: _blocked() control which events are allowed on the queue to limit which events get queued. Not handling events may cause your system to decide your To prevent lost events,Įspecially input events which signal a quit command, your program must handleĮvents every frame (with (), (), ![]() The queue becomes full new events are quietly dropped. The event queue has an upper limit on the number of events it can hold. Initialized and a video mode not set, the event queue may not work properly. The input queue is heavilyĭependent on the pygame.display pygame module to control the display window and screen module. This module help you manage that event queue. Pygame handles all its event messaging through an event queue. ![]()
0 Comments
Leave a Reply. |