2024-03-02 18:40:38 +02:00
|
|
|
program pr;
|
|
|
|
uses crt, graph;
|
|
|
|
var tmp_d, tmp_m : integer; {screen variables}
|
|
|
|
p : char; {readkey}
|
|
|
|
y_wlcm : integer; {Vsplivayushii text}
|
2024-03-02 18:40:56 +02:00
|
|
|
i : integer; {Vspomogatelnie peremennye}
|
|
|
|
cur : integer; {Posicia kursora v menu}
|
|
|
|
javame, author,
|
|
|
|
welcome,
|
|
|
|
menustatus : string;
|
|
|
|
mainmenu : array [1..22] of string; {menu}
|
2024-03-02 18:40:38 +02:00
|
|
|
|
|
|
|
{Procedura inicializacii grafiki}
|
|
|
|
procedure init_screen;
|
|
|
|
begin
|
|
|
|
tmp_d := detect;
|
|
|
|
initgraph(tmp_d, tmp_m, '');
|
|
|
|
end;
|
|
|
|
|
|
|
|
{Procedura inicializacii peremennyh}
|
|
|
|
procedure init_variables;
|
|
|
|
begin
|
2024-03-02 18:40:56 +02:00
|
|
|
y_wlcm := -20;
|
|
|
|
author := 'Author: Victor aNNiMON Melnik';
|
|
|
|
welcome := 'Welcome';
|
|
|
|
javame := 'JavaME';
|
|
|
|
menustatus := 'ESC - Vyhod UP,DOWN,LEFT,RIGHT - Peredvijenie kursora ENTER - Perehod';
|
|
|
|
{Menu Lekcii}
|
|
|
|
for i:= 1 to 10 do
|
|
|
|
begin
|
|
|
|
mainmenu[i] := chr(47+i)+'. Lekcia #'+chr(47+i);
|
|
|
|
mainmenu[i+10] := 'Test #'+chr(47+i)
|
|
|
|
end;
|
|
|
|
mainmenu[21] := 'Author';
|
|
|
|
mainmenu[22] := 'Exit';
|
2024-03-02 18:40:38 +02:00
|
|
|
end;
|
|
|
|
|
|
|
|
{Procedura vyvoda zastavki}
|
|
|
|
procedure helloscreen;
|
|
|
|
begin
|
|
|
|
init_screen;
|
|
|
|
repeat
|
|
|
|
setcolor(7);
|
|
|
|
bar(0,0,640,480);
|
|
|
|
settextstyle(1, 0, 7);
|
|
|
|
{vyvod texta Welcome s tenyu}
|
|
|
|
setcolor(green);
|
2024-03-02 18:40:56 +02:00
|
|
|
outtextxy(192, y_wlcm+2, welcome);
|
2024-03-02 18:40:38 +02:00
|
|
|
setcolor(lightgreen);
|
2024-03-02 18:40:56 +02:00
|
|
|
outtextxy(190, y_wlcm, welcome);
|
2024-03-02 18:40:38 +02:00
|
|
|
inc(y_wlcm);
|
|
|
|
{Vyvod imeni}
|
|
|
|
settextstyle(3, 0, 4);
|
|
|
|
setcolor(red);
|
2024-03-02 18:40:56 +02:00
|
|
|
outtextxy(y_wlcm*2-100, 281, author);
|
2024-03-02 18:40:38 +02:00
|
|
|
setcolor(lightred);
|
2024-03-02 18:40:56 +02:00
|
|
|
outtextxy(y_wlcm*2-99, 280,author);
|
2024-03-02 18:40:38 +02:00
|
|
|
delay(1000);
|
2024-03-02 18:40:56 +02:00
|
|
|
{Vyvod nazvania}
|
|
|
|
settextstyle(6,0,8);
|
|
|
|
setcolor(lightblue);
|
|
|
|
for i:= 1 to 6 do
|
|
|
|
begin
|
|
|
|
if(y_wlcm/16)<i then break;
|
|
|
|
outtextxy(70+i*60, 120, javame[i]);
|
|
|
|
end;
|
|
|
|
until (y_wlcm>100) or (keypressed);
|
|
|
|
readkey;
|
|
|
|
end;
|
2024-03-02 18:40:38 +02:00
|
|
|
|
2024-03-02 18:40:56 +02:00
|
|
|
{Procedura vyvoda menu}
|
|
|
|
procedure menu;
|
|
|
|
begin
|
|
|
|
init_screen;
|
|
|
|
setbkcolor(9);
|
|
|
|
{Title}
|
|
|
|
setfillstyle(1, 1);
|
|
|
|
bar(0, 0, 640, 18);
|
|
|
|
setcolor(13);
|
|
|
|
settextstyle(2,0,6);
|
|
|
|
outtextxy(300, 0, javame);
|
|
|
|
{Status}
|
|
|
|
setfillstyle(1, 7);
|
|
|
|
settextstyle(2,0,4);
|
|
|
|
bar(0, 466, 640, 480);
|
|
|
|
setcolor(24);
|
|
|
|
outtextxy(10, 468, menustatus);
|
|
|
|
{Otrisovka menu}
|
|
|
|
setcolor(14);
|
|
|
|
settextstyle(2,0,6);
|
|
|
|
for i:= 1 to 10 do
|
|
|
|
begin
|
|
|
|
outtextxy(40, 40+i*20, mainmenu[i]);
|
|
|
|
end;
|
|
|
|
|
|
|
|
readkey;
|
2024-03-02 18:40:38 +02:00
|
|
|
end;
|
|
|
|
|
|
|
|
{Glavnaya programma}
|
|
|
|
begin
|
2024-03-02 18:40:56 +02:00
|
|
|
init_variables;
|
|
|
|
{helloscreen;}
|
|
|
|
menu;
|
2024-03-02 18:40:38 +02:00
|
|
|
closegraph;
|
|
|
|
end.
|