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 - mouserow() return the current mouse cursor row http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 mouserow()          Return the current mouse cursor row
------------------------------------------------------------------------------
 Declaration
   mouse.hdr

 Syntax
   func uint mouserow extern

 Arguments
   None.

 Return
   Row position of the mouse cursor.

 Description
   The mouserow() function returns the row of the current mouse cursor
   location.

 Example
   #define EXAMPLE_MOUSE
   #include example.hdr

   proc Test_mouserow
   vardef
      uint uRow, uCol
   enddef
   if mouseavail()
      uRow := 1000
      uCol := 1000
      clear
      cursor( .f. )
      @ 0, 0 ?? "Move the mouse, finish with Esc"
      @ 2, 0 ?? "Mouse row is"
      @ 3, 0 ?? "Mouse column is"
      mouseon()
      do while inkey() != K_ESC
         if mouserow() != uRow
            uRow := mouserow()
            @ 2, 20 ?? uRow
         endif
         if mousecol() != uCol
            uCol := mousecol()
            @ 3, 20 ?? uCol
         endif
      enddo
      mouseoff()
   else
      ? "Mouse is not available"
   endif
   endproc

   proc main
   Test_mouserow()
   endproc

See Also: mousecol()

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