Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - mousebuttons() return the number of mouse buttons http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 mousebuttons()      Return the number of mouse buttons
------------------------------------------------------------------------------
 Declaration
   mouse.hdr

 Syntax
   func int mousebuttons extern

 Arguments
   None.

 Return
   The number of mouse buttons.

 Description
   The mousebuttons() function returns the number of available mouse buttons.

 Example
   #define EXAMPLE_MOUSE
   #include example.hdr

   proc Test_mousebuttons
   if mouseavail()
      // it is not necessary to switch on the mouse to check number of buttons
      ? "Number of mouse buttons is", istr( mousebuttons() )
   else
      ? "Mouse is not available"
   endif
   endproc

   proc main
   Test_mousebuttons()
   endproc

See Also: mouseavail()

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