Скачиваний:
329
Добавлен:
04.03.2014
Размер:
2 Кб
Скачать
  program menu;
  uses  Crt,Dos;
  var
    mes        :Array [1..7]  of string;
    xl,xh,yl,yh:Byte;
    Klav,I,K   :Byte;
    Ch         :Char;
    Pr         :Boolean;
    reg        :registers;

 Procedure WriteXY(x,y:byte;stroka:string);
 begin
  GotoXY(x,y); Write(stroka);
 end;

begin
    mes[1]:='Џг­Єв 1     ';
    mes[2]:='Џг­Єв 2     ';
    mes[3]:='ЏаЁўҐв      ';
    mes[4]:='‚л室       ';

TextBackground(3);
ClrScr;
    reg.ah:=01;
    reg.ch:=$20;
    intr($10,reg);
xl:= 17;   xh:= 32;
yl:= 8;   yh:= 15;
Window(xl,yl, xh,yh);
TextBackground (8);
ClrScr;
xl:= 15;   xh:= 30;
yl:=  7;   yh:= 14;
Window(xl,yl, xh,yh);
TextBackground (5);
TextColor      (15);
ClrScr;

  writeln  (' ЙНН  Њ…Hћ  НН»');
  writeln  (' є            є');
  writeln  (' є            є');
  writeln  (' є            є');
  writeln  (' є            є');
  writeln  (' ЗДДДДДДДДДДДД¶');
  writeln  (' є  ЏаЁўҐв !  є');
  write    (' ИННННННННННННј');

  For i:=1 to 4 do
  begin
   GotoXY(3,1+i);
   write (mes[i]);
  end;
  TextColor(4); TextBackground(7);
  GotoXY(3,2); Write(mes[1]);
  GotoXY(1,1);

  k:=1;
  Repeat
   pr:=False;
   Ch:=ReadKey;
   if Ch = #0 then
    begin
     pr:=True;
     Ch:=ReadKey;
    end
   else
    pr:=false;
    Klav:=Ord(Ch);
	 TextColor(15); TextBackground(5);
   GotoXY(3,1+k);   Write(mes[k]);
   Case Klav of
    72:  If pr then Dec(k);
    80:  If pr then Inc(k);
    13:  halt;
   end; { case }
   if k>4 then k:=1;
   if k<1 then k:=4;
   TextColor(4); TextBackground(7); GotoXY(3,1+k);
   Write(mes[k]);
  Until Klav=27;
end.






Соседние файлы в папке Alex