#include
#define ATAS 72
#define BAWAH 80
#define KANAN 77
#define KIRI 75
#define ESC 27
#define ENTER 13
#define ANEH 31
int x,n,m;
int key,key2,key3,key4, key5;
void keluar()
{
cleardevice();
setcolor(BLUE);
setfillstyle(1,BLUE);
bar(175,150,500,300);
setcolor(WHITE);
rectangle(173,148,502,302);
/* monitor kecil
rectangle(220,185,270,225);
rectangle(225,190,265,220);
rectangle(265,222,260,223);
rectangle(235,225,255,230);
rectangle(215,230,275,245);
rectangle(260,232,273,243);
setfillstyle(1,4);
floodfill(222,187,WHITE);
floodfill(237,228,WHITE);
floodfill(220,235,WHITE);
setfillstyle(6,YELLOW);
floodfill(263,235,WHITE);*/
setfillstyle(9,2);
floodfill(230,195,WHITE);
settextstyle(3,0,2);
setusercharsize(1.5,1,1,1.5);
outtextxy(150,75,"TUGAS AKHIR MEMBUAT PUSING ");
settextjustify(1,0);
settextstyle(2,0,2);
setusercharsize(1.5,1,1,1.5);
outtextxy(390,210,"DIBUAT OLEH: Aditya Kris Arnanda");
outtextxy(395,225,"NIM : A11.2008.03927");
outtextxy(395,239,"KELOMPOK : STI 205");
outtextxy(320,370,"Pencet Terserah Anda Jika Mau keluar ...");
getch();
closegraph();
}
void tombol(int fe)
{
setcolor(fe);
setfillstyle(1,fe);
bar(5,457,65,477);
setcolor(14);
settextjustify(0,2);
settextstyle(2,0,5);
outtextxy(18,459,"MENU");
}
void desktop()
{
cleardevice();
setbkcolor(YELLOW);
setfillstyle(1,7);
bar(4,456,638,478);
setfillstyle(1,15);
bar(593,462,634,474);
rectangle(4,456,66,478);
setcolor(16);
settextjustify(0,2);
settextstyle(2,0,5);
outtextxy(596,460,"PISS..");
tombol(8);
}
void menu()
{
/* kotak menu */
setbkcolor(BLUE);
setcolor(8);
setfillstyle(1,7);
bar(18,278,151,454);
/* kotak win */
setcolor(RED);
setfillstyle(1,WHITE);
bar(1,278,18,454);
/* tulisan Tugas STI 205*/
setcolor(GREEN);
settextjustify(1,0);
setusercharsize(1,2,1,4);
settextstyle(2,1,2);
setusercharsize(1.5,1,1,1.5);
outtextxy(6,450,"Tugas STI 205");
/* garis tepi */
setcolor(8);
line(150,279,150,454);
line(18,279,150,279);
line(18,429,150,429);
/* tulisan menu */
setcolor(BLUE);
settextjustify(0,1);
settextstyle(1,0,1);
setusercharsize(1,2,1,3);
outtextxy(20,440,"KELUAR");
outtextxy(20,410,"Input");
outtextxy(20,380,"Cari >>");
outtextxy(20,350,"Ubah >>");
outtextxy(20,320,"Hapus >>");
outtextxy(20,290,"Urutkan >>");
}
void terang(int n)
{
setcolor(BLUE);
setfillstyle(1,9);
bar(19,431-(30*n),148,453-(30*n));
setcolor(14);
settextjustify(0,1);
settextstyle(1,0,1);
setusercharsize(1,2,1,3);
if(n==0) outtextxy(20,440,"KELUAR");
if(n==1) outtextxy(20,410,"Input");
if(n==2) outtextxy(20,380,"Cari þ");
if(n==3) outtextxy(20,350,"Ubah þ");
if(n==4) outtextxy(20,320,"Hapus þ");
if(n==5) outtextxy(20,290,"Urutkan þ");
}
void padang1(int m)
{
setcolor(BLUE);
setfillstyle(1,9);
bar(155,303-(30*m),316,285-(30*m));
setcolor(14);
settextjustify(0,1);settextstyle(1,0,1);
setusercharsize(1,2,1,3);
if(m==0) outtextxy(165,290-(30*m),"Sesuai Nama");
if(m==1) outtextxy(165,290-(30*m),"Sesuai Nim ");
if(m==2) outtextxy(165,290-(30*m),"Sesuai Jadwal");
if(m==3) outtextxy(165,290-(30*m),"Sesuai Email");
if(m==4) outtextxy(165,290-(30*m),"SesuaiID");
if(m==5) outtextxy(165,290-(30*m),"Sesuai Kelas");
if(m==6) outtextxy(165,290-(30*m),"Sesuai Jurusan þ");
if(m==7) outtextxy(165,290-(30*m),"Sesuai Progdi þ");
}
void padang2(int m)
{
setcolor(BLUE);
setfillstyle(1,9);
bar(154,392-(30*m),300,370-(30*m));
setcolor(14);
settextjustify(0,1);
settextstyle(1,0,1);
setusercharsize(1,2,1,3);
if(m==0) outtextxy(165,380-(30*m),"Nim");
if(m==1) outtextxy(165,380-(30*m),"Nama");
if(m==2) outtextxy(165,380-(30*m),"Kelas");
}
void padang3(int m)
{
setcolor(BLUE);
setfillstyle(1,9);
bar(154,364-(30*m),317,342-(30*m));
setcolor(14);
settextjustify(0,1);
settextstyle(1,0,1);
setusercharsize(1,2,1,3);
if(m==0) outtextxy(165,350-(30*m),"Ubah Email");
if(m==1) outtextxy(165,350-(30*m),"Ubah Nama");
if(m==2) outtextxy(165,350-(30*m),"Ubah kelas");
}
void padang4(int x)
{
setcolor(BLUE);
setfillstyle(1,9);
bar(322,74+(30*x),467,100+(30*x));
setcolor(14);
settextjustify(0,1);
settextstyle(1,0,1);
setusercharsize(1,2,1,3);
if(x==0) outtextxy(340,80,"TI");
if(x==1) outtextxy(340,110,"SI");
if(x==2) outtextxy(340,140,"MI");
if(x==3) outtextxy(340,170,"DKV");
}
void padang5(int x)
{
setcolor(BLUE);
setfillstyle(1,9);
bar(322,105+(30*x),468,130+(30*x));
setcolor(14);
settextjustify(0,1);
settextstyle(1,0,1);
setusercharsize(1,2,1,3);
if(x==0) outtextxy(340,110,"D3");
if(x==1) outtextxy(340,140,"S1");
if(x==2) outtextxy(340,170,"S2");
}
void menu_program()
{
setfillstyle(1,7);
bar(152,72,319,306);
setcolor(8);
rectangle(153,73,318,305);
setcolor(BLUE);
settextjustify(0,1);
settextstyle(1,0,1);
setusercharsize(1,2,1,3);
outtextxy(165,290,"Sesuai Nama");
outtextxy(165,260,"Sesuai Nim");
outtextxy(165,230,"Sesuai Jadwal");
outtextxy(165,200,"Sesuai Email");
outtextxy(165,170,"Sesuai ID");
outtextxy(165,140,"Sesuai Kelas");
outtextxy(165,110,"Sesui Jurusan >>");
outtextxy(165,80,"Sesuai Progdi >>");
}
void menu_access()
{
setfillstyle(1,7);
bar(319,72,470,192);
setcolor(8);
rectangle(320,73,469,191);
setcolor(BLUE);
settextjustify(0,1);
settextstyle(1,0,1);
setusercharsize(1,2,1,3);
outtextxy(340,170,"TI");
outtextxy(340,140,"SI");
outtextxy(340,110,"MI");
outtextxy(340,80,"DKV");
}
void menu_startup()
{
setfillstyle(1,7);
bar(319,101,470,192);
setcolor(8);
rectangle(320,102,469,191);
setcolor(BLUE);
settextjustify(0,1);
settextstyle(1,0,1);
setusercharsize(1,2,1,3);
outtextxy(340,110,"D3");
outtextxy(340,140,"S1");
outtextxy(340,170,"S2");
}
void pilih_dokumen()
{
do
{
setcolor(9);
setfillstyle(1,7);
bar(150,339,301,310);
setcolor(8);
setfillstyle(1,8);
rectangle(151,338,300,311);
setfillstyle(1,9);
bar(153,336,298,313);
setcolor(BLUE);
settextjustify(0,1);
settextstyle(1,0,1);
setusercharsize(1,2,1,3);
outtextxy(190,320,"Semua FILE");
}
while(getch()!=75);
setfillstyle(1,BLACK);
bar(150,339,301,309);
}
void menu_setting()
{
setcolor(9);
setfillstyle(1,7);
bar(151,368,320,279);
setcolor(8);
rectangle(152,366,319,280);
setcolor(BLUE);
settextjustify(0,1);settextstyle(1,0,1);
setusercharsize(1,2,1,3);
outtextxy(165,350,"Ubah Email");
outtextxy(165,320,"Ubah Nama");
outtextxy(165,290,"Ubah Kelas");
}
void menu_search()
{
setcolor(LIGHTGRAY);
setfillstyle(1,7);
bar(151,306,303,395);
setcolor(8);
rectangle(152,307,302,394);
setcolor(BLUE);
settextjustify(0,1);
settextstyle(1,0,1);
setusercharsize(1,2,1,3);
outtextxy(165,380,"Nim");
outtextxy(165,350,"Nama");
outtextxy(165,320,"Kelas");
}
void fe_access()
{
x=0;
do
{
menu_access();
padang4(x);
key4=getch();
if(key4==ATAS) { if(x<0)>0) x--; }
if(key4==BAWAH) { if(x<3)>3) x--; }
}
while(!(key4==ESC||key4==KIRI));
setfillstyle(1,BLACK);
bar(319,72,470,192);
}
void fe_startup()
{
x=0;
do
{
menu_startup();
padang5(x);
key4=getch();
if(key4==ATAS) { if(x<0)>0) x--; }
if(key4==BAWAH) { if(x<2)>2) x--; }
}
while(!(key4==ESC||key4==KIRI));
setfillstyle(1,BLACK);
bar(319,101,470,192);
}
void program()
{
m=0;
do
{
menu_program();
padang1(m);
key3=getch();
if(key3==BAWAH) { if(m<0)>0) m--; }
if(key3==ATAS) { if(m<7)>7) m--; }
if(key3==ENTER||key3==KANAN)
{
if(m==7) fe_access();
if(m==6) fe_startup();
}
}
while(!(key3==ESC||key3==KIRI));
setfillstyle(1,BLACK);
bar(150,309,321,69);
}
void pilih_setting()
{
m=0;
do
{
menu_setting();
padang3(m);
key3=getch();
if(key3==BAWAH) { if(m<0)>0) m--; }
if(key3==ATAS) { if(m<2)>2) m--; }
}
while(!(key3==ESC||key3==KIRI));
setfillstyle(1,BLACK);
bar(150,369,321,279);
}
void pilih_search()
{
m=0;
do
{
menu_search();
padang2(m);
key3=getch();
if(key3==BAWAH) { if(m<0)>0) m--; }
if(key3==ATAS) { if(m<2)>2) m--; }
}
while(!(key3==ESC||key3==KIRI));
setfillstyle(1,BLACK);
bar(150,300,303,410);
}
void run()
{
do{
cleardevice();
desktop();
tombol(8);
setfillstyle(1,7);
bar(10,350,225,450);
setfillstyle(1,1);
bar(10,350,225,370);
rectangle(70,415,99,435);
rectangle(102,415,158,435);
rectangle(163,415,215,435);
setfillstyle(1,15);
bar(50,398,200,410);
settextjustify(0,2);
settextstyle(2,0,5);
outtextxy(13,352,"ÛÛ input..."); /* ascii 219 */
setcolor(16);
settextstyle(2,0,4);
outtextxy(13,372,"ÛÛ Tulislah Nama Anda.");
outtextxy(13,398,"Tulis");
outtextxy(80,420,"OK");
outtextxy(113,420,"Batal");
outtextxy(173,420,"CARI");
key5=getch();
}
while(key5!=ESC);
setfillstyle(1,BLACK);
bar(10,350,225,450);
}
void fe_menu()
{
n=0;
do{
menu();terang(n);
key2=getch();
if(key2==BAWAH) { if(n<0)>0) n--; }
if(key2==ATAS) { if(n<5)>5) n--; }
if(key2==KANAN||key2==ENTER)
{
if(n==0) keluar();
if(n==1) run();
if(n==2) pilih_search();
if(n==3) pilih_setting();
if(n==4) pilih_dokumen();
if(n==5) program();
}
}while(key2!=ESC);
setfillstyle(1,BLACK);
bar(0,459,150,276);
}
void main()
{
int drv, mode;
detectgraph(&drv, & mode);
initgraph(&drv, &mode,"(':");
for (;;)
{
desktop();
key=getch();
if(key!=ANEH)
{
tombol(1);
fe_menu();
}
}
}
