class documentation
class Window:
Undocumented
| Method | __init__ |
Undocumented |
| Method | key |
Return True if the given key is currently pressed. If no key given, then returns True if any key is pressed. |
| Method | mouse |
Undocumented |
| Async Method | next |
Yields control until the next frame is drawn. |
| Method | reset |
Undocumented |
| Method | run |
Undocumented |
| Method | set |
Undocumented |
| Method | set |
Undocumented |
| Method | set |
Undocumented |
| Method | set |
No summary |
| Method | set |
Undocumented |
| Method | set |
Undocumented |
| Constant | FPS |
Undocumented |
| Constant | FRAME |
Undocumented |
| Property | actual |
@return the actual calculated FPS as a float. This is usually slightly less than the configured fps() due to overhead. But if you see it drop, you may be having a performance problem or taking too much time in the event callbacks. |
| Property | fps |
The target Frames Per Second used for calculations. |
| Property | mouse |
@return the position of the mouse pointer as an (x,y) tuple. |
| Property | mouse |
Undocumented |
| Property | mouse |
Undocumented |
| Property | random |
Pick a random position within the window and return it as an (x,y) pair. @return a tuple of an (x,y) coordinate |
| Property | rect |
Undocumented |
| Property | size |
@return the (w,h) size of the window as a tuple |
| Property | stage |
Undocumented |
| Property | timer |
Like the Scratch 'timer' pseudo-variable, this will return the number of seconds (and fractional seconds) since the program was started. |
| Method | _async |
Undocumented |
| Method | _handle |
Undocumented |
| Method | _make |
Undocumented |
| Instance Variable | _background |
Undocumented |
| Instance Variable | _debug |
Undocumented |
| Instance Variable | _epoch |
Undocumented |
| Instance Variable | _frame |
Undocumented |
| Instance Variable | _full |
Undocumented |
| Instance Variable | _last |
Undocumented |
| Instance Variable | _mouse |
Undocumented |
| Instance Variable | _mouse |
Undocumented |
| Instance Variable | _rolling |
Undocumented |
| Instance Variable | _running |
Undocumented |
| Instance Variable | _stage |
Undocumented |
| Instance Variable | _window |
Undocumented |
Return True if the given key is currently pressed. If no key given, then returns True if any key is pressed.
| Parameters | |
| key | Can be the text name of the key. Some examples are 'a', '3', 'space', 'up', 'down', 'left', 'right', etc. The complete list of names is determined by the pygame.key module. Key can also be a pygame.K_* integer constant. |
@return the actual calculated FPS as a float. This is usually slightly less than the configured fps() due to overhead. But if you see it drop, you may be having a performance problem or taking too much time in the event callbacks.
Pick a random position within the window and return it as an (x,y) pair. @return a tuple of an (x,y) coordinate