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

 Syntax
   func uint mousecol extern

 Arguments
   None.

 Return
   Column position of the mouse cursor.

 Description
   The mouseactcol() returns the column of the current mouse cursor location.

 Example
   #define EXAMPLE_MOUSE
   #include example.hdr

   proc Test_mousecol
   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_mousecol()
   endproc

See Also: mouserow()

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