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

 Syntax
   func uint mouserrel extern
   param value uint uButton

 Arguments
   uButton is a mouse button number.

 Return
   Row position of the mouse cursor.

 Description
   The mouserrel() function returns the row of the mouse cursor position when
   the specified mouse button was last released. See mouse.hdr for mouse
   button identifier constants.

 Example
   #define EXAMPLE_MOUSE
   #include example.hdr

   proc Test_mouserrel
   vardef
      uint nRow, nCol
   enddef
   if mouseavail()
      clear
      cursor( .f. )
      @ 17, 60 to 19, 65
      @ 18, 61 ?? "Exit"
      mouseon()
      do while .t.
         nRow := mouserrel( MB_LEFT )
         nCol := mousecrel( 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_mouserrel()
   endproc

See Also: mousecpressed() mousecrel() mouserpressed()

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