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 - cursorrest() restore cursor status http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 cursorrest()        Restore cursor status
------------------------------------------------------------------------------
 Declaration
   screen.hdr

 Syntax
   proc cursorrest extern
   param long gCursor

 Arguments
   gCursor is the saved cursor status information.

 Return
   None.

 Description
   The cursorrest() procedure restores the position and on/off status
   of the cursor, after saving these values by the cursorsave() function.

 Example
   #define EXAMPLE_SCREEN
   #include example.hdr

   proc Test_cursorrest
   vardef
      uint n
      long gCursor
   enddef
   clear
   cursor( .t. )
   gCursor := 0                              // cursor will be off
   cursorsave( gCursor )                     // save cursor state
   for n := 1 to 4
      cursor( .f. )                          // always switch off cursor
      @ 20, 10 * n ?? "Changed"              // new cursor position
      getkey()                               // wait for key press
      cursorrest( gCursor )                  // restore cursor state
      @ row(), col() + 10 * n ??  "Original" // display at original position
      getkey()                               // wait for key press
   next
   endproc

   proc main
   Test_cursorrest()
   endproc

See Also: cursorsave()

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