home *** CD-ROM | disk | FTP | other *** search
File List | 1987-07-15 | 1.2 KB | 52 lines |
- '********** First load the picture clip of the dialog
- Open "I",#1,"EXAMPLE.cl1"
- Input #1,Clip_len,Colr_len,Clip_width,Clip_hite,Rez_pic
- Pic$=String$(Clip_len,0)
- Colr$=String$(Colr_len,0)
- Bget #1,Varptr(Colr$),Colr_len
- Bget #1,Varptr(Pic$),Clip_len
- Close #1
- Void Xbios(6,L:Varptr(Colr$))
- '********** Now initialize variables and dimension the Sq array
- Bx%=57
- By%=21
- Dim Sq(259)
- Arrayfill Sq(),0
- '********** Read the data describing out target squares
- for J=1 to 29
- read D
- read C
- Sq(C)=D
- Next J
- '********** Show the Box and Handle all replies
- Put Bx%,By%,Pic$
- Mainloop:
- repeat
- Until mousek<>0
- @Sample_mouse
- If Sq(P)=0 Then
- Goto Mainloop
- Endif
- Print at(1,1);P;Chr$(32);Sq(P);Space$(5)
- Goto Mainloop
- '************ Now the data which describes the dialog
- DATA 1,124
- DATA 2,21
- DATA 3,164
- DATA 4,133
- DATA 5,173
- DATA 6,125,6,126,6,127,6,128,6,129,6,130,6,131,6,132
- DATA 7,165,7,166,7,167,7,168,7,169,7,170,7,171,7,172
- DATA 8,210,8,211,8,212
- DATA 9,205,9,206,9,207
- DATA 10,127
- DATA 11,171
-
- '************* Here we check mouse are convert it to (P)
- Procedure Sample_mouse
- Mouse Mox,Moy,dumb_key
- Xpos=Int(Mox/16)
- Ypos=Int(Moy/16)
- P=((Ypos*17)+(Ypos*3))+Xpos
- return
-