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>msprscnt() mouse function</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  MSPRSCNT()                                                  Mouse Function
 Purpose..: Return the number of mouse button presses
-------------------------------------------------------------------------------
 Syntax...: MsPrsCnt( [<nButton>] ) --> nPresses

 Arguments: [<nButton>] = the mouse button to check. The default is to
                          MB_LEFT. Valid button numbers 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
              --------------------------------------------------------

 Returns..: Returns the number of times the specified mouse button
              has been pressed since the last mouse function call.

 Source...: MSBUTREL.C
-------------------------------------------------------------------------------
 Example..: . When a mouse button is pressed, interrupts representing
              the press get generated very quickly. You may wish to know how
              often each of the buttons were pressed. The example shows
              how to create an array summarizing the button presses.

               FUNCTION MsPrsSummary( )
                  local aPressCount := {}

                  aPressCount[ MB_LEFT ]   := MsPrsCnt( MB_LEFT )
                  aPressCount[ MB_RIGHT ]  := MsPrsCnt( MB_RIGHT )
                  aPressCount[ MB_LT_RT ]  := MsPrsCnt( MB_LT_RT )
                  aPressCount[ MB_MIDDLE ] := MsPrsCnt( MB_MIDDLE )
                  aPressCount[ MB_LT_MD ]  := MsPrsCnt( MB_LT_MD )
                  aPressCount[ MB_MD_RT ]  := MsPrsCnt( MB_MD_RT )
                  aPressCount[ MB_ALL ]    := MsPrsCnt( MB_ALL )

               RETURN aPressCount

See Also: MsStatus() MsIsPress()

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