Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FUNCky - <b>name:</b> <b>m_inbutton() - wait for a mouse button to be pressed</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     m_inbutton() - wait for a mouse button to be pressed
  Usage:    <integer> = m_inbutton(<button>)
  Params:   int <button> : 0=left, 1=right, (2=right PCmouse)
  Returns:  integer equal to the key pressed, 0 if none

 ---------------------------------- Example ---------------------------------

                 print(10,0,"Press the left mouse button twice..",112)
                 m_clicks(2)
                 m_inbutton(0)

                      or:

                 print(10,0,"Make your selection...",112)
                 key = m_inbutton(0)
                 if  ((key = 13) .or. (m_region(10,10,10,20)))
                      do PROC1
                 endif

  Note:     M_inbutton() acts like waitkey(0). It will wait until a key is
            pressed, or the specified mouse button is pressed. If a key is
            pressed it's value is stored in lastkey() and returned. This is
            useful to write mouse routines that work with and without
            the mouse at the same time. SET KEY TO routines work as
            well as the timeout() function.


See Also: isbutton() m_clicks() m_release()

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