TS7-Pro 7-inch Touch Screen
Add drawing function to Pencil sprite
Click on the Pencil sprite. First, we need to make the Pencil sprite move with the mouse. If the mouse button is
pressed, we call the pen down block in the Pen extension function, which can draw along the track of the cursor.
Otherwise, call thepen up block to stop drawing.
194 Chapter 5. PROJECTS AND ACTIVITIES