Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FreshWin (c) Fresh Technologies - <b>msbutprs() mouse function</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  MSBUTPRS()                                                  Mouse Function
 Purpose..: Return details on a mouse button press
-------------------------------------------------------------------------------
 Syntax...: MsButPrs( <nButton>, @<nBStatus>, @<nBCount>,  ;
                                 @<nRow>, @<nCol> ) --> NIL

 Arguments: <nButton>   = the mouse button to check. Valid buttons
                          are defined in FW_MAIN.CH as follows:

              Mouse Button Translate Directives as found in FW_MAIN.CH
              --------------------------------------------------------
              Value  FW_MAIN.CH   Button(s) pressed
              --------------------------------------------------------
              0      MB_NONE      none
              1      MB_LEFT      left
              2      MB_RIGHT     right
              3      MB_LT_RT     middle
              4      MB_MIDDLE    left and right
              5      MB_LT_MD     left and middle
              6      MB_MD_RT     middle and right
              7      MB_ALL       all buttons pressed
              --------------------------------------------------------

            @<nBStatus> = the mouse button status.
            @<nCnt>     = count of the presses since last call for
                          the button.
            @<nRow>     = row number of cursor when <nButton> pressed.
            @<nCol>     = column number of cursor when <nButton> pressed.

 Returns..: NIL

 Remark...: The function has internal counters which change the
            parameters passed. Once MsButPrs() is called, all counters
            are reset to zero.

 Source...: MSBUTPRS.C
-------------------------------------------------------------------------------
 Example..: The example is self-explanatory.

         local nBStat, nRelCount, nX, nY

         MsButPrs( MB_LEFT, @nBStat, @nRelCount, @nX, @nY )

         @ 1, 1 say "Button "+str( nBStat ) was pressed at"
         @ 2, 1 say "row "+trim( str( nX ) ) + "and column "+trim( str( nY ) )
         @ 3, 1 say trim( str( nRelCount ) ) + " times."

See Also: MsButRel()

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