home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
601-625
/
apd616
/
dialog_procs.doc
< prev
next >
Wrap
Text File
|
1991-06-22
|
35KB
|
1,031 lines
==================================
AMOS Dialog Procedures Version 2.1
==================================
Written By John.A.Kinsella
==========================
(User Manual)
Introduction
------------
These procedures were written to add a Workbench 2 environment to your AMOS
creations, also, to make programming easier for the user. The procedures
themselves, are like adding new commands onto AMOS.
Variables & Strings
-------------------
The following is a list of some of the variables and strings used by the
dialog procedures.
_DialogButton$ ________________ This is used to store all of the
zones created for the buttons.
_RadioButton$ _________________ This is used to store all of the
zones created for the radio buttons.
_Light ________________________ This contains the colour for the
light part of a button.
_Shadow _______________________ This contains the colour for the
Shaded part of a button.
_Back _________________________ This contains the colour for the
Background of a button, and also for
the background of the screen.
_Colour _______________________ This contains the colour for any
buttons or objects that have to be
highlighted or coloured.
_Text _________________________ This contains the colour for the
text on screen.
_FontName$ ____________________ This contains the name of the
current font being used.
_FontSize _____________________ This contains the point size of the
current font being used.
Brief Rundown On The Procedures
-------------------------------
All of the procedures that are used in the program listing, are explained
below, plus, working examples are also given. Run the examples by typing
them into the main program.
Add-On procedures are also included in the manual, these are separate
procedures that you merge onto the end of the main listing if you wish to
use them.
Open Dialog Screen Procedure
----------------------------
Description: This procedure is used to open a screen for use with the
dialog procedures, it automatically sets the colours,
resolution, height and position of the screen.
Syntax: _OpenDialogScreen[N,H,Y]
Variables: N _____________________ This contains the number of the
screen to open.
H _____________________ This contains the height of the
screen to open.
Y _____________________ This contains the Y position of the
screen from the top (50 is the
default value).
Example
-------
_OpenDialogScreen[0,100,50]
'
_Draw3DBox[10,5,634,94,"SMALL SCREEN!",0,2,3]
3D Box Procedure
----------------
Description: This procedure draws a 3D box on the screen.
Syntax: _Draw3DBox[X1,Y1,X2,Y2,T$,IN,FC,BC]
Variables: X1,Y1 To X2,Y2 ________ These are the co-ordinate's of the
box.
T$ ____________________ This is the text displayed inside
the box (See Appendix 1 for more
information).
IN ____________________ This defines the look of the 3D box,
0 is an inward facing box, 1 is an
outward facing box, and 2 displays
the text only.
FC ____________________ This is the colour of the text.
BC ____________________ This is the colour of the 3D box.
Examples
--------
_Draw3DBox[50,50,100,100,"HI!",1,1,0]
'
X1=100: Y1=150: X2=200: Y2=80: _Draw3DBox[X1,Y1,X2,Y2,"Hi Folks",0,2,3]
'
_Draw3DBox[500,10,620,100,"This|'Is|^An|Example",2,3,0]
Check Zone Procedure
--------------------
Description: This procedure checks a part of the screen for a mouse press.
Syntax: _CheckZone[X1,Y1,X2,Y2,WT]
Variables: X1,Y1 To X2,Y2 ________ These are the co-ordinate's to check
for a mouse press.
WT ____________________ This is the wait value, set to 0 for
a quick return, or set to 1 to wait
until the mouse key has been
released.
PARAM _________________ This is the global variable which
contains the mouse button pressed
inside of a zone, 0 will be returned
if there has been no mouse button
pressed.
Example
-------
_Draw3DBox[50,50,100,100,"No.|One",1,1,0]
_Draw3DBox[150,50,200,100,"No.|Two",1,1,0]
'
DO
'
_CheckZone[50,50,100,100,1]
IF PARAM>0
BELL 96
_Draw3DBox[100,100,539,150,"Button 1 Pressed Using Key"+STR$(AN),0,1,3]
END IF
'
_CheckZone[150,50,200,100,0]
IF PARAM>0
BELL 80
_Draw3DBox[100,100,539,150,"Button 2 Pressed Using Key"+STR$(AN),0,1,3]
END IF
'
LOOP
Add Button Procedure
--------------------
Description: This procedure draws a button on screen which looks like a
3D box, but does not have to be checked with the _CheckZone
procedure, instead, the _CheckButtons procedure is used to
determine whether this button and every other button created
has been pressed or not.
Syntax: _AddButton[X1,Y1,X2,Y2,T$,BZ]
Variables: X1,Y1 To X2,Y2 ________ These are the co-ordinate's of the
button.
T$ ____________________ This string contains the text to be
placed inside the button. (See
Appendix 1 for more information).
BZ ____________________ This is the zone number of the
button. Put 0 to simply draw the
button.
Example
-------
_AddButton[50,50,100,100,"No.|1",1]
_AddButton[150,50,200,100,"No.|2",-2]
'
DO
'
_CheckButtons : Rem Place this at the start of loop to check buttons.
_ButtonZone=Param
'
IF _ButtonZone=1
BELL 96
_Draw3DBox[400,100,600,150,"Button #1|Was Pressed",0,1,3]
END IF
'
IF _ButtonZone=2
BELL 80
_Draw3DBox[400,100,600,150,"Button #2|Was Pressed",0,1,3]
END IF
'
LOOP
Add Tick-Box Procedure
----------------------
Description: This procedure draws a tick box, which can either be on or
off, if it is on then a tick will appear inside the box.
Syntax: _AddTickBox[X,Y,PO,BZ]
Variables: X,Y ___________________ These are the co-ordinate's of the
tick box.
PO ____________________ This is the position of the tick
box, 0 is off and 1 is on.
BZ ____________________ This is the zone number of the tick
box. Put 0 to simply draw the tick
box.
PARAM _________________ This variable contains the new
position of the tick box after it
has been clicked.
Example
-------
CHK1=0 : Rem Set check box to off.
_AddTickBox[50,50,CHK1,1]
'
DO
'
_CheckButtons
_ButtonZone=Param
'
IF _ButtonZone=1
_AddTickBox[50,50,CHK1,0] : Rem Redraw check box.
CHK1=Param
END IF
'
IF CHK1=1
BELL 92
END IF
'
LOOP
Add Cycle Button Procedure
--------------------------
Description: This procedure draws a button with a cycle gadget which can
cycle between different pieces of text placed inside the
button.
Syntax: _AddCycleButton[X1,Y1,X2,Y2,T$,PO,BZ]
Variables: X1,Y1 To X2,Y2 ________ These are the co-ordinate's of the
button.
T$ ____________________ This is the text inside the button,
use the "|" character to separate
the different pieces of text you
wish to scroll through e.g.
"Text1|Text2|Text3|Text4".
PO ____________________ This is the text position, this
tells the procedure which piece of
text to display inside the button
e.g. set to 3 for "Text3".
BZ ____________________ This is the zone number of the
button. Put 0 to simply draw the
cycle button.
PARAM _________________ This contains the new text position
of the button.
Example
-------
CYC1=1 : Rem Set the cycle text to 1, which is "THIS".
_AddCycleButton[50,50,200,65,"THIS|IS|AN|EXAMPLE",CYC1,1]
'
CYC2=3 : Rem Set the cycle text to 3 which is "ANOTHER".
TXT$="THIS|IS|ANOTHER|EXAMPLE|OF|CYCLE|BUTTONS"
_AddCycleButton[50,100,200,70,TXT$,CYC2,2]
'
DO
'
_CheckButtons
_ButtonZone=Param
'
IF _ButtonZone=1
_AddCycleButton[50,50,200,65,"THIS|IS|AN|EXAMPLE",CYC1,0]
CYC1=Param
END IF
'
IF _ButtonZone=2
_AddCycleButton[50,100,200,70,TXT$,CYC2,0]
CYC2=Param
END IF
'
LOOP
Horizontal Slider Procedure
---------------------------
Description: This procedure draws a horizontal slider.
Syntax: _HorizontalSlider[X1,Y1,X2,Y2,NO,PO,T$]
Variables: X1,Y1 To X2,Y2 ________ These are the co-ordinate's to draw
the slider.
NO ____________________ This is the number of items to
scroll through.
PO ____________________ This is the position of the slider.
T$ ____________________ This contains the slider routine
label to call when inside the
_SliderRoutine procedure, leave
blank for no routine.
NOTE: When creating slider routines, place them inside the
_SliderRoutine procedure, remember and make the last
line of your routine GOTO FIN. Use the P variable
inside the slider routine, as it contains the
position of the slider bar.
Example
-------
SL1=50 : Rem Set number of items.
SP1=1 : Rem Set position of scroll bar.
_HorizontalSlider[50,50,400,70,SL1,SP1,"HSLIDE"]
'
_AddButton[410,40,430,60,"<",-1] : Rem These are scroll buttons.
_AddButton[440,40,460,60,">",-2]
'
DO
'
_CheckButtons
_ButtonZone=Param
'
IF _ButtonZone=1 AND SP1>1 : Rem Make sure position is above 1.
DEC SP1
_HorizontalSlider[50,50,400,70,SL1,SP1,"HSLIDE"]
END IF
'
IF _ButtonZone=2 AND SP1<SL1 : Rem Make sure position is below items.
INC SP1
_HorizontalSlider[50,50,400,70,SL1,SP1,"HSLIDE"]
END IF
'
LOOP
'
PROCEDURE _SliderRoutine[T$,P]
'
GOTO T$
'
HSLIDE:
_Draw3DBox[50,80,100,95,"POS:"+STR$(P),0,2,3]
GOTO FIN
'
FIN:
'
END PROC
Vertical Slider Procedure
-------------------------
Description: This procedure draws a vertical slider.
Syntax: _VerticalSlider[X1,Y1,X2,Y2,NO,PO,T$]
Variables: X1,Y1 To X2,Y2 ________ These are the co-ordinate's to draw
the slider.
NO ____________________ This is the number of items to
scroll through.
PO ____________________ This is the position of the slider.
T$ ____________________ This contains the slider routine
label to call when inside the
_SliderRoutine procedure, leave
blank for no routine.
NOTE: When creating slider routines, place them inside the
_SliderRoutine procedure, remember and make the last
line of your routine GOTO FIN. Use the P variable
inside the slider routine, as it contains the
position of the slider bar.
Example
-------
SL1=200 : Rem Set number of items.
SP1=50 : Rem Set position of scroll bar.
_VerticalSlider[100,10,130,190,SL1,SP1,"VSLIDE"]
'
_AddButton[140,40,160,60,"<",-1] : Rem These are scroll buttons.
_AddButton[170,40,190,60,">",-2]
'
DO
'
_CheckButtons
_ButtonZone=Param
'
IF _ButtonZone=1 AND SP1>1 : Rem Make sure position is above 1.
DEC SP1
_VerticalSlider[100,10,130,190,SL1,SP1,"VSLIDE"]
END IF
'
IF _ButtonZone=2 AND SP1<SL1 : Rem Make sure position is below items.
INC SP1
_VerticalSlider[100,10,130,190,SL1,SP1,"VSLIDE"]
END IF
'
LOOP
'
PROCEDURE _SliderRoutine[T$,P]
'
GOTO T$
'
VSLIDE:
_Draw3DBox[110,175,170,190,"POS:"+STR$(P),0,2,3]
GOTO FIN
'
FIN:
'
END PROC
Grab Horizontal Slider Procedure
--------------------------------
Description: This procedure lets the user grab a horizontal slider on
screen.
Syntax: _GrabHorizontalSlider[X1,Y1,X2,Y2,NO,PO,T$]
Variables: X1,Y1 To X2,Y2 ________ These are the co-ordinate's to draw
the slider.
NO ____________________ This is the number of items to
scroll through.
PO ____________________ This is the position of the slider.
T$ ____________________ This contains the slider routine
label to call when inside the
_SliderRoutine procedure, leave
blank for no routine.
PARAM _________________ This variable will be set to 0 if
the slider has not been moved,
otherwise it will return the new
slider position.
NOTE: When creating slider routines, place them inside the
_SliderRoutine procedure, remember and make the last
line of your routine GOTO FIN. Use the P variable
inside the slider routine, as it contains the
position of the slider bar.
Example
-------
SL1=200 : Rem Set number of items.
SP1=1 : Rem Set position of scroll bar.
_HorizontalSlider[100,10,130,190,SL1,SP1,"HSLIDE"]
'
_Draw3DBox[10,5,629,20,"GRAB THE SLIDER...!",0,2,3]
'
DO
'
_GrabHorizontalSlider[50,50,400,70,SL1,SP1,"HSLIDE"]
IF PARAM>0 : Rem Check if slider has been grabbed.
SP1=PARAM : Change variable to new slider position.
END IF
'
LOOP
'
PROCEDURE _SliderRoutine[T$,P]
'
GOTO T$
'
HSLIDE:
_Draw3DBox[50,80,100,95,"POS:"+STR$(P),1,2,3]
GOTO FIN
'
FIN:
'
END PROC
Grab Vertical Slider Procedure
------------------------------
Description: This procedure lets the user grab a vertical scroll bar on
screen.
Syntax: _GrabVerticalSlider[X1,Y1,X2,Y2,NO,PO,T$]
Variables: X1,Y1 To X2,Y2 ________ These are the co-ordinate's to draw
the slider.
NO ____________________ This is the number of items to
scroll through.
PO ____________________ This is the position of the slider.
T$ ____________________ This contains the slider routine
label to call when inside the
_SliderRoutine procedure, leave
blank for no routine.
PARAM _________________ This variable will be set to 0 if
the slider has not been moved,
otherwise it will return the new
slider position.
NOTE: When creating slider routines, place them inside the
_SliderRoutine procedure, remember and make the last
line of your routine GOTO FIN. Use the P variable
inside the slider routine, as it contains the
position of the slider bar.
Example
-------
SL1=100 : Rem Set number of items.
SP1=20 : Rem Set position of scroll bar.
_VerticalSlider[100,10,130,190,SL1,SP1,"VSLIDE"]
'
_Draw3DBox[10,5,629,20,"GRAB THE SLIDER...!",0,2,3]
'
DO
'
_GrabVerticalSlider[100,10,130,190,SL1,SP1,"VSLIDE"]
IF PARAM>0 : Rem Check if slider has been grabbed.
SP1=PARAM : Rem Change variable to new slider position.
END IF
'
LOOP
'
PROCEDURE _SliderRoutine[T$,P]
'
GOTO T$
'
VSLIDE:
_Draw3DBox[110,175,170,190,"POS:"+STR$(P),1,2,3]
GOTO FIN
'
FIN:
'
END PROC
Slider Routine Procedure
------------------------
Description: This procedure contains all of the slider routines for use
with the slider procedures. The procedure itself is not
meant to be used on it's own, but you can do so if you wish.
Syntax: _SliderRoutine[T$,P]
Variables: T$ ____________________ This contains the slider routine
label to goto when the procedure is
called.
P _____________________ This contains the position of the
slider for use with the routines.
Check Buttons Procedure
-----------------------
Description: This procedure checks the status of every button zone
created with the _AddButton, _AddTickBox, _AddCycleButton and
_AddInputButton procedures.
Syntax: _CheckButtons
Variables: PARAM _________________ This is a global variable which
returns the zone number of the
button that has been clicked.
Store this variable under a
different name after the procedure
has been called, otherwise the
number might be overwritten by other
procedures e.g. _ButtonZone=Param.
Example
-------
_AddButton[20,20,40,40,"A",1]
_AddButton[50,50,70,70,"B",2]
_AddButton[80,80,100,100,"C",3]
'
DO
'
_CheckButtons
_ButtonZone=Param
'
IF _ButtonZone=1
BELL 70
END IF
'
IF _ButtonZone=2
BELL 80
END IF
'
IF _ButtonZone=3
BELL 90
END IF
'
LOOP
Delete Button Procedure
-----------------------
Description: This procedure deletes a button from the _DialogButton$ and
also from the screen.
Syntax: _DeleteButton[NO,BC]
Variables: NO ____________________ This is the zone number of the
button to be deleted.
BC ____________________ This is the colour to erase the
screen button with, put -1 to leave
the button on screen.
Example
-------
_AddButton[50,50,150,100,"KILL|ME",1]
_AddButton[200,50,300,100,"TRY AND|KILL ME",2]
'
DO
'
_CheckButtons
_ButtonZone=Param
'
IF _ButtonZone=1
SHOOT
_DeleteButton[1,0]
END IF
'
IF _ButtonZone=2
BOOM
_DeleteButton[2,-1]
END IF
'
LOOP
Add Input Button Procedure
--------------------------
Description: This procedure places a text input button on screen, and
when clicked on, you can enter text inside of it.
Syntax: _AddInputButton[X,Y,TXT$,L,ML,BZ]
Variables: X,Y ___________________ These are the text co-ordinate's to
place the text input button.
TXT$ __________________ This is the text to place inside the
text input button.
L _____________________ This is the length in characters of
the input button.
ML ____________________ This is the maximum length in
characters of the input string.
BZ ____________________ This is the zone number of input
button. Put 0 to simply enter text
inside the button.
PARAM$ ________________ This returns the text that has been
entered inside the input button.
Example
-------
TXT$="This is a"
_AddInputButton[5,5,TXT$,10,20,1]
'
_Draw3DBox[10,100,629,199,TXT$,0,1,0]
'
DO
'
_CheckButtons
_ButtonZone=Param
'
IF _ButtonZone=1
_AddInputButton[5,5,TXT1$,10,20,0]
TXT$=PARAM$
_Draw3DBox[10,100,629,199,TXT$,0,1,0]
END IF
'
LOOP
Set Font Procedure
------------------
Description: This procedure looks through the fonts list until it has
found the font name and size you have stated, then changes
the font.
Syntax: _SetFont[FT$,FS]
Variables: FT$ ___________________ This is the name of the font to look
for e.g. "Diamond".
FS ____________________ This is the size of the font in
pixels.
PARAM _________________ If the font was successfully found,
then this variable will contain a 1,
otherwise 0 will be returned.
Example
-------
_SetFont["Diamond",20]
IF PARAM=1
TEXT 50,50,"Font Found!!!"
ELSE
PRINT "Font Has Not been Found!"
END IF
Add Radio Button Procedure
--------------------------
Description: This procedure can place groups of radio buttons on screen.
Syntax: _AddRadioButton[X,Y,GP,BN,PO,BZ]
Variables: X,Y ___________________ These are the co-ordinate's to place
the radio button.
GP ____________________ This is the group number the button
belongs to.
BN ____________________ This is the number of the radio
button in a specific group.
PO ____________________ This is the setting of the radio
button, 0 for in-active and 1 for
active.
BZ ____________________ This is the zone number of the radio
button, put 0 to simply draw the button.
NOTE: The zone number for the radio buttons are different
from the zone numbers used to draw the other buttons,
so you can use the same numbers e.g. you can create a
tick box with zone number 1, and also a radio button
with zone number 1.
Check Radio Buttons Procedure
-----------------------------
Description: This procedure will check if any of the radio buttons have
been selected.
Syntax: _CheckRadioButtons
Variables: PARAM _________________ This is a global variable which
returns the number of the radio
button pressed. Store this variable
under a different name after the
procedure has been called, otherwise
the number might be overwritten by
other procedures e.g. _RadioZone=Param.
Set Radio Procedure
-------------------
Description: This procedure resets the radio buttons in a specific group and activates the selected button.
Syntax: _SetRadio[GN,BA]
Variables: GN ____________________ This is the group number the button
belongs to.
BA ____________________ This is the number of the button to
activate.
Example
-------
GRP1=2 : Rem Make button 2 in group 1 active.
_AddRadioButton[50,50,1,1,1,1]
_AddRadioButton[50,60,1,2,1,2]
_AddRadioButton[50,70,1,3,1,3]
_SetRadio[1,GRP1] : Rem Redraw group & show active button.
'
GRP2=1 : Rem Make button 1 in group 2 active.
_AddRadioButton[70,50,2,1,1,4]
_AddRadioButton[70,60,2,2,1,5]
_SetRadio[2,GRP2] : Rem Redraw group and show active button.
'
DO
'
_CheckRadioButtons : Rem This checks if a radio button has been clicked.
_RadioZone=Param
'
IF _RadioZone>=1 And _RadioZone<=3
GRP1=_RadioZone : Rem Set to new active radio button in group 1.
_SetRadio[1,GRP1]
END IF
'
IF _RadioZone=4 Or _RadioZone=5
GRP2=_RadioZone-3 : Rem Set to new active radio button in group 2.
_SetRadio[2,GRP2]
END IF
'
LOOP
Draw User Object Procedure
--------------------------
Description: This procedure is used to paste icons, bobs or draw user
objects either on screen, or inside a button.
Syntax: _DrawUserObject[X1,Y1,X2,Y2,T$]
Variables: X1,Y1 _________________ These can be the co-ordinate's for a
bob or icon, or the top left-hand
corner for a user object.
X2,Y2 _________________ These are used for the bottom
right-hand corner for a user object,
or the number of pixels to offset a
bob or icon from the top left hand
corner of the 3D box.
T$ ____________________ This holds a 3 letter object code
for the object e.g. "BOB001" places
bob 1 on screen, "ICO100" places
icon 100 on screen or you can create
your own object codes by placing
them inside the procedure, like
"UAR", "DAR", "LAR" and "RAR" which
are used for drawing direction
arrows.
Example
-------
_AddButton[50,50,100,100,"(S)UAR",1]
_AddButton[50,150,100,200,"(S)DAR",2]
'
_Draw3DBox[200,10,300,100,"",0,0,_Back]
_DrawUserObject[200,10,20,5,"BOB001"]
'
DO
'
_CheckButtons
_ButtonZone=Param
'
IF _ButtonZone=1 Or _ButtonZone=2
FADE 3
WAIT 45
END
END IF
'
LOOP
Additional Notes
----------------
Any time a new button or radio zone is created, it is stored inside of
_DialogButton$ or _RadioButton$, so this means that the dialog procedures
use little memory. If you wish to clear the dialog zones, simply put
_DialogButton$="" in your listing to clear the normal dialog buttons, or put
_RadioButton$="" to clear the radio buttons.
The text input buttons are used like normal Workbench 2 input lines, they
use the same keys, including SHIFT+LEFT to move the cursor to the start of
the input line, SHIFT+RIGHT to move the cursor to the end of the input line,
SHIFT+BACKSPACE to delete all the text before the cursor and SHIFT+DELETE to
delete all of the text after the cursor.
When you have finished typing or inserting your program into the procedures
listing, you can free some memory and disk space by deleting the unused
procedures and also by removing the REM statements.
Appendix 1
----------
When placing text inside this string, you can use the "|" character to
separate the text onto different lines, you can also set the text
justification by placing the "^" character at the start of your text for
right justified text, or place the "'" character at the start of your text
for left justified text, or if none of these characters are used, then the
text will simply be centred e.g. "'This|Is An|^Example".
You can also use special codes to incorporate user objects, bobs and icons
inside a button or box, to do this place "(S)" at the start of the string
followed by the code e.g. "(S)BOB001" placed bob 1 inside a button or box,
"(S)ICO100" places icon 100 inside a button or box, or you can use the user
objects "(S)UAR", "(S)DAR", "(S)LAR" and "(S)RAR" to draw direction arrows.
NOTE: You do not need "(S)" at the start of a string if you are using the
_DrawUserObject procedure, only when you are drawing a 3D box or
button.
Alert Requester Procedure (Add-On)
----------------------------------
Description: This procedure displays an alert requester, prompting you to
press a button, or it can be used to simply display messages
(Screen 7 is used for the requester).
NOTE: This is an add-on procedure, it has to be merged into
the main program before it can be used.
Syntax: _AlertRequester[M$,B$]
Variables: M$ ____________________ This contains the text to be
displayed inside the requester, use
the "|" character to split the text
onto separate lines. Put "_Cc_"
inside of the string to close a
previously opened text requester.
B$ ____________________ This contains the button text to be
used by the requester, use the "|"
character to separate the buttons
e.g. "Button 1|Button 2". If you
leave this string blank, then a text
requester will be displayed without
any buttons.
PARAM _________________ This variable contains the button
number pressed from the alert
requester.
Example
-------
_AlertRequester["This Requester Is Great!||>>> Press A Mouse Key <<<",""]
Repeat
Until Mouse Key
_AlertRequester["_Cc_",""]
'
_AddButton[50,50,200,100,"QUIT!",1]
'
Do
'
_CheckButtons
_ButtonZone=Param
'
IF _ButtonZone=1
_AlertRequester["Do You Really Wan't To Quit?","YES|NO"]
IF PARAM=1
END
END IF
END IF
'
LOOP
Palette Requester Procedure (Add-On)
------------------------------------
Description: This procedure displays a palette requester, so the user can
change the colours of the screen stated (Screens 6 & 7 are
used for the requester).
NOTE: This is an add-on procedure, it has to be merged into
the main program before it can be used.
Syntax: _PaletteRequester[S]
Variables: S _____________________ This contains the screen number to
change the palette on.
Example
-------
FOR L=0 To 15
Cls L,L*10,0 TO L*10+20,20
NEXT L
'
_Draw3DBox[50,50,589,149,"WOW!|LIKE THE NEW COLOURS",0,2,3]
'
_PaletteRequester[0]
'
END
File Requester Procedure (Add-On)
---------------------------------
Description: This procedure displays a file requester, so the user can
select a file for use inside their program (Screen 7 is used
for the requester).
NOTE: This is an add-on procedure, it has to be merged into
the main program before it can be used. Certain
lines have to be cut and pasted, beside the global
variables and also beside the set variables lines for
this procedure to work.
Syntax: _FileRequester[T$]
Variables: T$ ____________________ This contains the title to display
at the top of the file requester.
PARAM$ ________________ This contains the file selected from
the file requester.
Example
-------
_FileRequester["Please Select A File"]
_File$=Param$
'
Print "You Selected :-"
print _File$
'
End
Get WB Palette Procedure (Add-On)
---------------------------------
Description: This procedure will search for either the workbench
Palette.prefs or System-Configuration files, and then load
the colour palette from whatever one is found.
NOTE: This is an add-on procedure, it has to be merged into
the main program before it can be used.
Syntax: _GetWbPalette
Example
-------
For C=0 To 7
Cls C,C*10,0 To X*10+8,8
Next C
'
Print At(0,5)+"Normal Palette. >>> Press Key To Continue <<<"
'
Wait Key
'
_GetWbPalette
'
Locate 0,5
Cline
Print At(0,5)+"Workbench Palette."
'
End