Code:
/*-----------ALL ABOUT MOUSE-----------*/
initmouse()
{ i.x.ax=0; int86(0x33,&i,&o); return (o.x.ax);}
showmouse()
{ i.x.ax=1; int86(0x33,&i,&o); return 0; }
hidemouse()
{ i.x.ax=2; int86(0x33,&i,&o); return 0; }
mouse( int *button,int *x,int *y)
{ i.x.ax=3; int86(0x33,&i,&o);
*button=o.x.bx; *x=o.x.cx; *y=o.x.dx; return 0;
}
leftrelease()
{
regs.x.ax=6; regs.x.bx=0; int86(0x33,®s,®s);
return 0;
}
/*-------------BUTTONS OR BOXES------------*/
greybutton(int xgrid,int ygrid,char string[])
{
int x2,y2;
xgrid=GRID*xgrid; ygrid=GRID*ygrid;
x2=xgrid+GRID*30; y2=ygrid+GRID*2;
setfillstyle(SOLID_FILL,8); setcolor(15);
bar(xgrid,ygrid,x2,y2); rectangle(xgrid,ygrid,x2,y2);
settextstyle(SMALL_FONT,HORIZ_DIR,4);
setcolor(14); outtextxy(xgrid+GRID,ygrid,string); return 0;
}
redbutton(int xgrid,int ygrid,char string[])
{
int x2,y2;
xgrid=GRID*xgrid; ygrid=GRID*ygrid;
x2=xgrid+GRID*8; y2=ygrid+GRID*2;
setfillstyle(SOLID_FILL,4); setcolor(15);
bar(xgrid,ygrid,x2,y2); rectangle(xgrid,ygrid,x2,y2);
settextstyle(SMALL_FONT,HORIZ_DIR,4);
setcolor(14); outtextxy(xgrid+GRID,ygrid,string);
return 0;
}
smallbutton(int xgrid,int ygrid,char string[])
{
int x2,y2;
xgrid=GRID*xgrid; ygrid=GRID*ygrid;
x2=xgrid+GRID*7; y2=ygrid+GRID*2;
setfillstyle(SOLID_FILL,7); setcolor(15);
bar(xgrid,ygrid,x2,y2); rectangle(xgrid,ygrid,x2,y2);
settextstyle(SMALL_FONT,HORIZ_DIR,4);
setcolor(14); outtextxy(xgrid+GRID,ygrid,string);
return 0;
}