Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Flipper 6.0 Help File - <b>grid_pnt()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
GRID_PNT()
   Moves the mouse cursor to the closest grid point.

   Syntax
         nCurrentGridStatus = GRID_PNT()

   Arguments
         None

   Returns
         nCurrentGridStatus Returns whether the snap is on or off.
                            0 = Off (Snap off or out of view).
                            1 = On (Snapped to grid point).

   Description
         When the grid system is set on with GRID_SET(), a call to GRID_PNT()
         will move the mouse cursor to the nearest grid point. If the grid
         system is currently off or the mouse is not in the current viewport,
         no snap will occur, and the function will return a 0. Otherwise, it
         will return a 1 indicating a successful snap occurred.

         After the cursor has been moved to the closest grid point, the
         position can be found by calling KP_SCALE_X() and KP_SCALE_Y().

   Examples
         * Will snap to closest grid point -
         IF GRID_PNT() = 1
            @ 23,10 SAY 'Mouse has moved to closest grid point'
         ENDIF

See Also: GRID_SET()

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