Scene
Create containerized pyDraw programs and apply them to the Screen independently!
Initialization
You can get started with Scenes by creating a new class that extends the base Scene class from pyDraw:
Methods
Start
Should instantiate your variables and prepare everything that the input hooks will use (unless you have checks in your hooks)
Run
Should contain your actual loop and main program logic.
Screen
Get the Screen that the Scene is tied to! (can throw errors if methods are being called without being attached to a Screen)
Input Methods
Supports all the same input methods that any other pyDraw program supports:
mousedown
| When the mouse is pressed or is held, this will be calledmouseup
| When the mouse is released this is calledmousedrag
| When the mouse is dragged, this is called anytime the mouse moves and is held.mousemove
| When the mouse moves, this method is called.keydown
| When a key is pressed or is currently being held, this is calledkeyup
| When a key is released this is calledexit
| Called when the Screen is abruptly closed orscreen.exit()
is called.
Last updated