2
This commit is contained in:
parent
be3b753c4b
commit
777cd600e1
83
PRAKTIKA.PAS
83
PRAKTIKA.PAS
@ -3,7 +3,12 @@ program pr;
|
||||
var tmp_d, tmp_m : integer; {screen variables}
|
||||
p : char; {readkey}
|
||||
y_wlcm : integer; {Vsplivayushii text}
|
||||
javame : string;
|
||||
i : integer; {Vspomogatelnie peremennye}
|
||||
cur : integer; {Posicia kursora v menu}
|
||||
javame, author,
|
||||
welcome,
|
||||
menustatus : string;
|
||||
mainmenu : array [1..22] of string; {menu}
|
||||
|
||||
{Procedura inicializacii grafiki}
|
||||
procedure init_screen;
|
||||
@ -15,8 +20,19 @@ program pr;
|
||||
{Procedura inicializacii peremennyh}
|
||||
procedure init_variables;
|
||||
begin
|
||||
y_wlcm := -20;
|
||||
javame := 'JavaME';
|
||||
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';
|
||||
end;
|
||||
|
||||
{Procedura vyvoda zastavki}
|
||||
@ -29,34 +45,61 @@ program pr;
|
||||
settextstyle(1, 0, 7);
|
||||
{vyvod texta Welcome s tenyu}
|
||||
setcolor(green);
|
||||
outtextxy(172, y_wlcm+2, 'Welcome');
|
||||
outtextxy(192, y_wlcm+2, welcome);
|
||||
setcolor(lightgreen);
|
||||
outtextxy(170, y_wlcm, 'Welcome');
|
||||
outtextxy(190, y_wlcm, welcome);
|
||||
inc(y_wlcm);
|
||||
{Vyvod imeni}
|
||||
settextstyle(3, 0, 4);
|
||||
setcolor(red);
|
||||
outtextxy(y_wlcm*2-100, 171, 'Author: Victor aNNiMON Melnik');
|
||||
outtextxy(y_wlcm*2-100, 281, author);
|
||||
setcolor(lightred);
|
||||
outtextxy(y_wlcm*2-99, 170,'Author: Victor aNNiMON Melnik');
|
||||
outtextxy(y_wlcm*2-99, 280,author);
|
||||
delay(1000);
|
||||
until y_wlcm>100;
|
||||
repeat until keypressed;
|
||||
{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;
|
||||
|
||||
{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;
|
||||
end;
|
||||
|
||||
{Glavnaya programma}
|
||||
begin
|
||||
helloscreen;
|
||||
{
|
||||
repeat p:= readkey;
|
||||
setbkcolor(blue);
|
||||
if(p=#72) then inc(colbk1);
|
||||
if(p=#80) then colbk1:=colbk1-1;
|
||||
if(colbk1<0) then colbk1 := 15;
|
||||
if(colbk1>15) then colbk1 := 0;
|
||||
|
||||
until p=#27;
|
||||
readkey; }
|
||||
init_variables;
|
||||
{helloscreen;}
|
||||
menu;
|
||||
closegraph;
|
||||
end.
|
Loading…
Reference in New Issue
Block a user