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 - mouserpressed() return row where mouse button was last pressed http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 mouserpressed()     Return row where mouse button was last pressed
------------------------------------------------------------------------------
 Declaration
   mouse.hdr

 Syntax
   func uint mouserpressed extern
   param value uint uButton

 Arguments
   uButton is a mouse button number.

 Return
   Row position of the mouse cursor.

 Description
   The mouserpressed() function returns the row of the mouse cursor position
   where the specified mouse button was last pressed. See mouse.hdr for
   mouse button identifier constants.

 Example
   #define EXAMPLE_MOUSE
   #include example.hdr

   proc Test_mouserpressed
   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_mouserpressed()
   endproc

See Also: mousecpressed() mousecrel() mouserrel()

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