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>pos_refer()</b> c_exam03 http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
POS_REFER()                                                         C_EXAM03
   Defines base coordinates to offset mouse reference positioning.

   Syntax
         POS_REFER([nXPosition,nYPosition])

   Arguments
         OPTIONAL PARAMETERS
         nXPosition  Sets the horizontal base coordinate.
         nYPosition  Sets the vertical base coordinate.

   Returns
         POS_REFER(@nXPosition,@nYPosition) Horizontal and vertical base
                                            values in variables passes by
                                            reference.

   Description
         POS_REFER() sets the coordinates that the mouse reference positioning
         display will offset its values by. Enter no parameters to set the
         reference to the viewport origin.

         Mouse positioning is the display of the current mouse cursor location
         in current world scale coordinates. As the mouse cursor is moved
         across the viewport, the display is updated.

         If parameters are specified for the POS_REFER() function,
         indicating a point to base the mouse cursor postioning, the
         refrencing is considered to be relative. If no parameters were
         passed to the function, positioning is based on the original scale.

   Examples

         Display the box size while drawing:

         IF m_but = box_tool
            POS_ABS(1)                 && Set ref to positive values
            POS_REFER(KP_SCALE_X(),;   && Set ref to current mouse position
               KP_SCALE_Y())
            MS_OBJECT(1,cur_clr,2,0)   && Draw box with mouse
            POS_REFER()                && Set ref back to origin
         ENDIF

See Also: IS_POS_REL() POS_ABS()

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