Program Kyrs_proba; uses crt,graph; {,bmp;} const LEFT=#075; RIGHT=#077; var f:text; flag:boolean; st,l:string; k:char; i:byte; x,y:integer; grMode, grDriver: integer; fl:boolean; var j, menu: integer; Procedure Face;{********? ? ®?- ? ? ???-? *Bar3d(115,15,480,80,10,true);********} Begin SetBkColor(11); SetFillStyle(1,1); Bar(115,15,480,80); { ---? ª? ®? "???? ?? ? ??r?? ªª "---} SetColor(1); Line(115,15,480,15); Line(480,15,480,80); Line(480,80,115,80); Line(115,80,115,15); Line(115,15,120,10); Line(120,10,485,10); Line(485,10,480,15); Line(485,10,485,75); Line(485,75,480,80); SetColor(15); SetTextStyle(7,0,5); OutTextXY(120,20,'Training course'); { ---,??r Theoretical principles of ORGANIC CHEMISTRY---} SetColor(4); settextstyle(1,0,6); OutTextXY(50,125,'Theoretical principles'); OutTextXY(280,180,'of'); OutTextXY(60,235,'ORGANIC CHEMISTRY'); { ---???r? -?? 3-? ?-r?r? ?-??---} SetColor(8); SetTextStyle(4,0,5); SetFillStyle(1,12); {1} Bar(25,340,180,385); Line(25,340,180,340); Line(180,340,180,385); Line(180,385,25,385); Line(25,385,25,340); OutTextXY(30,330,'Continue'); {2} SetFillStyle(1,13); Bar3d(242,340,396,385,5,true); OutTextXY(280,330,'Help'); {3} Bar3d(463,340,617,385,5,true); OutTextXY(505,330,'Exit'); Setcolor(1); SetTextStyle(2,0,5); OutTextXY(445,460,'written by Nikolay Buryak'); { ---???? -?? ? ª??--- } fl:=true; SetLineStyle(3,0,3); While not keypressed do Begin SetColor(4 + Byte(fl) * 7); Rectangle(0, 0, GetMaxX, GetMaxY); fl := not fl; delay(30000); End; readkey; End; const numButtons = 3; coords: array[1 .. numButtons, 1 .. 2] of integer = ( ( 25, 30), { // 1 } (242, 280), { // 2 } (463, 505) { // 3 } ); s: array[1 .. numButtons] of string = ( 'Continue', 'Help', 'Exit' ); procedure DrawButton(i: byte; Active: boolean); begin if active then begin SetFillStyle(1, 12); Bar(Coords[i, 1], 340, Coords[i, 1] + 154, 385); Rectangle(Coords[i, 1], 340, Coords[i, 1] + 154, 385); end else begin SetFillStyle(1, 13); Bar3D(Coords[i, 1], 340, Coords[i, 1] + 154, 385, 5, True); OutTextXY(Coords[i, 2], 330, s[i]); end; end; Begin {main} clrscr; grDriver:=Detect; initGraph (grDriver,grMode,''); { Assign(f,'text.txt'); reset(f); SBMI('1.bmp',0,0,0); l:=readkey; cleardevice;} Face; {*******??????Ý?-?? ?® ??? ª?-????r? ª? ?-r?r? - ????-??*************} SetLineStyle(0,0,0); SetColor(8); SetTextStyle(4,0,5); i:=1; While True Do Begin For j := 1 to numButtons do DrawButton(j, (j = i)); k := readkey; Case k of #0: Case ReadKey Of Left : If i = 1 Then i := numButtons Else Dec(i); Right: If i = numButtons Then i := 1 Else Inc(i); End; #13: Case i Of 1: Continue; 2: Continue; 3: Break End; End; End; {----------------END----------------------------} { x:=0; y:=0; While not Eof(f) do Begin read(f,st); case ord(st) of 128..239:st:=chr(ord(st)-64); 240..255:st:=chr(ord(st)-16); end; Case st of '*':Begin readkey; cleardevice; x:=0; y:=0 End; '/':readkey; else Outtextxy(x,y,st); End; x:=x+8; If x>635 then Begin y:=y+10; x:=0 End; End; close(F);} End.