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

 Syntax
   proc cursorsave extern
   param long gCursor

 Arguments
   gCursor determines if cursor will be switched on/off and receives
   saved cursor status information.

 Return
   None.

 Description
   The cursorsave() procedure saves the position and on/off status
   of the cursor in the gCursor parameter. After the call the cursor
   will be either on or off, depending on the initial value of gCursor
   (1 for turning the cursor on, 0 for cursor off). The cursor status
   can then be restored by the cursorrest() procedure.

 Example
   #define EXAMPLE_SCREEN
   #include example.hdr

   proc Test_cursorsave
   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_cursorsave()
   endproc

See Also: cursorrest()

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