home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
totallyamos
/
issue1
/
programming
/
alert_box.seq
next >
Wrap
Text File
|
1991-09-02
|
3KB
|
71 lines
68
eca00007cf00fe008033300f70f
^3ALERT!*ALERT!*ALERT!*ALERT!*ALERT!*ALERT!*ALERT!*ALERT!*ALERT!*ALERT!
^2@3ALERT BOX ROUTINE.@
^4[4Original Routine by Aaron Fothergill.[0
^6[4Additional coding and graphics by SPARX.[0
^3ALERT!*ALERT!*ALERT!*ALERT!*ALERT!*ALERT!*ALERT!*ALERT!*ALERT!*ALERT!
^7 This Alert box routine is one that we use very often and which you
^7might have seen in some of our programs.
^6 If you are not familiar with the term 'alert box' it is another term
^6for the annoying little box that pops up in programs asking if you're
^6sure that you want to do what you've just decided to do! On the
^6positive side, they do stop you from making silly mistakes! Our pet
^6name for them is "Idiot detectors!'
^4 This is another routine that will help to make your programs look
^4more professional. The box that is displayed looks good and gives
^4the user the opportunity to check what he has done, it is very useful
^4in programs which are aimed at beginners and especially children, who
^4can easily select the wrong function.
^1 The main routine was written by Aaron Fothergill, we spotted it in
^1[2Sprite-X, [0 liked it, and decided to make it prettier. It now looks
^1indented, and has indented buttons for the responses.
^7 The procedure can be merged into your own program and called when
^7you need it.
^6 There are limits to the length of the text line, but as there is
^6room for 22-25 characters per line, and 10 lines in total, there
^6should not be any problems. It has been set up for two buttons, but
^6that shouldn't stop you fiddling with the coding to set it up for
^6more or fewer buttons.
^4 You can further customise the panel, by changing the colours to
^4coordinate with your program. You can alter this by changing the
^4line under the ** starred ** REM line.
^2 "Q" is the variable that tells you which button has been pressed.
^2If q=1, then button 1 has been pressed, if q=2, then button 2 has
^2been pressed.
^7 The routine has been written in a way that the least amount of
^7memory will be used. The screen is 4 colour, low res, and the
^7routine only opens a screen large enough to display the box.
^3 To save more memory, take out all the REM lines!!
^6 The whole thing only eats up 4000 bytes, so it is worth including in
^6any program that needs it.
^4 The routine has been used in the new PRINT facility in this issue of
^4[2TOTALLY AMOS. [0If you want to print out an article, then press 'P'
^4while viewing an article, NOT an index page. The alert box will
^4appear asking if the printer is ready. Press button 1 to continue, 2
^4to cancel.
^2 If you modify the routine, or better it, then let us (and Aaron) see
^2it, and it might be included on the disk as an upgrade.
^1 If you use this routine, pleases remember to credit the authors!
^3ALERT!*ALERT!*ALERT!*ALERT!*ALERT!*ALERT!*ALERT!*ALERT!*ALERT!*ALERT!
\