home *** CD-ROM | disk | FTP | other *** search
-
- procedure screen;
- begin
- title(' SCREEN WRITER CONFIGURATION ');
- textcolor(white);
- gotoxy(1,6);
- center('Written by Martine B. Wedlake');
- textcolor(lightblue);
- gotoxy(5,8);
- write('Insert Mode At Start :');
- gotoxy(5,10);
- write('Look To Disk For Help :');
- gotoxy(5,12);
- write('Path For Help :');
- gotoxy(5,14);
- write('Forground At Start :');
- gotoxy(5,16);
- write('Background At Start :');
- gotoxy(5,18);
- write('The Graphic Letter Set:');
- gotoxy(5,20);
- write('Exit The Programme :');
- gotoxy(9,22);
- textcolor(white);
- write('Press [');
- textcolor(white+blink);
- write('+');
- textcolor(white);
- write('] to increase Graph Level, [');
- textcolor(white+blink);
- write('-');
- textcolor(white);
- write('] to decrease Graph Level.');
- gotoxy(12,24);
- center('Press <SPACE BAR> to reset.');
- gotoxy(1,25);
- center('Use arrow keys to position cursor. Press RETURN to Activate');
- end;
-
- procedure display_info(y,level,letter:integer);
- var
- counter:integer;
- begin
- textcolor(red);
- gotoxy(30,8);
- if configure.insert_mode then write('ON ') else write('OFF');
- gotoxy(30,10);
- if configure.help then write('YES') else write('NO ');
- gotoxy(30,12);
- clreol;
- write(configure.Help_path);
- gotoxy(30,14);
- write(configure.forg:2);
- gotoxy(30,16);
- write(configure.back:2);
- gotoxy(45,14);
- textcolor(configure.forg);
- textbackground(configure.back);
- write('Colour');
- textcolor(white);
- textbackground(black);
- gotoxy(45,16);
- write('Graph Level: ',level:2);
- gotoxy(30,18);
- for counter:=1 to 8 do
- begin
- textcolor(white);
- write(counter);
- textcolor(red);
- write(' ',configure.graphic_letters[level,counter],' ');
- end;
- gotoxy(30,20);
- write('':10);
- if y<>18 then gotoxy(70,16);
- clreol;
- case y of
- 08:begin
- gotoxy(30,8);
- textcolor(black);
- textbackground(white);
- if configure.insert_mode then write('ON ') else write('OFF');
- textcolor(white);
- textbackground(black);
- end;
- 10:begin
- gotoxy(30,10);
- textcolor(black);
- textbackground(white);
- if configure.help then write('YES') else write('NO');
- textcolor(white);
- textbackground(black);
- end;
- 12:begin
- gotoxy(30,12);
- textcolor(black);
- textbackground(white);
- write(configure.Help_path);
- textcolor(white);
- textbackground(black);
- end;
- 14:begin
- gotoxy(30,14);
- textcolor(black);
- textbackground(white);
- write(configure.forg:2);
- textcolor(white);
- textbackground(black);
- end;
- 16:begin
- gotoxy(30,16);
- textcolor(black);
- textbackground(white);
- write(configure.back:2);
- textcolor(white);
- textbackground(black);
- end;
- 18:begin
- gotoxy(70,16);
- textcolor(white);
- write('ASCII = ');
- clreol;
- write(ord(configure.graphic_letters[level,letter]):3);
- gotoxy(letter*6+26,18);
- textbackground(white);
- textcolor(blue);
- write(configure.graphic_letters[level,letter]);
- textcolor(white);
- textbackground(black);
- end;
- 20:begin
- gotoxy(30,20);
- textcolor(black);
- textbackground(white);
- write('':10);
- textcolor(white);
- textbackground(black);
- end;
- end;
- end;
-
- procedure do_input;
- var
- numstr:string[3];
- letter,
- level,
- num,
- y,
- code:integer;
- saved,
- leave:boolean;
- key,
- key1:char;
- begin
- leave:=false;
- level:=1;
- letter:=1;
- y:=8;
- repeat
- repeat
- key:=#0;
- key1:=#0;
- display_info(y,level,letter);
- read(kbd,key);
- if keypressed then read(kbd,key1);
- case ord(key1) of
- 72:if y>8 then y:=y-2 else y:=20;
- 80:if y<20 then y:=y+2 else y:=8;
- 77:if (y=18) then
- if letter<8 then letter:=letter+1 else letter:=1;
- 75:if (y=18) then
- if letter>1 then letter:=letter-1 else letter:=8;
- end;
- if key='-' then if level>1 then level:=level-1 else level:=19;
- if key in['=','+'] then if level<19 then level:=level+1 else level:=1;
- if key=' ' then load_config;
- until key=#13;
- case y of
- 8:configure.insert_mode:=not configure.insert_mode;
- 10:configure.Help:=not configure.help;
- 12:begin
- gotoxy(40,10);
- write('Enter NEW Path for EdScreen.HLP');
- gotoxy(30,12);
- cursor(true);
- repeat until keypressed;
- clreol;
- read(configure.help_path);
- cursor(false);
- gotoxy(40,10);
- clreol;
- end;
- 14:if configure.forg<15 then configure.forg:=configure.forg+1 else configure.forg:=0;
- 16:if configure.back<7 then configure.back:=configure.back+1 else configure.back:=0;
- 18:begin
- gotoxy(20,17);
- write('Enter ASCII for character to replace:');
- repeat
- cursor(true);
- gotoxy(59,17);
- clreol;
- buflen:=3;
- read(numstr);
- cursor(false);
- val(numstr,num,code);
- if code<>0 then write(^g);
- until code=0;
- configure.graphic_letters[level,letter]:=chr(num);
- gotoxy(20,17);
- clreol;
- end;
- 20:begin
- gotoxy(30,20);
- write('Do you want the Configuration saved [Y/N] ? ');
- repeat
- read(kbd,key);
- key:=upcase(key);
- until key in ['Y','N'];
- leave:=true;
- saved:=key = 'Y';
- end;
- end;
- until leave;
- if saved then
- begin
- assign(f_configure,'EDSCREEN.CNF');
- rewrite(f_configure);
- write(f_configure,configure);
- close(f_configure);
- end;
- end;