Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - mousecpressed() return column where mouse button was last pressed http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 mousecpressed()     Return column where mouse button was last pressed
------------------------------------------------------------------------------
 Declaration
   mouse.hdr

 Syntax
   func uint mousecpressed extern
   param value uint uButton

 Arguments
   uButton is a mouse button number.

 Return
   Column position of the mouse cursor.

 Description
   The mousecpressed() function returns the column of the mouse cursor
   position where the specified mouse button was last pressed.

 Example
   #define EXAMPLE_MOUSE
   #include example.hdr

   proc Test_mousecpressed
   vardef
      uint nRow, nCol
   enddef
   if mouseavail()
      clear
      cursor( .f. )
      @ 17, 60 to 19, 65
      @ 18, 61 ?? "Exit"
      mouseon()
      do while .t.
         nRow := mouserpressed( MB_LEFT )
         nCol := mousecpressed( MB_LEFT )
         if nRow > 17 .and. nRow < 19 .and. ;
            nCol > 60 .and. nCol < 65
            exit
         endif
      enddo
      mouseoff()
   else
      ? "Mouse is not available"
   endif
   endproc

   proc main
   Test_mousecpressed()
   endproc

See Also: mousecrel() mouserpressed() mouserrel()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson