home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C++ Games Programming
/
CPPGAMES.ISO
/
fgl
/
fglight
/
expas.arj
/
TEMP
/
14-08.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1995-01-20
|
1KB
|
51 lines
program main;
uses fgmain, fgbitmap, fgmisc;
var
old_mode : integer;
buttons, count : integer;
x, y : integer;
message : string[25];
strx, stry : string[4];
strcount : string[5];
begin
fg_initpm;
old_mode := fg_getmode;
fg_setmode(fg_automode);
if (fg_mouseini < 0) then
begin
fg_setmode(old_mode);
fg_reset;
exit;
end;
fg_setcolor(15);
fg_rect(0,fg_getmaxx,0,fg_getmaxy);
fg_mousevis(1);
repeat
begin
fg_waitfor(54);
fg_mousebut(1,count,x,y);
fg_mousepos(x,y,buttons);
str(x:3,strx);
str(y:3,stry);
str(count:4,strcount);
message := 'X=' + strx + ' Y=' + stry + ' count=' + strcount;
fg_mousevis(0);
fg_setcolor(15);
fg_rect(0,fg_xconvert(25),0,fg_yconvert(1));
fg_setcolor(0);
fg_locate(0,0);
fg_text(message,24);
fg_mousevis(1);
fg_mousebut(2,count,x,y);
end;
until (count > 0);
fg_setmode(old_mode);
fg_reset;
end.