Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Grumpfish Library 3.2 - <b>gfrestenv()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
GFRESTENV()

    This function restores environmental settings that have been
    previously saved with GFSAVEENV().

    Syntax

    GFRESTENV([<ele>])

    Optional Parameter

    <ele> is a numeric expression that would have been previously returned
    from GFSAVEENV().  If you do not use this parameter, GFRESTENV() will
    assume that you want to use the Last In First Out method to restore
    the most recently saved environmental information.

    Return Value

    None

    Notes

    GFRESTENV() restores the cursor row and column position, the
    cursor size, and the color setting that were previously saved
    with GFSAVEENV().  The function uses an array containing subarrays
    to store the previous settings:

                 Description        Element #
                 cursor row             1
                 cursor column          2
                 cursor size            3
                 color setting          4
                 screen (optional)      5

    Note that the screen will be restored automatically if you directed
    GFSAVEENV() to save it.

    Feel free to modify GFSAVEENV() and GFRESTENV() to save and restore
    more items as you see fit (for example, all the hot-keys).

    Sample Usage

    #include "setcurs.ch"                           
    setcolor("+W/B")                                
    @ 1, 1 SAY "current position - press any key..."
    inkey(0)                                        
    // no need to save screen                       
    GFSaveEnv(, SC_INSERT, 'n/bg')                  
    @ 20, 0 SAY "press any key to switch back"      
    inkey(0)                                        
    GFRestEnv()                                     
    ?? "back at previous position in previous color"

See Also: GFSAVEENV() GFSAVESETS()

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