home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
576-600
/
apd591
/
proc
/
graphics
/
sbox.amos
/
sbox.amosSourceCode
Wrap
AMOS Source Code
|
1994-02-02
|
2KB
|
68 lines
Screen Open 0,320,200,16,0 : Curs Off : Flash Off : Cls 1
Palette $666,0,$222,$333,$444,$555,$666,$777,$888,$999,$AAA,$BBB,$CCC,$DDD,$EEE,$FFF
Ink ,3
SBOX[10,10,73,33,False] : Ink 10 : Paint 40,20
SBOX[10,40,73,63,False] : Ink 10 : Paint 40,50
SBOX[80,10,143,33,False] : Ink 10 : Paint 110,20
SBOX[80,40,143,63,False] : Ink 10 : Paint 110,50
Reserve Zone 4
Set Zone 1,10,10 To 73,33
Set Zone 2,10,40 To 73,63
Set Zone 3,80,10 To 143,33
Set Zone 4,80,40 To 143,63
Repeat
Repeat : Until Inkey$<>'' or Mouse Key
If Mouse Key=0 : End : End If
Z=Mouse Zone
If Z
If Z=1
SBOX[10,10,73,33,True]
End If
If Z=2
SBOX[10,40,73,63,True]
End If
If Z=3
SBOX[80,10,143,33,True]
End If
If Z=4
SBOX[80,40,143,63,True]
End If
Repeat : Until Mouse Key=0
If Z=1
SBOX[10,10,73,33,False]
End If
If Z=2
SBOX[10,40,73,63,False]
End If
If Z=3
SBOX[80,10,143,33,False]
End If
If Z=4
SBOX[80,40,143,63,False]
End If
End If
Until Inkey$<>''
'*********************************************************
'
'SBOX makes the same assumptions & takes the same parameters as TBOX.
'The difference is the box is draw with dotted lines, and always has a
'dark (colour 0) box around it, with the corner pixels missing to give
'a rounded corner effect
'
'SBOX is useful for: Drawing control buttons - just set IN to true, and
' redraw the button to depress it!
'
Procedure SBOX[X1,Y1,X2,Y2,IN]
Ink 0 : A=Screen Colour-1
Draw X1+1,Y1 To X2-1,Y1
Draw X1+1,Y2 To X2-1,Y2
Draw X1,Y1+1 To X1,Y2-1
Draw X2,Y1+1 To X2,Y2-1
Set Line $AAAA
Ink -IN*A
Polyline X1+1,Y2-1 To X2-1,Y2-1 To X2-1,Y1+2
Ink A+IN*A
Polyline X1+1,Y2-2 To X1+1,Y1+1 To X2-1,Y1+1
Set Line $FFFF
End Proc