The code in this screenshot will draw a button (rectangle) on the touchscreen, and wait until you tap in it.