home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sauce 'n' Code 2
/
sauce-n-code-02.adf
/
ASCII_Source
/
WB2.asc
< prev
next >
Wrap
Text File
|
1995-07-02
|
3KB
|
180 lines
'
'******************************************
'
' Workbench 2 Effects
' -------------------
'
' By Malcolm Lavery
'
' And Neil Wright (C)1993
'
'****************************************
'
'
Fade 1 : Wait 10
Screen Open 0,640,256,16,Hires
Palette $0,$FFF,,,$CCC,$EEE,$999,$333,$88F,$A00,$800,$A0,$80,$A,$8
_WB2_MOUSE
Curs Off : Cls 0 : Flash Off
Limit Mouse 0,0 To 640,500
'
'
Reserve Zone 10
'
'
_WB2_DISPLAY[0,0,640,10,0,8]
_WB2_DISPLAY[0,11,640,250,0,6]
_WB2_DISPLAY[7,15,625,236,1,6]
'
Ink 0,8
Text 3,7,"FILE : Workbench 2 Effects"
'
'
_WB2_BUTTON[1,20,20,200,10,0,"PRESS",6,0]
_WB2_BUTTON[2,20,40,200,10,0,"And press here!",6,0]
_WB2_BUTTON[3,20,60,600,20,0,"Any size buttons can be drawn",6,0]
_WB2_BUTTON[4,20,90,470,150,0,"BIG BUGGER",6,0]
_WB2_BUTTON[10,520,225,100,20,0,"QUIT!",6,0]
'
'
'
'
Do
'
'
'
TEST=Mouse Zone
TESTTWO=Mouse Key
'
'
If TESTTWO=1 and TEST=1
_WB2_BUTTON[1,20,20,200,10,1,"PRESS",8,1]
_WB2_BUTTON[1,20,20,200,10,0,"PRESS",6,0]
End If
'
'
If TESTTWO=1 and TEST=2
_WB2_BUTTON[2,20,40,200,10,1,"MAGIC",8,1]
_WB2_BUTTON[2,20,40,200,10,0,"And press here!",6,0]
End If
'
'
If TESTTWO=1 and TEST=3
_WB2_BUTTON[3,20,60,600,20,1,"Big and fat is this button!",8,1]
_WB2_BUTTON[3,20,60,600,20,0,"Any size buttons can be drawn",6,0]
End If
'
'
If TESTTWO=1 and TEST=4
_WB2_BUTTON[4,20,90,470,150,1,"ON!",8,1]
_WB2_BUTTON[4,20,90,470,150,0,"OFF!",6,0]
End If
'
'
If TESTTWO=1 and TEST=10
_WB2_BUTTON[10,520,225,100,20,1,"BYE BYE!",8,0]
Fade 1
Wait 10
Edit
End If
'
'
'
Loop
'
'
'
'
Procedure _WB2_BUTTON[_ZONENUMBER,X,Y,WIDTH,HEIGHT,IN_OUT,TEX$,_FILL,_INK]
'
'
'
LE=Text Length(TEX$)
X_TEXT=X+WIDTH/2
Y_TEXT=Y+HEIGHT/2+3
'
'
If IN_OUT=0
HILIGHT=5
SHADOW=7
End If
'
'
If IN_OUT=1
HILIGHT=7
SHADOW=5
End If
'
'
Ink HILIGHT
Draw X,Y To X+WIDTH,Y
Draw X,Y To X,Y+HEIGHT
'
Ink SHADOW
Draw X+WIDTH,Y To X+WIDTH,Y+HEIGHT
Draw X+WIDTH,Y+HEIGHT To X,Y+HEIGHT
'
Ink _FILL
Bar X+1,Y+1 To X+WIDTH-1,Y+HEIGHT-1
'
Gr Writing 0
Ink _INK
Text X_TEXT-LE/2,Y_TEXT,TEX$
Gr Writing 1
'
Set Zone _ZONENUMBER,X,Y To X+WIDTH,Y+HEIGHT
'
Repeat : Until Mouse Key=0
End Proc
'
'
'
Procedure _WB2_DISPLAY[X,Y,WIDTH,HEIGHT,IN_OUT,_FILL]
'
'
'
If IN_OUT=0
HILIGHT=5
SHADOW=7
End If
'
'
If IN_OUT=1
HILIGHT=7
SHADOW=5
End If
'
'
Ink HILIGHT
Draw X,Y To X+WIDTH,Y
Draw X,Y To X,Y+HEIGHT
'
Ink SHADOW
Draw X+WIDTH,Y To X+WIDTH,Y+HEIGHT
Draw X+WIDTH,Y+HEIGHT To X,Y+HEIGHT
'
Ink _FILL
Bar X+1,Y+1 To X+WIDTH-1,Y+HEIGHT-1
'
'
'
End Proc
'
'
'
Procedure _WB2_MOUSE
'
' * This procedure changes the AMOS Pro Mouse pointer *
' * to that of Workbench 2/3.x *
'
Colour 17,$FFF
Colour 18,$F33
Colour 19,$0
'
End Proc