uses Crt,Graph,Mouse;
var karta,tryb,s:Integer;
x,y,k :word;
procedure meni;
begin
cleardevice;
s:=0;
repeat
PutPixel(random(640),90+random(270),random(16));
s:=s+1;
until s=200;
{gorna ramka- w niej znajduje si© napis "—ciĄga z historii" }
setlinestyle(0,0,3);
setcolor(8);
line(0,0,640,0);
line(0,0,0,90);
line(0,90,640,90);
line(639,90,639,0);
{dolna ramka- w niej znajdujĄ si© napisy" wyjjcie,info,poezja,pomoc}
line(0,360,640,360);
line(0,360,0,470);
line(0,470,640,470);
line(639,470,639,360);
{--------------------------}
{prostokat-w nim znajduje si© napis "wyjjcie"}
setcolor(blue);
line(240,370,400,370);
line(240,460,400,460);
line(235,375,235,456);
line(405,375,405,456);
line(235,375,240,370);
line(235,456,240,460);
line(400,370,405,375);
line(400,460,405,456);
{kwadraty- w nich b©dĄ znajdowaay si© strzaaki}
line(15,380,80,380);
line(15,380,10,385);
line(10,385,10,445);
line(10,445,15,450);
line(15,450,80,450);
line(80,450,85,445);
line(85,445,85,385);
line(85,385,80,380);
line(110,380,175,380);
line(110,380,105,385);
line(105,385,105,445);
line(105,445,110,450);
line(110,450,175,450);
line(175,450,180,445);
line(180,445,180,385);
line(180,385,175,380);
{rysowanie strzaaek w kwadratach}
setcolor(7);
line(115,400,130,400);
line(115,400,115,430);
line(115,430,130,430);
line(130,430,130,440);
line(130,400,130,390);
line(130,390,150,415);
line(150,415,130,440);
line(20,400,35,400);
line(20,400,20,430);
line(20,430,35,430);
line(35,430,35,440);
line(35,400,35,390);
line(35,390,55,415);
line(55,415,35,440);
{malowanie strzaaek}
setfillstyle(1,7);
floodfill(25,420,7);
setfillstyle(1,7);
floodfill(120,420,7);
{Rysowanie elips}
ellipse(550,385,0,360,80,13);
ellipse(550,415,0,360,80,13);
ellipse(550,445,0,360,80,13);
{tekst w elipsach}
settextstyle(10,0,3);
setcolor(15);
outtextxy(253,380,'wyjscie');
settextstyle(0,0,0);
outtextxy(530,385,'Info');
outtextxy(525,415,'Pomoc');
outtextxy(520,445,'Poezja');
{glowny napis}
settextstyle(4,0,4);
outtextxy(285,0,'Sciaga');
outtextxy(320,25,'z');
outtextxy(278,50,'Historii');
{tytuly}
settextstyle(9,0,1);
outtextxy(255,175,'Piastow');
outtextxy(236,215,'Jagiellonow');
outtextxy(200,255,'Krolowie elekcyjni');
settextstyle(6,1,6);
outtextxy(100,125,'Dynastia');
end;
procedure meni2;
begin
cleardevice;
s:=0;
repeat
PutPixel(random(640),90+random(270),random(16));
s:=s+1;
until s=200;
{gorna ramka- w niej znajduje si© napis "—ciĄga z historii" }
setlinestyle(0,0,3);
setcolor(8);
line(0,0,640,0);
line(0,0,0,90);
line(0,90,640,90);
line(639,90,639,0);
{dolna ramka- w niej znajdujĄ si© napisy" wyjjcie,info,poezja,pomoc}
line(0,360,640,360);
line(0,360,0,470);
line(0,470,640,470);
line(639,470,639,360);
{--------------------------}
{prostokat-w nim znajduje si© napis "wyjjcie"}
setcolor(blue);
line(240,370,400,370);
line(240,460,400,460);
line(235,375,235,456);
line(405,375,405,456);
line(235,375,240,370);
line(235,456,240,460);
line(400,370,405,375);
line(400,460,405,456);
{kwadraty- w nich b©dĄ znajdowaay si© strzaaki}
line(15,380,80,380);
line(15,380,10,385);
line(10,385,10,445);
line(10,445,15,450);
line(15,450,80,450);
line(80,450,85,445);
line(85,445,85,385);
line(85,385,80,380);
line(110,380,175,380);
line(110,380,105,385);
line(105,385,105,445);
line(105,445,110,450);
line(110,450,175,450);
line(175,450,180,445);
line(180,445,180,385);
line(180,385,175,380);
{rysowanie strzaaek w kwadratach}
setcolor(7);
line(115,400,130,400);
line(115,400,115,430);
line(115,430,130,430);
line(130,430,130,440);
line(130,400,130,390);
line(130,390,150,415);
line(150,415,130,440);
line(20,400,35,400);
line(20,400,20,430);
line(20,430,35,430);
line(35,430,35,440);
line(35,400,35,390);
line(35,390,55,415);
line(55,415,35,440);
{malowanie strzaaek}
setfillstyle(1,7);
floodfill(25,420,7);
setfillstyle(1,7);
floodfill(120,420,7);
{Rysowanie elips}
ellipse(550,385,0,360,80,13);
ellipse(550,415,0,360,80,13);
ellipse(550,445,0,360,80,13);
{tekst w elipsach}
settextstyle(10,0,3);
setcolor(15);
outtextxy(253,380,'wyjscie');
settextstyle(0,0,0);
outtextxy(530,385,'Info');
outtextxy(525,415,'Pomoc');
outtextxy(520,445,'Poezja');
{glowny napis}
settextstyle(4,0,4);
outtextxy(285,0,'Sciaga');
outtextxy(320,25,'z');
outtextxy(278,50,'Historii');
end;
procedure zmniejsz;
begin
settextstyle(10,0,3);
setcolor(0);
outtextxy(253,380,'wyjscie');
settextstyle(10,0,2);
setcolor(15);
outtextxy(260,380,'wyjscie');
settextstyle(10,0,2);
delay(200);
setcolor(0);
outtextxy(260,380,'wyjscie');
settextstyle(10,0,3);
setcolor(15);
outtextxy(253,380,'wyjscie');
delay(100);
end;
procedure koniec;
var q:integer;
begin
q:=480;
repeat
setcolor(0);
settextstyle(7,0,5);
outtextxy(100,q,'Program napisaly:');
settextstyle(5,0,5);
outtextxy(100,q+50,'- Justyna Siedlec');
outtextxy(100,q+90,'- Edyta Ozygala ');
dec(q);
setcolor(15);
settextstyle(7,0,5);
outtextxy(100,q,'Program napisaly:');
settextstyle(5,0,5);
outtextxy(100,q+50,'- Justyna Siedlec');
outtextxy(100,q+90,'- Edyta Ozygala ');
delay(1);
until (keypressed) or (q<-140);
end;
procedure ramka2;
begin
setlinestyle(1,0,0);
setcolor(lightgreen);
line(170,173,450,173);
line(170,213,450,213);
end;
procedure ramka3;
begin
setlinestyle(1,0,0);
setcolor(lightgreen);
line(170,215,450,215);
line(170,257,450,257);
end;
procedure ramka4;
begin
setlinestyle(1,0,0);
setcolor(lightgreen);
line(170,259,450,259);
line(170,303,450,303);
end;
procedure ramkasc;
begin
setlinestyle(1,0,0);
setcolor(0);
line(170,130,450,130);
line(170,170,450,170);
end;
procedure ramka2sc;
begin
setlinestyle(1,0,0);
setcolor(0);
line(170,173,450,173);
line(170,213,450,213);
end;
procedure ramka3sc;
begin
setlinestyle(1,0,0);
setcolor(0);
line(170,215,450,215);
line(170,257,450,257);
end;
procedure ramka4sc;
begin
setlinestyle(1,0,0);
setcolor(0);
line(170,259,450,259);
line(170,303,450,303);
end;
begin
{==========================================================================}
InitGraph(karta,tryb, 'c:\bp\bgi ');
meni;
ramka2;
on;
repeat
post(x,y,k);
{--------------------------------------------------------------------------}
if (y>170)and(y<210) then
begin
ramka2;
ramka3sc;
end;
if (x>200)and(x<420)and(y>170)and(y<210)and(k=1) then
begin
off;
meni2;
settextstyle(8,0,1);
outtextxy(20,95,'Mieszko I');
outtextxy(20,115,'Boleslaw Chrobry');
outtextxy(20,135,'Mieszko II');
outtextxy(20,155,'Kazimierz Odnowiciel');
outtextxy(20,175,'Boleslaw Smialy');
outtextxy(20,195,'Wladyslaw Herman');
outtextxy(20,215,'Boleslaw Krzywousty');
setcolor(lightgreen);
outtextxy(20,235,'Okres rozbicia dzielnicowego');
setcolor(15);
outtextxy(20,255,'Wladyslaw Lokietek');
outtextxy(20,275,'Kazimierz Wielki');
on;
repeat
post(x,y,k);
if (x>240)and(x<400)and(y>370)and(y<460)and(k=1) then
begin
zmniejsz;
end;
until (x>240)and(x<400)and(y>370)and(y<460)and(k=1);
k:=0;
off;
meni;
ramka4;
on;
end;
{-------------------------------------------------------------------------}
if (y>210)and(y<250) then
begin
ramka2sc;
ramka3;
ramka4sc ;
end;
if (x>200)and(x<420)and(y>210)and(y<250)and(k=1) then
begin
off;
meni2;
settextstyle(8,0,1);
outtextxy(20,95,'Wladyslaw Jagello');
outtextxy(20,115,'Wladyslaw Warnenczyk');
outtextxy(20,135,'Kazimierz Jagiellonczyk');
outtextxy(20,155,'Jan Olbracht');
outtextxy(20,175,'Aleksander Jagiellonczyk');
outtextxy(20,195,'Zygmunt Stary');
outtextxy(20,215,'Zygmunt August');
on;
repeat
post(x,y,k);
if (x>240)and(x<400)and(y>370)and(y<460)and(k=1) then
begin
zmniejsz;
end;
until (x>240)and(x<400)and(y>370)and(y<460)and(k=1);
k:=0;
off;
meni;
ramka4;
on;
end;
{--------------------------------------------------------------------------}
if (y>259)and(y<303) then
begin
ramka3sc;
ramka4;
end;
if (x>200)and(x<420)and(y>259)and(y<303)and(k=1) then
begin
off;
meni2;
settextstyle(8,0,1);
outtextxy(20,95,'Henryk Walezy');
outtextxy(20,115,'Stefan Batory');
outtextxy(20,135,'Zygmunt III (Waza)');
outtextxy(20,155,'Wladyslaw IV (Waza)');
outtextxy(20,175,'Jan Kazimierz (Waza)');
outtextxy(20,195,'Michal Korybut Wisniowiecki');
outtextxy(20,215,'Jan III Sobieski');
outtextxy(20,235,'August II Mocny (Sas)');
outtextxy(20,255,'Stanislaw Leszczynski');
outtextxy(20,275,'August III (Sas)');
outtextxy(20,295,'Stanislaw August Poniatowski');
on;
repeat
post(x,y,k);
{Do wpisania}
if (x>240)and(x<400)and(y>370)and(y<460)and(k=1) then
begin
zmniejsz;
end;
until (x>240)and(x<400)and(y>370)and(y<460)and(k=1);
k:=0;
off;
meni;
ramka4;
on;
end;
{-------------------------------------------------------------------------}
if (x>240)and(x<400)and(y>370)and(y<460)and(k=1) then
begin
zmniejsz;
end;
until (x>240)and(x<400)and(y>370)and(y<460)and(k=1);
off;
cleardevice;
koniec;
CloseGraph;
end.