; MouseWait Example ; ----------------- Graphics 640,480,0,2 SetBuffer BackBuffer() ; Draw the title frame FIRST, then halt - the player needs to see ; the prompt while the program is blocked inside MouseWait. Cls Text 320,180,"* S H O O T I N G R A N G E *",True Text 320,220,"Click any mouse button to start",True Flip ; MouseWait halts the program until a mouse button is pressed and ; returns its code (1=left, 2=right, 3=middle). button=MouseWait() While Not KeyDown(1) Cls ; A live crosshair so the range feels alive after the title Color 255,255,0 Oval MouseX()-10,MouseY()-10,20,20,False Line MouseX()-14,MouseY(),MouseX()+14,MouseY() Line MouseX(),MouseY()-14,MouseX(),MouseY()+14 Color 255,255,255 Text 0,0,"Esc: exit" Text 0,20,"MouseWait() returned button "+button+" on the title screen" Text 0,40,"(1=left, 2=right, 3=middle)" Flip Wend End