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

 Syntax
   func uint row extern

 Arguments
   None.

 Return
   Row position of the cursor.

 Description
   The row() function returns the current screen cursor row position.

 Example
   #define EXAMPLE_SCREEN
   #include example.hdr

   proc Test_row
   vardef
      uint uKey
   enddef
   ? "Move the cursor with navigation keys, finish with Escape or Enter"
   do while .t.
      uKey := inkey()                           // get keypress
      do case                                   // move cursor around
      case uKey == K_LEFT
         @ row(), col() - 1
      case uKey == K_RIGHT
         @ row(), col() + 1
      case uKey == K_UP
         @ row() - 1, col()
      case uKey == K_DOWN
         @ row() + 1, col()
      case uKey == K_ENTER .or. uKey == K_ESC
         exit
      endcase
   enddo
   endproc

   proc main
   Test_row()
   endproc

See Also: col() getrc() restrc() saverc() setrc()

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