' *** FILE_SEL.LST *** 2nd GFA-Manual, page 11-22 > PROCEDURE fileselect(text$,path$,default$,VAR file$) ' ' *** Universal Fileselector with comment-line (title) for all TOS-versions ' *** If TOS-version from 1.4, command FILESELECT shows comment-line ' *** For earlier TOS-versions the comment-line is shown by this Procedure ' *** The comment-line must not exceed 30 characters ' ' *** Standard: high.res! med.res! low.res! col.max& char.width& char.height& ' LOCAL box$ IF LEN(txt$)>30 OUT 2,7 ! bell txt$=LEFT$(txt$,30) ENDIF IF DPEEK(ADD(LPEEK(&H4F2),2))>=&H104 ! examine TOS-version FILESELECT #text$,path$,default$,file$ ELSE IF high.res! DEFTEXT ,0,0,13 ELSE DEFTEXT ,0,0,6 ENDIF GET 0,0,x.max,4*char.height,box$ ! save background GRAPHMODE 1 DEFFILL 1,0 BOUNDARY 1 IF high.res! PBOX 157,20,482,54 ! outer box DEFFILL 1,1 BOUNDARY 0 PBOX 159,22,480,52 ! black inner box ELSE IF med.res! PBOX 157,6,482,27 DEFFILL 1,1 BOUNDARY 0 PBOX 160,8,479,24 ELSE IF low.res! PBOX 0,12,319,27 DEFFILL 1,1 BOUNDARY 0 PBOX 2,14,317,24 ENDIF GRAPHMODE 3 ! white letters on black box IF low.res! TEXT MUL(DIV(SUB(col.max,LEN(text$)),2),char.width),SUB(MUL(3,char.height),2),text$ ELSE IF med.res! TEXT MUL(DIV(SUB(col.max,LEN(text$)),2),char.width),SUB(MUL(3,char.height),5),text$ ELSE IF high.res! TEXT MUL(DIV(SUB(col.max,LEN(text$)),2),char.width),SUB(MUL(3,char.height),8),text$ ENDIF BOUNDARY 1 GRAPHMODE 1 FILESELECT path$,default$,file$ PUT 0,0,box$ ! restore background ENDIF RETURN ' ********* '