home *** CD-ROM | disk | FTP | other *** search
/ C++ Games Programming / CPPGAMES.ISO / fgl / fglight / expas.arj / TEMP / 14-08.PAS < prev    next >
Pascal/Delphi Source File  |  1995-01-20  |  1KB  |  51 lines

  1. program main;
  2. uses fgmain, fgbitmap, fgmisc;
  3.  
  4. var
  5.   old_mode       : integer;
  6.   buttons, count : integer;
  7.   x, y           : integer;
  8.   message        : string[25];
  9.   strx, stry     : string[4];
  10.   strcount       : string[5];
  11.  
  12. begin
  13.   fg_initpm;
  14.   old_mode := fg_getmode;
  15.   fg_setmode(fg_automode);
  16.  
  17.   if (fg_mouseini < 0) then
  18.   begin
  19.     fg_setmode(old_mode);
  20.     fg_reset;
  21.     exit;
  22.   end;
  23.  
  24.   fg_setcolor(15);
  25.   fg_rect(0,fg_getmaxx,0,fg_getmaxy);
  26.   fg_mousevis(1);
  27.  
  28.   repeat
  29.   begin
  30.     fg_waitfor(54);
  31.     fg_mousebut(1,count,x,y);
  32.     fg_mousepos(x,y,buttons);
  33.     str(x:3,strx);
  34.     str(y:3,stry);
  35.     str(count:4,strcount);
  36.     message := 'X=' + strx + '  Y=' + stry + '  count=' + strcount;
  37.     fg_mousevis(0);
  38.     fg_setcolor(15);
  39.     fg_rect(0,fg_xconvert(25),0,fg_yconvert(1));
  40.     fg_setcolor(0);
  41.     fg_locate(0,0);
  42.     fg_text(message,24);
  43.     fg_mousevis(1);
  44.     fg_mousebut(2,count,x,y);
  45.   end;
  46.   until (count > 0);
  47.  
  48.   fg_setmode(old_mode);
  49.   fg_reset;
  50. end.
  51.